Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/files.yaml +40 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/macros.def +31 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/mame2mra.toml +45 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/mem.yaml +53 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/msg +25 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/doc/bionicc.cpp +1002 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/doc/brightness.ods +0 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_bus.v +53 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_colmix.v +190 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_game.v +287 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_main.v +514 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_mcu.v +208 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_sound.v +184 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_video.v +315 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/biocom.mame +5 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/biocom_wp.mame +4 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/gomcu.sh +4 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/mame2char.sh +8 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/mame2sim.sh +73 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/pal_bin2hex.cc +21 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/simload.sh +3 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/prom_we/go.sh +6 -0
- snapshots/jotego_jtcores_pr1100/cores/biocom/ver/prom_we/test.v +56 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/files.yaml +32 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/macros.def +25 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/mame2mra.toml +33 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/mem.yaml +36 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/msg +25 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/doc/blktiger.cpp +1086 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/doc/blktiger_ms.cpp +376 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/doc/scan.cc +35 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_colmix.v +141 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_game.v +288 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_main.v +342 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_mcu.v +100 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_scroll.v +134 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_video.v +262 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/game/pal.cc +15 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/game/scr.sh +7 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/game/sim.sh +3 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/prom_we/go.sh +17 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/prom_we/test.v +120 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/regrun/blkdrgon.sha +22 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/regrun/blktiger.sha +22 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/regrun/blktigera.sha +22 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/scroll/go.sh +9 -0
- snapshots/jotego_jtcores_pr1100/cores/btiger/ver/scroll/test.v +100 -0
- snapshots/jotego_jtcores_pr1100/cores/capbowl/sch/bowl.kicad_pcb +1 -0
- snapshots/jotego_jtcores_pr1100/cores/capbowl/sch/bowl.kicad_prl +90 -0
- snapshots/jotego_jtcores_pr1100/cores/capbowl/sch/bowl.kicad_pro +357 -0
snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/files.yaml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
biocom:
|
| 2 |
+
- get:
|
| 3 |
+
- jtbiocom_colmix.v
|
| 4 |
+
- jtbiocom_game.v
|
| 5 |
+
- jtbiocom_main.v
|
| 6 |
+
- jtbiocom_mcu.v
|
| 7 |
+
- jtbiocom_video.v
|
| 8 |
+
- jtbiocom_sound.v
|
| 9 |
+
tora:
|
| 10 |
+
- get:
|
| 11 |
+
- jttora_obj.v
|
| 12 |
+
- jttora_objdata.v
|
| 13 |
+
gng:
|
| 14 |
+
- get:
|
| 15 |
+
- jtgng_video.yaml
|
| 16 |
+
- jtgng_dual_ram.v
|
| 17 |
+
jtframe:
|
| 18 |
+
- from: clocking
|
| 19 |
+
get:
|
| 20 |
+
- jtframe_cen48.v
|
| 21 |
+
- jtframe_cen24.v
|
| 22 |
+
- from: cpu
|
| 23 |
+
get:
|
| 24 |
+
- jtframe_z80.yaml
|
| 25 |
+
- jtframe_m68k.yaml
|
| 26 |
+
- jtframe_8751.yaml
|
| 27 |
+
- from: ram
|
| 28 |
+
get:
|
| 29 |
+
- jtframe_ram.v
|
| 30 |
+
- jtframe_dual_ram.v
|
| 31 |
+
- jtframe_dual_ram16.v
|
| 32 |
+
- from: video
|
| 33 |
+
get:
|
| 34 |
+
- jtframe_blank.v
|
| 35 |
+
- jtframe_obj.yaml
|
| 36 |
+
jt51:
|
| 37 |
+
jt12:
|
| 38 |
+
- get:
|
| 39 |
+
- jt49.yaml
|
| 40 |
+
- jt12_rst.v
|
snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/macros.def
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
CORENAME=JTBIOCOM
|
| 2 |
+
|
| 3 |
+
JTFRAME_STEREO
|
| 4 |
+
|
| 5 |
+
JTFRAME_CLK24
|
| 6 |
+
JTFRAME_PXLCLK=6
|
| 7 |
+
|
| 8 |
+
JTFRAME_COLORW=5
|
| 9 |
+
JTFRAME_WIDTH=256
|
| 10 |
+
JTFRAME_HEIGHT=224
|
| 11 |
+
JTFRAME_CREDITS_PAGES=1
|
| 12 |
+
|
| 13 |
+
# SDRAM
|
| 14 |
+
JTFRAME_BA1_START =0x040000
|
| 15 |
+
FIX_START=0x80000
|
| 16 |
+
|
| 17 |
+
JTFRAME_BA2_START =0x088000
|
| 18 |
+
|
| 19 |
+
JTFRAME_BA3_START =0x0C8000
|
| 20 |
+
OBJ_START=0xD0000
|
| 21 |
+
|
| 22 |
+
JTFRAME_PROM_START=0x110000
|
| 23 |
+
|
| 24 |
+
[mist|sidi]
|
| 25 |
+
#The logo doesn't fit in small devices
|
| 26 |
+
JTFRAME_OSD_NOLOGO
|
| 27 |
+
-JTFRAME_CREDITS
|
| 28 |
+
|
| 29 |
+
[mister]
|
| 30 |
+
JTFRAME_ARX=5
|
| 31 |
+
JTFRAME_ARY=4
|
snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/mame2mra.toml
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[global]
|
| 2 |
+
author=["jotego"]
|
| 3 |
+
|
| 4 |
+
[parse]
|
| 5 |
+
sourcefile=[ "bionicc.cpp" ]
|
| 6 |
+
# skip.Setnames=["bioniccbl2"]
|
| 7 |
+
|
| 8 |
+
[Audio]
|
| 9 |
+
volume = [
|
| 10 |
+
{ machine="bionicc", value=0x40 },
|
| 11 |
+
]
|
| 12 |
+
|
| 13 |
+
[buttons]
|
| 14 |
+
names=[
|
| 15 |
+
{ names="Shoot,Arm" }
|
| 16 |
+
]
|
| 17 |
+
|
| 18 |
+
[dipsw]
|
| 19 |
+
rename=[
|
| 20 |
+
{ name="Bonus Life", to="Bonus" },
|
| 21 |
+
]
|
| 22 |
+
|
| 23 |
+
[ROM]
|
| 24 |
+
regions=[
|
| 25 |
+
{ name="maincpu", width=16, reverse=true },
|
| 26 |
+
# gfx2 = scroll 2
|
| 27 |
+
{ name="gfx2", width=16, reverse=true, start="JTFRAME_BA1_START", no_offset=true },
|
| 28 |
+
{ name="gfx1", start="FIX_START", reverse=true },
|
| 29 |
+
{ name="gfx3", width=16, sequence=[4,0,5,1,6,2,7,3], start="JTFRAME_BA2_START" },
|
| 30 |
+
{ name="audiocpu", no_offset=true, start="JTFRAME_BA3_START" },
|
| 31 |
+
{ name="spritegen", width=32, reverse=true, no_offset=true },
|
| 32 |
+
{ name="mcu", start="JTFRAME_PROM_START" },
|
| 33 |
+
]
|
| 34 |
+
|
| 35 |
+
patches=[
|
| 36 |
+
{ setname="topsecrt2", offset=4, data="00 00 a8 42" }, # skip initial test
|
| 37 |
+
{ setname="topsecrt", offset=4, data="00 00 90 42" }, # skip initial test
|
| 38 |
+
]
|
| 39 |
+
|
| 40 |
+
order=[ "maincpu",
|
| 41 |
+
"gfx2", "gfx1",
|
| 42 |
+
"gfx3",
|
| 43 |
+
"audiocpu", "spritegen",
|
| 44 |
+
"mcu","proms"
|
| 45 |
+
]
|
snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/mem.yaml
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
params:
|
| 2 |
+
- { name: FIX_OFFSET, value: "(`FIX_START-`JTFRAME_BA1_START)>>1" }
|
| 3 |
+
- { name: OBJ_OFFSET, value: "(`OBJ_START-`JTFRAME_BA3_START)>>1" }
|
| 4 |
+
clocks:
|
| 5 |
+
clk48:
|
| 6 |
+
- freq: 8000000
|
| 7 |
+
outputs:
|
| 8 |
+
- video_cen8
|
| 9 |
+
- nc_cen4
|
| 10 |
+
- freq: 3579545
|
| 11 |
+
outputs:
|
| 12 |
+
- cen_fm
|
| 13 |
+
- cen_fm2
|
| 14 |
+
clk24:
|
| 15 |
+
- freq: 3000000
|
| 16 |
+
outputs:
|
| 17 |
+
- cen3
|
| 18 |
+
- mcu_cen
|
| 19 |
+
audio:
|
| 20 |
+
rsum: 27k
|
| 21 |
+
channels:
|
| 22 |
+
- { name: fm, module: jt51, rsum: 27k, rc: [{r: 1rout, c: 3.3n }]}
|
| 23 |
+
download:
|
| 24 |
+
post_addr: true
|
| 25 |
+
sdram:
|
| 26 |
+
banks:
|
| 27 |
+
- buses:
|
| 28 |
+
- name: main
|
| 29 |
+
addr_width: 18
|
| 30 |
+
data_width: 16
|
| 31 |
+
- buses:
|
| 32 |
+
- name: scr2
|
| 33 |
+
addr_width: 16
|
| 34 |
+
data_width: 16
|
| 35 |
+
cs: LVBL
|
| 36 |
+
- name: char
|
| 37 |
+
addr_width: 14
|
| 38 |
+
data_width: 16
|
| 39 |
+
offset: FIX_OFFSET
|
| 40 |
+
cs: LVBL
|
| 41 |
+
- buses:
|
| 42 |
+
- name: scr1
|
| 43 |
+
addr_width: 18
|
| 44 |
+
data_width: 16
|
| 45 |
+
cs: LVBL
|
| 46 |
+
- buses:
|
| 47 |
+
- name: snd
|
| 48 |
+
addr_width: 15
|
| 49 |
+
data_width: 8
|
| 50 |
+
- name: obj
|
| 51 |
+
addr_width: 18
|
| 52 |
+
data_width: 32
|
| 53 |
+
offset: OBJ_OFFSET
|
snapshots/jotego_jtcores_pr1100/cores/biocom/cfg/msg
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
BIONIC COMMANDO
|
| 2 |
+
CLONE FOR FPGA
|
| 3 |
+
BROUGHT TO YOU BY JOTEGO.
|
| 4 |
+
http://patreon.com/jotego
|
| 5 |
+
|
| 6 |
+
Thanks to
|
| 7 |
+
|
| 8 |
+
SCRALINGS SUVERMAN
|
| 9 |
+
|
| 10 |
+
FREDERIC MAHE JO TOMIYORI
|
| 11 |
+
BRIAN SALLEE PHILLIP MCMAHON
|
| 12 |
+
DUSTIN HUBBARD DANIEL BAUZA
|
| 13 |
+
|
| 14 |
+
Andrew Moore Andyways
|
| 15 |
+
Don Gafford J. Slowfret
|
| 16 |
+
Kyle Good Leslie Law
|
| 17 |
+
M. Astudillo Mary Marshall
|
| 18 |
+
Matthew Young Oliver Jaksch
|
| 19 |
+
Blackstar Oscar Laguna
|
| 20 |
+
Roman Buser Ryan Fig
|
| 21 |
+
Steve Suavek Steve Wilson
|
| 22 |
+
Toby Boreham Xzarian
|
| 23 |
+
Xzarian Sembiance
|
| 24 |
+
victor Gomariz Ultrarobotninja
|
| 25 |
+
WILLIAM CLEMENS
|
snapshots/jotego_jtcores_pr1100/cores/biocom/doc/bionicc.cpp
ADDED
|
@@ -0,0 +1,1002 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// license:BSD-3-Clause
|
| 2 |
+
// copyright-holders:Phil Stroffolino, Paul Leaman, Dirk Best
|
| 3 |
+
// thanks-to: Steven Frew (the author of Slutte)
|
| 4 |
+
/***************************************************************************
|
| 5 |
+
|
| 6 |
+
Bionic Commando
|
| 7 |
+
|
| 8 |
+
© 1987 Capcom
|
| 9 |
+
|
| 10 |
+
Hardware:
|
| 11 |
+
|
| 12 |
+
Main CPU board: 86612-A-2
|
| 13 |
+
Graphics ROM board: 86612-B-2
|
| 14 |
+
Program ROM board: 86612-C-2
|
| 15 |
+
|
| 16 |
+
Main CPU: 68000CP10 @ 24MHz / 2 = 12MHz
|
| 17 |
+
Sound CPU: Z80A @ 14.31818 / 4 = 3.579545MHz
|
| 18 |
+
MCU: Intel C8751H-88 @ 24MHz / 4 = 6MHz
|
| 19 |
+
Sound Chip: YM2151 & YM3012
|
| 20 |
+
OSC: 24.000 MHz (on the 86612-B-2 PCB)
|
| 21 |
+
Custom: CAPCOM DL-010D-103 (on the 86612-B-2 PCB)
|
| 22 |
+
|
| 23 |
+
Video timings:
|
| 24 |
+
|
| 25 |
+
Horizontal scan rate: 15.606kHz
|
| 26 |
+
Vertical scan rate: 60.024Hz
|
| 27 |
+
|
| 28 |
+
pixel clock: 6.000MHz, 166ns per pixel
|
| 29 |
+
|
| 30 |
+
htotal: 64.076us, 386 pixels
|
| 31 |
+
hsync: 5.312us, 32 pixels
|
| 32 |
+
back porch + sync: 15.106us, 91 pixels
|
| 33 |
+
active video: 42.662us, 257 pixels (first pixel is repeated?)
|
| 34 |
+
front porch: 6.308us, 38 pixels
|
| 35 |
+
|
| 36 |
+
vtotal: 16.660ms, 260 lines
|
| 37 |
+
vsync: 256.304us, 4 lines
|
| 38 |
+
back porch + sync: 1.282ms, 20 lines
|
| 39 |
+
active video: 14.353ms, 224 lines
|
| 40 |
+
front porch: 1.025ms, 16 lines
|
| 41 |
+
|
| 42 |
+
Clocks verified on 86612-A-2 and 86612-B-2 boards, serial no. 39646
|
| 43 |
+
("Bionic Commando", US region) by scope measurement at clock pins.
|
| 44 |
+
Timings verified at SYNC pin and BLUE pin (jamma edge),
|
| 45 |
+
using an Agilent DSO9404A scope and two N2873A 500MHz probes
|
| 46 |
+
|
| 47 |
+
BTANB [MT00209] (verified on real PCB):
|
| 48 |
+
- misplaced sprites (see beginning of level 1 or 2 for example)
|
| 49 |
+
- sprite / sprite priority (see level 2 the reflectors)
|
| 50 |
+
- sprite / background priority (see level 1: birds walk through
|
| 51 |
+
branches of different trees)
|
| 52 |
+
- see the beginning of level 3: background screwed
|
| 53 |
+
- gray tiles around the title in Top Secret
|
| 54 |
+
|
| 55 |
+
Notes:
|
| 56 |
+
- Protection MCU is labelled "TS" without a number and without a coloured.
|
| 57 |
+
Maybe its code is not region dependant.
|
| 58 |
+
- The MCU rom contains the string
|
| 59 |
+
"<for dealer-location test & USA show. 87/03/10 >"
|
| 60 |
+
which indicates it could be from an earlier version, especially with it
|
| 61 |
+
coming from a 'Top Secret' bootleg with identical program but unprotected
|
| 62 |
+
MCU, however f1dream has a similar string, and is verified as being from
|
| 63 |
+
a production board.
|
| 64 |
+
- Euro rom labels (IE: "TSE") had a blue stripe, while those labeled
|
| 65 |
+
as USA (TSU) had an red stripe on the sticker. The intermixing
|
| 66 |
+
of TSE and TSU roms in the parent set is correct and verified.
|
| 67 |
+
- Euro set simply states the game cannot be operated in Japan.
|
| 68 |
+
- IRQ 4 is control related. On each interrupt, it reads 0xFE4000
|
| 69 |
+
(coin/start), shift the bits around and move the resulting byte into a
|
| 70 |
+
dword RAM location. The dword RAM location is rotated by 8 bits each time
|
| 71 |
+
this happens. This is probably done to be pedantic about coin insertions
|
| 72 |
+
(might be protection related).
|
| 73 |
+
|
| 74 |
+
TODO:
|
| 75 |
+
- Firing IRQ4 at line 16 causes the game to often miss coin inserts. Set
|
| 76 |
+
to 128 currently to compensate.
|
| 77 |
+
- The game doesn't set the coin lockout in service mode, so the coin inputs
|
| 78 |
+
can't be tested there if you uncomment and enable it.
|
| 79 |
+
|
| 80 |
+
***************************************************************************/
|
| 81 |
+
|
| 82 |
+
#include "emu.h"
|
| 83 |
+
|
| 84 |
+
#include "cpu/m68000/m68000.h"
|
| 85 |
+
#include "cpu/mcs51/mcs51.h"
|
| 86 |
+
#include "cpu/z80/z80.h"
|
| 87 |
+
#include "machine/timer.h"
|
| 88 |
+
#include "video/bufsprite.h"
|
| 89 |
+
#include "tigeroad_spr.h"
|
| 90 |
+
#include "sound/ymopm.h"
|
| 91 |
+
#include "emupal.h"
|
| 92 |
+
#include "screen.h"
|
| 93 |
+
#include "speaker.h"
|
| 94 |
+
#include "tilemap.h"
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
//**************************************************************************
|
| 98 |
+
// TYPE DEFINITIONS
|
| 99 |
+
//**************************************************************************
|
| 100 |
+
|
| 101 |
+
class bionicc_state : public driver_device
|
| 102 |
+
{
|
| 103 |
+
public:
|
| 104 |
+
bionicc_state(const machine_config &mconfig, device_type type, const char *tag) :
|
| 105 |
+
driver_device(mconfig, type, tag),
|
| 106 |
+
m_maincpu(*this, "maincpu"),
|
| 107 |
+
m_audiocpu(*this, "audiocpu"),
|
| 108 |
+
m_mcu(*this, "mcu"),
|
| 109 |
+
m_gfxdecode(*this, "gfxdecode"),
|
| 110 |
+
m_palette(*this, "palette"),
|
| 111 |
+
m_spritegen(*this, "spritegen"),
|
| 112 |
+
m_spriteram(*this, "spriteram") ,
|
| 113 |
+
m_txvideoram(*this, "txvideoram"),
|
| 114 |
+
m_fgvideoram(*this, "fgvideoram"),
|
| 115 |
+
m_bgvideoram(*this, "bgvideoram"),
|
| 116 |
+
m_mcu_p3(0xff)
|
| 117 |
+
{ }
|
| 118 |
+
|
| 119 |
+
void bionicc(machine_config &config);
|
| 120 |
+
|
| 121 |
+
protected:
|
| 122 |
+
virtual void machine_start() override;
|
| 123 |
+
virtual void machine_reset() override;
|
| 124 |
+
virtual void video_start() override;
|
| 125 |
+
|
| 126 |
+
private:
|
| 127 |
+
required_device<cpu_device> m_maincpu;
|
| 128 |
+
required_device<cpu_device> m_audiocpu;
|
| 129 |
+
required_device<i8751_device> m_mcu;
|
| 130 |
+
required_device<gfxdecode_device> m_gfxdecode;
|
| 131 |
+
required_device<palette_device> m_palette;
|
| 132 |
+
required_device<tigeroad_spr_device> m_spritegen;
|
| 133 |
+
required_device<buffered_spriteram16_device> m_spriteram;
|
| 134 |
+
|
| 135 |
+
required_shared_ptr<uint16_t> m_txvideoram;
|
| 136 |
+
required_shared_ptr<uint16_t> m_fgvideoram;
|
| 137 |
+
required_shared_ptr<uint16_t> m_bgvideoram;
|
| 138 |
+
|
| 139 |
+
void main_map(address_map &map);
|
| 140 |
+
void sound_map(address_map &map);
|
| 141 |
+
void mcu_io(address_map &map);
|
| 142 |
+
|
| 143 |
+
void output_w(u8 data);
|
| 144 |
+
|
| 145 |
+
// video
|
| 146 |
+
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
| 147 |
+
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
| 148 |
+
TILE_GET_INFO_MEMBER(get_tx_tile_info);
|
| 149 |
+
static rgb_t RRRRGGGGBBBBIIII(uint32_t raw);
|
| 150 |
+
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
| 151 |
+
TIMER_DEVICE_CALLBACK_MEMBER(scanline);
|
| 152 |
+
|
| 153 |
+
void bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
| 154 |
+
void fgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
| 155 |
+
void txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
| 156 |
+
void scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0);
|
| 157 |
+
|
| 158 |
+
tilemap_t *m_tx_tilemap = nullptr;
|
| 159 |
+
tilemap_t *m_bg_tilemap = nullptr;
|
| 160 |
+
tilemap_t *m_fg_tilemap = nullptr;
|
| 161 |
+
uint16_t m_scroll[4]{};
|
| 162 |
+
|
| 163 |
+
// audio
|
| 164 |
+
void audiocpu_nmi_w(u8 data);
|
| 165 |
+
|
| 166 |
+
// protection mcu
|
| 167 |
+
u8 m_audiocpu_to_mcu = 0; // ls374 at 4a
|
| 168 |
+
u8 m_mcu_to_audiocpu = 0; // ls374 at 5a
|
| 169 |
+
u8 m_mcu_p1 = 0;
|
| 170 |
+
u8 m_mcu_p3;
|
| 171 |
+
|
| 172 |
+
void dmaon_w(u16 data);
|
| 173 |
+
u8 mcu_dma_r(offs_t offset);
|
| 174 |
+
void mcu_dma_w(offs_t offset, u8 data);
|
| 175 |
+
void mcu_p3_w(u8 data);
|
| 176 |
+
};
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
//**************************************************************************
|
| 180 |
+
// ADDRESS MAPS
|
| 181 |
+
//**************************************************************************
|
| 182 |
+
|
| 183 |
+
void bionicc_state::main_map(address_map &map)
|
| 184 |
+
{
|
| 185 |
+
map.global_mask(0xfffff);
|
| 186 |
+
map(0x00000, 0x3ffff).rom();
|
| 187 |
+
map(0xe0000, 0xe07ff).ram(); /* RAM? */
|
| 188 |
+
map(0xe0800, 0xe0cff).ram().share("spriteram");
|
| 189 |
+
map(0xe0d00, 0xe3fff).ram(); /* RAM? */
|
| 190 |
+
map(0xe4000, 0xe4000).mirror(0x3ffc).w(FUNC(bionicc_state::output_w));
|
| 191 |
+
map(0xe4000, 0xe4001).mirror(0x3ffc).portr("INPUTS");
|
| 192 |
+
map(0xe4002, 0xe4002).mirror(0x3ffc).w(FUNC(bionicc_state::audiocpu_nmi_w));
|
| 193 |
+
map(0xe4002, 0xe4003).mirror(0x3ffc).portr("DSW");
|
| 194 |
+
map(0xe8010, 0xe8017).w(FUNC(bionicc_state::scroll_w));
|
| 195 |
+
map(0xe8018, 0xe8019).nopw(); // vblank irq ack?
|
| 196 |
+
map(0xe801a, 0xe801b).w(FUNC(bionicc_state::dmaon_w));
|
| 197 |
+
map(0xec000, 0xecfff).mirror(0x3000).ram().w(FUNC(bionicc_state::txvideoram_w)).share("txvideoram");
|
| 198 |
+
map(0xf0000, 0xf3fff).ram().w(FUNC(bionicc_state::fgvideoram_w)).share("fgvideoram");
|
| 199 |
+
map(0xf4000, 0xf7fff).ram().w(FUNC(bionicc_state::bgvideoram_w)).share("bgvideoram");
|
| 200 |
+
map(0xf8000, 0xf87ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
|
| 201 |
+
map(0xfc000, 0xfffff).ram(); // WRAM
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
void bionicc_state::sound_map(address_map &map)
|
| 205 |
+
{
|
| 206 |
+
map(0x0000, 0x7fff).rom();
|
| 207 |
+
map(0x8000, 0x8001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write));
|
| 208 |
+
map(0xa000, 0xa000).lrw8(NAME([this]() { return m_mcu_to_audiocpu; }), NAME([this](u8 data) { m_audiocpu_to_mcu = data; }));
|
| 209 |
+
map(0xc000, 0xc7ff).ram();
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
void bionicc_state::mcu_io(address_map &map)
|
| 213 |
+
{
|
| 214 |
+
map.global_mask(0x7ff);
|
| 215 |
+
map(0x000, 0x7ff).rw(FUNC(bionicc_state::mcu_dma_r), FUNC(bionicc_state::mcu_dma_w));
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
|
| 219 |
+
//**************************************************************************
|
| 220 |
+
// INPUT PORT DEFINITIONS
|
| 221 |
+
//**************************************************************************
|
| 222 |
+
|
| 223 |
+
static INPUT_PORTS_START( bionicc )
|
| 224 |
+
PORT_START("INPUTS")
|
| 225 |
+
PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_COCKTAIL
|
| 226 |
+
PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_COCKTAIL
|
| 227 |
+
PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_COCKTAIL PORT_8WAY
|
| 228 |
+
PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_COCKTAIL PORT_8WAY
|
| 229 |
+
PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_COCKTAIL PORT_8WAY
|
| 230 |
+
PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_COCKTAIL PORT_8WAY
|
| 231 |
+
PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_BUTTON2)
|
| 232 |
+
PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_BUTTON1)
|
| 233 |
+
PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_8WAY
|
| 234 |
+
PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_8WAY
|
| 235 |
+
PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_8WAY
|
| 236 |
+
PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_8WAY
|
| 237 |
+
PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_START2)
|
| 238 |
+
PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_START1)
|
| 239 |
+
PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_COIN2)
|
| 240 |
+
PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_COIN1)
|
| 241 |
+
|
| 242 |
+
PORT_START("DSW")
|
| 243 |
+
PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWB:1,2,3")
|
| 244 |
+
PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) )
|
| 245 |
+
PORT_DIPSETTING( 0x0001, DEF_STR( 3C_1C ) )
|
| 246 |
+
PORT_DIPSETTING( 0x0002, DEF_STR( 2C_1C ) )
|
| 247 |
+
PORT_DIPSETTING( 0x0007, DEF_STR( 1C_1C ) )
|
| 248 |
+
PORT_DIPSETTING( 0x0006, DEF_STR( 1C_2C ) )
|
| 249 |
+
PORT_DIPSETTING( 0x0005, DEF_STR( 1C_3C ) )
|
| 250 |
+
PORT_DIPSETTING( 0x0004, DEF_STR( 1C_4C ) )
|
| 251 |
+
PORT_DIPSETTING( 0x0003, DEF_STR( 1C_6C ) )
|
| 252 |
+
PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SWB:4,5,6")
|
| 253 |
+
PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) )
|
| 254 |
+
PORT_DIPSETTING( 0x0008, DEF_STR( 3C_1C ) )
|
| 255 |
+
PORT_DIPSETTING( 0x0010, DEF_STR( 2C_1C ) )
|
| 256 |
+
PORT_DIPSETTING( 0x0038, DEF_STR( 1C_1C ) )
|
| 257 |
+
PORT_DIPSETTING( 0x0030, DEF_STR( 1C_2C ) )
|
| 258 |
+
PORT_DIPSETTING( 0x0028, DEF_STR( 1C_3C ) )
|
| 259 |
+
PORT_DIPSETTING( 0x0020, DEF_STR( 1C_4C ) )
|
| 260 |
+
PORT_DIPSETTING( 0x0018, DEF_STR( 1C_6C ) )
|
| 261 |
+
PORT_SERVICE_DIPLOC( 0x0040, IP_ACTIVE_LOW, "SWB:7" )
|
| 262 |
+
PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SWB:8")
|
| 263 |
+
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
|
| 264 |
+
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
| 265 |
+
PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) ) PORT_DIPLOCATION("SWA:1,2")
|
| 266 |
+
PORT_DIPSETTING( 0x0300, "3" )
|
| 267 |
+
PORT_DIPSETTING( 0x0200, "4" )
|
| 268 |
+
PORT_DIPSETTING( 0x0100, "5" )
|
| 269 |
+
PORT_DIPSETTING( 0x0000, "7" )
|
| 270 |
+
PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SWA:3")
|
| 271 |
+
PORT_DIPSETTING( 0x0400, DEF_STR( Upright ) )
|
| 272 |
+
PORT_DIPSETTING( 0x0000, DEF_STR( Cocktail ) )
|
| 273 |
+
PORT_DIPNAME( 0x1800, 0x1800, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SWA:4,5") /* table at 0x00483a */
|
| 274 |
+
PORT_DIPSETTING( 0x1800, "20k 40k 100k 60k+" )
|
| 275 |
+
PORT_DIPSETTING( 0x1000, "30k 50k 120k 70k+" )
|
| 276 |
+
PORT_DIPSETTING( 0x0800, "20k 60k")
|
| 277 |
+
PORT_DIPSETTING( 0x0000, "30k 70k" )
|
| 278 |
+
PORT_DIPNAME( 0x6000, 0x4000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SWA:6,7")
|
| 279 |
+
PORT_DIPSETTING( 0x4000, DEF_STR( Easy ) )
|
| 280 |
+
PORT_DIPSETTING( 0x6000, DEF_STR( Medium ) )
|
| 281 |
+
PORT_DIPSETTING( 0x2000, DEF_STR( Hard ) )
|
| 282 |
+
PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) )
|
| 283 |
+
PORT_DIPNAME( 0x8000, 0x8000, "Freeze" ) PORT_DIPLOCATION("SWA:8") /* Listed as "Unused" */
|
| 284 |
+
PORT_DIPSETTING( 0x8000, DEF_STR( Off ) )
|
| 285 |
+
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
|
| 286 |
+
INPUT_PORTS_END
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
//**************************************************************************
|
| 290 |
+
// PALETTE
|
| 291 |
+
//**************************************************************************
|
| 292 |
+
|
| 293 |
+
rgb_t bionicc_state::RRRRGGGGBBBBIIII(uint32_t raw)
|
| 294 |
+
{
|
| 295 |
+
uint8_t bright = (raw & 0x0f);
|
| 296 |
+
|
| 297 |
+
uint8_t r = ((raw >> 12) & 0x0f) * 0x11;
|
| 298 |
+
uint8_t g = ((raw >> 8) & 0x0f) * 0x11;
|
| 299 |
+
uint8_t b = ((raw >> 4) & 0x0f) * 0x11;
|
| 300 |
+
|
| 301 |
+
if ((bright & 0x08) == 0)
|
| 302 |
+
{
|
| 303 |
+
r = r * (0x07 + bright) / 0x0e;
|
| 304 |
+
g = g * (0x07 + bright) / 0x0e;
|
| 305 |
+
b = b * (0x07 + bright) / 0x0e;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
return rgb_t(r, g, b);
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
//**************************************************************************
|
| 313 |
+
// VIDEO EMULATION
|
| 314 |
+
//**************************************************************************
|
| 315 |
+
|
| 316 |
+
/*
|
| 317 |
+
|
| 318 |
+
This board handles tile/tile and tile/sprite priority with a PROM. Its
|
| 319 |
+
working is complicated and hardcoded in the driver.
|
| 320 |
+
|
| 321 |
+
The PROM is a 256x4 chip, with address inputs wired as follows:
|
| 322 |
+
|
| 323 |
+
A0 bg opaque
|
| 324 |
+
A1 \
|
| 325 |
+
A2 | fg pen
|
| 326 |
+
A3 |
|
| 327 |
+
A4 /
|
| 328 |
+
A5 fg has priority over sprites (bit 5 of tile attribute)
|
| 329 |
+
A6 fg has not priority over bg (bits 6 & 7 of tile attribute both set)
|
| 330 |
+
A7 sprite opaque
|
| 331 |
+
|
| 332 |
+
The output selects the active layer, it can be:
|
| 333 |
+
0 bg
|
| 334 |
+
1 fg
|
| 335 |
+
2 sprite
|
| 336 |
+
|
| 337 |
+
*/
|
| 338 |
+
|
| 339 |
+
void bionicc_state::bgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
| 340 |
+
{
|
| 341 |
+
COMBINE_DATA(&m_bgvideoram[offset]);
|
| 342 |
+
m_bg_tilemap->mark_tile_dirty(offset / 2);
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
void bionicc_state::fgvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
| 346 |
+
{
|
| 347 |
+
COMBINE_DATA(&m_fgvideoram[offset]);
|
| 348 |
+
m_fg_tilemap->mark_tile_dirty(offset / 2);
|
| 349 |
+
}
|
| 350 |
+
|
| 351 |
+
void bionicc_state::txvideoram_w(offs_t offset, u16 data, u16 mem_mask)
|
| 352 |
+
{
|
| 353 |
+
COMBINE_DATA(&m_txvideoram[offset]);
|
| 354 |
+
m_tx_tilemap->mark_tile_dirty(offset & 0x3ff);
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
void bionicc_state::scroll_w(offs_t offset, u16 data, u16 mem_mask)
|
| 358 |
+
{
|
| 359 |
+
data = COMBINE_DATA(&m_scroll[offset]);
|
| 360 |
+
|
| 361 |
+
switch (offset)
|
| 362 |
+
{
|
| 363 |
+
case 0:
|
| 364 |
+
m_fg_tilemap->set_scrollx(0, data);
|
| 365 |
+
break;
|
| 366 |
+
case 1:
|
| 367 |
+
m_fg_tilemap->set_scrolly(0, data);
|
| 368 |
+
break;
|
| 369 |
+
case 2:
|
| 370 |
+
m_bg_tilemap->set_scrollx(0, data);
|
| 371 |
+
break;
|
| 372 |
+
case 3:
|
| 373 |
+
m_bg_tilemap->set_scrolly(0, data);
|
| 374 |
+
break;
|
| 375 |
+
}
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
u32 bionicc_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
| 379 |
+
{
|
| 380 |
+
bitmap.fill(m_palette->black_pen(), cliprect);
|
| 381 |
+
|
| 382 |
+
m_fg_tilemap->draw(screen, bitmap, cliprect, 1 | TILEMAP_DRAW_LAYER1, 0); /* nothing in FRONT */
|
| 383 |
+
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
| 384 |
+
m_fg_tilemap->draw(screen, bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER1, 0);
|
| 385 |
+
m_spritegen->draw_sprites(bitmap, cliprect, m_spriteram->buffer(), m_spriteram->bytes(), flip_screen(), false);
|
| 386 |
+
m_fg_tilemap->draw(screen, bitmap, cliprect, 0 | TILEMAP_DRAW_LAYER0, 0);
|
| 387 |
+
|
| 388 |
+
// text layer last
|
| 389 |
+
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
| 390 |
+
|
| 391 |
+
return 0;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
void bionicc_state::video_start()
|
| 395 |
+
{
|
| 396 |
+
m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bionicc_state::get_tx_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
| 397 |
+
m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bionicc_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 16, 16, 64, 64);
|
| 398 |
+
m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bionicc_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
|
| 399 |
+
|
| 400 |
+
m_tx_tilemap->set_transparent_pen(3);
|
| 401 |
+
m_fg_tilemap->set_transmask(0, 0xffff, 0x8000); /* split type 0 is completely transparent in front half */
|
| 402 |
+
m_fg_tilemap->set_transmask(1, 0xffc1, 0x803e); /* split type 1 has pens 1-5 opaque in front half */
|
| 403 |
+
m_bg_tilemap->set_transparent_pen(15);
|
| 404 |
+
|
| 405 |
+
m_tx_tilemap->set_scrolldx(128, 128);
|
| 406 |
+
m_tx_tilemap->set_scrolldy( 6, 6);
|
| 407 |
+
m_bg_tilemap->set_scrolldx(128, 128);
|
| 408 |
+
m_bg_tilemap->set_scrolldy( 6, 6);
|
| 409 |
+
m_fg_tilemap->set_scrolldx(128, 128);
|
| 410 |
+
m_fg_tilemap->set_scrolldy( 6, 6);
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
|
| 414 |
+
//**************************************************************************
|
| 415 |
+
// DRAWGFX LAYOUTS
|
| 416 |
+
//**************************************************************************
|
| 417 |
+
|
| 418 |
+
static const gfx_layout vramlayout=
|
| 419 |
+
{
|
| 420 |
+
8,8, /* 8*8 characters */
|
| 421 |
+
RGN_FRAC(1,1), /* 1024 character */
|
| 422 |
+
2, /* 2 bitplanes */
|
| 423 |
+
{ 4,0 },
|
| 424 |
+
{ STEP4(0,1), STEP4(4*2,1) },
|
| 425 |
+
{ STEP8(0,4*2*2) },
|
| 426 |
+
128 /* every character takes 128 consecutive bytes */
|
| 427 |
+
};
|
| 428 |
+
|
| 429 |
+
static const gfx_layout scroll2layout=
|
| 430 |
+
{
|
| 431 |
+
8,8, /* 8*8 tiles */
|
| 432 |
+
RGN_FRAC(1,2), /* 2048 tiles */
|
| 433 |
+
4, /* 4 bits per pixel */
|
| 434 |
+
{ RGN_FRAC(1,2)+4,RGN_FRAC(1,2),4,0 },
|
| 435 |
+
{ STEP4(0,1), STEP4(4*2,1) },
|
| 436 |
+
{ STEP8(0,4*2*2) },
|
| 437 |
+
128 /* every tile takes 128 consecutive bytes */
|
| 438 |
+
};
|
| 439 |
+
|
| 440 |
+
static const gfx_layout scroll1layout=
|
| 441 |
+
{
|
| 442 |
+
16,16, /* 16*16 tiles */
|
| 443 |
+
RGN_FRAC(1,2), /* 2048 tiles */
|
| 444 |
+
4, /* 4 bits per pixel */
|
| 445 |
+
{ RGN_FRAC(1,2)+4,RGN_FRAC(1,2),4,0 },
|
| 446 |
+
{ STEP4(0,1), STEP4(4*2,1), STEP4(4*2*2*16,1), STEP4(4*2*2*16+4*2,1) },
|
| 447 |
+
{ STEP16(0,4*2*2) },
|
| 448 |
+
512 /* each tile takes 512 consecutive bytes */
|
| 449 |
+
};
|
| 450 |
+
|
| 451 |
+
static GFXDECODE_START( gfx_bionicc )
|
| 452 |
+
GFXDECODE_ENTRY( "gfx1", 0, vramlayout, 768, 64 ) /* colors 768-1023 */
|
| 453 |
+
GFXDECODE_ENTRY( "gfx2", 0, scroll2layout, 0, 8 ) /* colors 0- 127 */
|
| 454 |
+
GFXDECODE_ENTRY( "gfx3", 0, scroll1layout, 256, 4 ) /* colors 256- 319 */
|
| 455 |
+
GFXDECODE_END
|
| 456 |
+
|
| 457 |
+
TILE_GET_INFO_MEMBER(bionicc_state::get_tx_tile_info)
|
| 458 |
+
{
|
| 459 |
+
// 76------ tile code high bits
|
| 460 |
+
// --543210 color
|
| 461 |
+
|
| 462 |
+
int attr = m_txvideoram[tile_index + 0x400];
|
| 463 |
+
int code = m_txvideoram[tile_index] & 0xff;
|
| 464 |
+
|
| 465 |
+
tileinfo.set(0, ((attr & 0xc0) << 2) | code, attr & 0x3f, 0);
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
TILE_GET_INFO_MEMBER(bionicc_state::get_fg_tile_info)
|
| 469 |
+
{
|
| 470 |
+
// 7------- tile flip x
|
| 471 |
+
// -6------ tile flip y
|
| 472 |
+
// --5----- layer
|
| 473 |
+
// ---43--- color
|
| 474 |
+
// -----210 tile code high bits
|
| 475 |
+
|
| 476 |
+
int attr = m_fgvideoram[2 * tile_index + 1];
|
| 477 |
+
int code = m_fgvideoram[2 * tile_index] & 0xff;
|
| 478 |
+
int flag = 0;
|
| 479 |
+
|
| 480 |
+
if ((attr & 0xc0) == 0xc0)
|
| 481 |
+
{
|
| 482 |
+
// drawn to the background if both flip bits are set
|
| 483 |
+
tileinfo.category = 1;
|
| 484 |
+
tileinfo.group = 0;
|
| 485 |
+
}
|
| 486 |
+
else
|
| 487 |
+
{
|
| 488 |
+
tileinfo.category = 0;
|
| 489 |
+
tileinfo.group = (attr & 0x20) >> 5;
|
| 490 |
+
flag = TILE_FLIPXY((attr & 0xc0) >> 6);
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
tileinfo.set(2, ((attr & 0x07) << 8) | code, (attr & 0x18) >> 3, flag);
|
| 494 |
+
}
|
| 495 |
+
|
| 496 |
+
TILE_GET_INFO_MEMBER(bionicc_state::get_bg_tile_info)
|
| 497 |
+
{
|
| 498 |
+
// 7------- tile flip x
|
| 499 |
+
// -6------ tile flip y
|
| 500 |
+
// --543--- color
|
| 501 |
+
// -----210 tile code high bits
|
| 502 |
+
|
| 503 |
+
int attr = m_bgvideoram[2 * tile_index + 1];
|
| 504 |
+
int code = m_bgvideoram[2 * tile_index] & 0xff;
|
| 505 |
+
int flag = TILE_FLIPXY((attr & 0xc0) >> 6);
|
| 506 |
+
|
| 507 |
+
tileinfo.set(1, ((attr & 0x07) << 8) | code, (attr & 0x38) >> 3, flag);
|
| 508 |
+
}
|
| 509 |
+
|
| 510 |
+
|
| 511 |
+
//**************************************************************************
|
| 512 |
+
// PROTECTION MCU
|
| 513 |
+
//**************************************************************************
|
| 514 |
+
|
| 515 |
+
u8 bionicc_state::mcu_dma_r(offs_t offset)
|
| 516 |
+
{
|
| 517 |
+
u8 data = 0xff;
|
| 518 |
+
|
| 519 |
+
if (BIT(m_mcu_p3, 5) == 0)
|
| 520 |
+
{
|
| 521 |
+
// various address bits are pulled high because the mcu doesn't drive them
|
| 522 |
+
// the 3 upper address bits (p2.0, p2.1, p2.2) are connected to a14 to a16
|
| 523 |
+
offs_t address = 0xe3e01 | ((offset & 0x700) << 6) | ((offset & 0xff) << 1);
|
| 524 |
+
data = m_maincpu->space(AS_PROGRAM).read_byte(address);
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
return data;
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
void bionicc_state::mcu_dma_w(offs_t offset, u8 data)
|
| 531 |
+
{
|
| 532 |
+
if (BIT(m_mcu_p3, 5) == 0)
|
| 533 |
+
{
|
| 534 |
+
offs_t address = 0xe3e01 | ((offset & 0x700) << 6) | ((offset & 0xff) << 1);
|
| 535 |
+
m_maincpu->space(AS_PROGRAM).write_byte(address, data);
|
| 536 |
+
}
|
| 537 |
+
}
|
| 538 |
+
|
| 539 |
+
void bionicc_state::mcu_p3_w(u8 data)
|
| 540 |
+
{
|
| 541 |
+
// 7------- read strobe
|
| 542 |
+
// -6------ write strobe
|
| 543 |
+
// --5----- dma
|
| 544 |
+
// ---4---- int1 ack
|
| 545 |
+
// ----3--- int1
|
| 546 |
+
// -----2-- int0
|
| 547 |
+
// ------1- int0 flip-flop preset
|
| 548 |
+
// -------0 int0 ack
|
| 549 |
+
|
| 550 |
+
if (BIT(m_mcu_p3, 0) == 1 && BIT(data, 0) == 0)
|
| 551 |
+
{
|
| 552 |
+
m_mcu->set_input_line(MCS51_INT0_LINE, CLEAR_LINE);
|
| 553 |
+
m_maincpu->resume(SUSPEND_REASON_HALT);
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
+
if (BIT(m_mcu_p3, 4) == 1 && BIT(data, 4) == 0)
|
| 557 |
+
m_mcu->set_input_line(MCS51_INT1_LINE, CLEAR_LINE);
|
| 558 |
+
|
| 559 |
+
if (BIT(m_mcu_p3, 6) == 1 && BIT(data, 6) == 0)
|
| 560 |
+
m_mcu_to_audiocpu = m_mcu_p1;
|
| 561 |
+
|
| 562 |
+
m_mcu_p3 = data;
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
void bionicc_state::dmaon_w(u16 data)
|
| 566 |
+
{
|
| 567 |
+
m_mcu->set_input_line(MCS51_INT0_LINE, ASSERT_LINE);
|
| 568 |
+
m_maincpu->suspend(SUSPEND_REASON_HALT, true);
|
| 569 |
+
}
|
| 570 |
+
|
| 571 |
+
|
| 572 |
+
//**************************************************************************
|
| 573 |
+
// AUDIO
|
| 574 |
+
//**************************************************************************
|
| 575 |
+
|
| 576 |
+
void bionicc_state::audiocpu_nmi_w(u8 data)
|
| 577 |
+
{
|
| 578 |
+
m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero);
|
| 579 |
+
}
|
| 580 |
+
|
| 581 |
+
|
| 582 |
+
//**************************************************************************
|
| 583 |
+
// MACHINE EMULATION
|
| 584 |
+
//**************************************************************************
|
| 585 |
+
|
| 586 |
+
void bionicc_state::output_w(u8 data)
|
| 587 |
+
{
|
| 588 |
+
// 7------- coin counter 1
|
| 589 |
+
// -6------ coin counter 2
|
| 590 |
+
// --5----- coin lockout 1
|
| 591 |
+
// ---4---- coin lockout 2
|
| 592 |
+
// ----321- unused
|
| 593 |
+
// -------0 flip screen
|
| 594 |
+
|
| 595 |
+
flip_screen_set(BIT(data, 0));
|
| 596 |
+
|
| 597 |
+
// commented out, else you can't test the coin inputs in service mode
|
| 598 |
+
// machine().bookkeeping().coin_lockout_w(1, BIT(~data, 4));
|
| 599 |
+
// machine().bookkeeping().coin_lockout_w(0, BIT(~data, 5));
|
| 600 |
+
machine().bookkeeping().coin_counter_w(1, BIT(data, 6));
|
| 601 |
+
machine().bookkeeping().coin_counter_w(0, BIT(data, 7));
|
| 602 |
+
}
|
| 603 |
+
|
| 604 |
+
TIMER_DEVICE_CALLBACK_MEMBER(bionicc_state::scanline)
|
| 605 |
+
{
|
| 606 |
+
// vblank-out irq - drives the game (V256)
|
| 607 |
+
if (param == 256)
|
| 608 |
+
m_maincpu->set_input_line(2, HOLD_LINE);
|
| 609 |
+
|
| 610 |
+
// vblank-in irq - processes inputs (!LVBL)
|
| 611 |
+
// should be 16? but then often loses coin inserts
|
| 612 |
+
if (param == 128)
|
| 613 |
+
m_maincpu->set_input_line(4, HOLD_LINE);
|
| 614 |
+
}
|
| 615 |
+
|
| 616 |
+
void bionicc_state::machine_start()
|
| 617 |
+
{
|
| 618 |
+
save_item(NAME(m_scroll));
|
| 619 |
+
save_item(NAME(m_audiocpu_to_mcu));
|
| 620 |
+
save_item(NAME(m_mcu_to_audiocpu));
|
| 621 |
+
save_item(NAME(m_mcu_p1));
|
| 622 |
+
save_item(NAME(m_mcu_p3));
|
| 623 |
+
}
|
| 624 |
+
|
| 625 |
+
void bionicc_state::machine_reset()
|
| 626 |
+
{
|
| 627 |
+
m_scroll[0] = 0;
|
| 628 |
+
m_scroll[1] = 0;
|
| 629 |
+
m_scroll[2] = 0;
|
| 630 |
+
m_scroll[3] = 0;
|
| 631 |
+
}
|
| 632 |
+
|
| 633 |
+
|
| 634 |
+
//**************************************************************************
|
| 635 |
+
// MACHINE DEFINITIONS
|
| 636 |
+
//**************************************************************************
|
| 637 |
+
|
| 638 |
+
void bionicc_state::bionicc(machine_config &config)
|
| 639 |
+
{
|
| 640 |
+
// Main CPU 68000CP10 @ 12 MHz
|
| 641 |
+
M68000(config, m_maincpu, 24_MHz_XTAL / 2);
|
| 642 |
+
m_maincpu->set_addrmap(AS_PROGRAM, &bionicc_state::main_map);
|
| 643 |
+
|
| 644 |
+
TIMER(config, "scantimer").configure_scanline(FUNC(bionicc_state::scanline), "screen", 0, 1);
|
| 645 |
+
|
| 646 |
+
// Audio CPU Z80 @ 3.579545 MHz (EXO3 C,B=GND, A=5V ==> Divisor 2^2)
|
| 647 |
+
Z80(config, m_audiocpu, 14.318181_MHz_XTAL / 4);
|
| 648 |
+
m_audiocpu->set_addrmap(AS_PROGRAM, &bionicc_state::sound_map);
|
| 649 |
+
|
| 650 |
+
// Protection MCU Intel C8751H-88 @ 6 MHz
|
| 651 |
+
I8751(config, m_mcu, 24_MHz_XTAL / 4);
|
| 652 |
+
m_mcu->set_addrmap(AS_IO, &bionicc_state::mcu_io);
|
| 653 |
+
m_mcu->port_in_cb<1>().set([this](){ return m_audiocpu_to_mcu; });
|
| 654 |
+
m_mcu->port_out_cb<1>().set([this](u8 data){ m_mcu_p1 = data; });
|
| 655 |
+
m_mcu->port_out_cb<3>().set(FUNC(bionicc_state::mcu_p3_w));
|
| 656 |
+
|
| 657 |
+
// video hardware
|
| 658 |
+
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
| 659 |
+
screen.set_raw(24_MHz_XTAL / 4, 384, 128, 0, 262, 22, 246); // hsync is 50..77, vsync is 257..259
|
| 660 |
+
screen.set_screen_update(FUNC(bionicc_state::screen_update));
|
| 661 |
+
screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising));
|
| 662 |
+
screen.set_palette(m_palette);
|
| 663 |
+
|
| 664 |
+
GFXDECODE(config, m_gfxdecode, m_palette, gfx_bionicc);
|
| 665 |
+
|
| 666 |
+
TIGEROAD_SPRITE(config, m_spritegen, 0);
|
| 667 |
+
m_spritegen->set_palette(m_palette);
|
| 668 |
+
m_spritegen->set_color_base(512); /* colors 512- 767 */
|
| 669 |
+
|
| 670 |
+
PALETTE(config, m_palette).set_format(2, &bionicc_state::RRRRGGGGBBBBIIII, 1024);
|
| 671 |
+
|
| 672 |
+
BUFFERED_SPRITERAM16(config, m_spriteram);
|
| 673 |
+
|
| 674 |
+
SPEAKER(config, "mono").front_center();
|
| 675 |
+
|
| 676 |
+
YM2151(config, "ymsnd", 14.318181_MHz_XTAL / 4).add_route(0, "mono", 0.60).add_route(1, "mono", 0.60);
|
| 677 |
+
}
|
| 678 |
+
|
| 679 |
+
|
| 680 |
+
//**************************************************************************
|
| 681 |
+
// ROM DEFINITIONS
|
| 682 |
+
//**************************************************************************
|
| 683 |
+
|
| 684 |
+
ROM_START( bionicc ) /* "Not for use in Japan" */
|
| 685 |
+
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
|
| 686 |
+
ROM_LOAD16_BYTE( "tse_02.1a", 0x00000, 0x10000, CRC(e4aeefaa) SHA1(77b6a2d4337bf350239abb50013d030d7c5c8640) ) /* 68000 code */
|
| 687 |
+
ROM_LOAD16_BYTE( "tse_04.1b", 0x00001, 0x10000, CRC(d0c8ec75) SHA1(04138c75ca3939604100b7e9fb451f7fceee67ca) ) /* 68000 code */
|
| 688 |
+
ROM_LOAD16_BYTE( "tse_03.2a", 0x20000, 0x10000, CRC(b2ac0a45) SHA1(d0933e74870efa9ea703251b30a56ef706ac24fe) ) /* 68000 code */
|
| 689 |
+
ROM_LOAD16_BYTE( "tse_05.2b", 0x20001, 0x10000, CRC(a79cb406) SHA1(50eada2f3e80c28dcb5529890d9b279c73f0115a) ) /* 68000 code */
|
| 690 |
+
|
| 691 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 692 |
+
ROM_LOAD( "ts_01b.4e", 0x00000, 0x8000, CRC(a9a6cafa) SHA1(55e0a0e6ca11e8e73339d5b4604e130031211291) )
|
| 693 |
+
|
| 694 |
+
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */
|
| 695 |
+
ROM_LOAD( "ts.2f", 0x0000, 0x1000, CRC(3ed7f0be) SHA1(db9e972065c8e60b5d74762dc3424271ea9524cb) ) /* from 'topsecrt' bootleg, but appears to be original */
|
| 696 |
+
|
| 697 |
+
ROM_REGION( 0x08000, "gfx1", 0 )
|
| 698 |
+
ROM_LOAD( "tsu_08.8l", 0x00000, 0x8000, CRC(9bf0b7a2) SHA1(1361335c3c2c8a9c6a7d99566048d8aac99e7c8f) ) /* VIDEORAM (text layer) tiles */
|
| 699 |
+
|
| 700 |
+
ROM_REGION( 0x10000, "gfx2", 0 )
|
| 701 |
+
ROM_LOAD( "tsu_07.5l", 0x00000, 0x8000, CRC(9469efa4) SHA1(53c70361e8d9e54825f61b87a10df42438aaf5b0) ) /* SCROLL2 Layer Tiles */
|
| 702 |
+
ROM_LOAD( "tsu_06.4l", 0x08000, 0x8000, CRC(40bf0eb4) SHA1(fcb186c31747e2c9872de01e34b3e713dc74df82) )
|
| 703 |
+
|
| 704 |
+
ROM_REGION( 0x40000, "gfx3", 0 )
|
| 705 |
+
ROM_LOAD( "ts_12.17f", 0x00000, 0x8000, CRC(e4b4619e) SHA1(3bec8399ffb28fd50ce6ae88d90b091eadf8bda1) ) /* SCROLL1 Layer Tiles */
|
| 706 |
+
ROM_LOAD( "ts_11.15f", 0x08000, 0x8000, CRC(ab30237a) SHA1(ea6c07df992ba48f9eca7daa4ea775faa94358d2) )
|
| 707 |
+
ROM_LOAD( "ts_17.17g", 0x10000, 0x8000, CRC(deb657e4) SHA1(b36b468f9bbb7a4937286230d3f6caa14c61d4dd) )
|
| 708 |
+
ROM_LOAD( "ts_16.15g", 0x18000, 0x8000, CRC(d363b5f9) SHA1(1dd3991d99db2d6bcbdb12879ba50a01fef95004) )
|
| 709 |
+
ROM_LOAD( "ts_13.18f", 0x20000, 0x8000, CRC(a8f5a004) SHA1(36ab0cb8ec9ce0519876f7461ccc5020c9c5b597) )
|
| 710 |
+
ROM_LOAD( "ts_18.18g", 0x28000, 0x8000, CRC(3b36948c) SHA1(d85fcc0265ba1729c587b046cc5a7ba6f25363dd) )
|
| 711 |
+
ROM_LOAD( "ts_23.18j", 0x30000, 0x8000, CRC(bbfbe58a) SHA1(9b1d5672b6f3c5c0952f8dcd0da71acc68a97a5e) )
|
| 712 |
+
ROM_LOAD( "ts_24.18k", 0x38000, 0x8000, CRC(f156e564) SHA1(a6cad05bcc6d9ded6294f9b5aa856d05641aed02) )
|
| 713 |
+
|
| 714 |
+
ROM_REGION( 0x40000, "spritegen", 0 )
|
| 715 |
+
ROM_LOAD32_BYTE( "tse_10.13f", 0x00003, 0x8000, CRC(d28eeacc) SHA1(8b4a655a48da276b07f3464c65743b13cec52bcb) ) /* Sprites */
|
| 716 |
+
ROM_LOAD32_BYTE( "tsu_09.11f", 0x20003, 0x8000, CRC(6a049292) SHA1(525c862061f426d679b539b6926af4c9f14b47b5) )
|
| 717 |
+
ROM_LOAD32_BYTE( "tse_15.13g", 0x00002, 0x8000, CRC(9b5593c0) SHA1(73c0acbb01fe69c2bd29dea11b6a223c8efb54a0) )
|
| 718 |
+
ROM_LOAD32_BYTE( "tsu_14.11g", 0x20002, 0x8000, CRC(46b2ad83) SHA1(21ebd5691a544323fdfcf330b9a37bbe0428e3e3) )
|
| 719 |
+
ROM_LOAD32_BYTE( "tse_20.13j", 0x00001, 0x8000, CRC(b03db778) SHA1(f72a93e73196c800c1893fd3b523394d702547dd) )
|
| 720 |
+
ROM_LOAD32_BYTE( "tsu_19.11j", 0x20001, 0x8000, CRC(b5c82722) SHA1(969f9159f7d59e4e4c9ef9ddbdc27cbfa531eabf) )
|
| 721 |
+
ROM_LOAD32_BYTE( "tse_22.17j", 0x00000, 0x8000, CRC(d4dedeb3) SHA1(e121057bb541f3f5c755963ca22832c3fe2637c0) )
|
| 722 |
+
ROM_LOAD32_BYTE( "tsu_21.15j", 0x20000, 0x8000, CRC(98777006) SHA1(bcc2058b639e9b71d16af05f63df298bcce91fdc) )
|
| 723 |
+
|
| 724 |
+
ROM_REGION( 0x0100, "proms", 0 )
|
| 725 |
+
ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */
|
| 726 |
+
ROM_END
|
| 727 |
+
|
| 728 |
+
ROM_START( bionicc1 ) /* "Not for use outside of USA or Canada" revision B */
|
| 729 |
+
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
|
| 730 |
+
ROM_LOAD16_BYTE( "tsu_02b.1a", 0x00000, 0x10000, CRC(cf965a0a) SHA1(ab88742a3225a0b82ee2dfef6ed0058d3e11c38c) ) /* 68000 code */
|
| 731 |
+
ROM_LOAD16_BYTE( "tsu_04b.1b", 0x00001, 0x10000, CRC(c9884bfb) SHA1(7d10cedff0a62847f8deb61a9611cc6661efb037) ) /* 68000 code */
|
| 732 |
+
ROM_LOAD16_BYTE( "tsu_03b.2a", 0x20000, 0x10000, CRC(4e157ae2) SHA1(cc02931376d22a7fcfc320e6fd4129e03a461a49) ) /* 68000 code */
|
| 733 |
+
ROM_LOAD16_BYTE( "tsu_05b.2b", 0x20001, 0x10000, CRC(e66ca0f9) SHA1(a503badf2fed38786d38c313d1dc315f3175d6de) ) /* 68000 code */
|
| 734 |
+
|
| 735 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 736 |
+
ROM_LOAD( "ts_01b.4e", 0x00000, 0x8000, CRC(a9a6cafa) SHA1(55e0a0e6ca11e8e73339d5b4604e130031211291) )
|
| 737 |
+
|
| 738 |
+
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */
|
| 739 |
+
ROM_LOAD( "ts.2f", 0x0000, 0x1000, CRC(3ed7f0be) SHA1(db9e972065c8e60b5d74762dc3424271ea9524cb) ) /* from 'topsecrt' bootleg, but appears to be original */
|
| 740 |
+
|
| 741 |
+
ROM_REGION( 0x08000, "gfx1", 0 )
|
| 742 |
+
ROM_LOAD( "tsu_08.8l", 0x00000, 0x8000, CRC(9bf0b7a2) SHA1(1361335c3c2c8a9c6a7d99566048d8aac99e7c8f) ) /* VIDEORAM (text layer) tiles */
|
| 743 |
+
|
| 744 |
+
ROM_REGION( 0x10000, "gfx2", 0 )
|
| 745 |
+
ROM_LOAD( "tsu_07.5l", 0x00000, 0x8000, CRC(9469efa4) SHA1(53c70361e8d9e54825f61b87a10df42438aaf5b0) ) /* SCROLL2 Layer Tiles */
|
| 746 |
+
ROM_LOAD( "tsu_06.4l", 0x08000, 0x8000, CRC(40bf0eb4) SHA1(fcb186c31747e2c9872de01e34b3e713dc74df82) )
|
| 747 |
+
|
| 748 |
+
ROM_REGION( 0x40000, "gfx3", 0 )
|
| 749 |
+
ROM_LOAD( "ts_12.17f", 0x00000, 0x8000, CRC(e4b4619e) SHA1(3bec8399ffb28fd50ce6ae88d90b091eadf8bda1) ) /* SCROLL1 Layer Tiles */
|
| 750 |
+
ROM_LOAD( "ts_11.15f", 0x08000, 0x8000, CRC(ab30237a) SHA1(ea6c07df992ba48f9eca7daa4ea775faa94358d2) )
|
| 751 |
+
ROM_LOAD( "ts_17.17g", 0x10000, 0x8000, CRC(deb657e4) SHA1(b36b468f9bbb7a4937286230d3f6caa14c61d4dd) )
|
| 752 |
+
ROM_LOAD( "ts_16.15g", 0x18000, 0x8000, CRC(d363b5f9) SHA1(1dd3991d99db2d6bcbdb12879ba50a01fef95004) )
|
| 753 |
+
ROM_LOAD( "ts_13.18f", 0x20000, 0x8000, CRC(a8f5a004) SHA1(36ab0cb8ec9ce0519876f7461ccc5020c9c5b597) )
|
| 754 |
+
ROM_LOAD( "ts_18.18g", 0x28000, 0x8000, CRC(3b36948c) SHA1(d85fcc0265ba1729c587b046cc5a7ba6f25363dd) )
|
| 755 |
+
ROM_LOAD( "ts_23.18j", 0x30000, 0x8000, CRC(bbfbe58a) SHA1(9b1d5672b6f3c5c0952f8dcd0da71acc68a97a5e) )
|
| 756 |
+
ROM_LOAD( "ts_24.18k", 0x38000, 0x8000, CRC(f156e564) SHA1(a6cad05bcc6d9ded6294f9b5aa856d05641aed02) )
|
| 757 |
+
|
| 758 |
+
ROM_REGION( 0x40000, "spritegen", 0 )
|
| 759 |
+
ROM_LOAD32_BYTE( "tsu_10.13f", 0x00003, 0x8000, CRC(f1180d02) SHA1(312626af48235a1f726ab596f296ef4739785ca0) ) /* Sprites */
|
| 760 |
+
ROM_LOAD32_BYTE( "tsu_09.11f", 0x20003, 0x8000, CRC(6a049292) SHA1(525c862061f426d679b539b6926af4c9f14b47b5) )
|
| 761 |
+
ROM_LOAD32_BYTE( "tsu_15.13g", 0x00002, 0x8000, CRC(ea912701) SHA1(106336c63a1c8a0b13236268bc533a8263285cad) )
|
| 762 |
+
ROM_LOAD32_BYTE( "tsu_14.11g", 0x20002, 0x8000, CRC(46b2ad83) SHA1(21ebd5691a544323fdfcf330b9a37bbe0428e3e3) )
|
| 763 |
+
ROM_LOAD32_BYTE( "tsu_20.13j", 0x00001, 0x8000, CRC(17857ad2) SHA1(9f45cea6e9ce82bfc9ee6896a30257d20fb38bca) )
|
| 764 |
+
ROM_LOAD32_BYTE( "tsu_19.11j", 0x20001, 0x8000, CRC(b5c82722) SHA1(969f9159f7d59e4e4c9ef9ddbdc27cbfa531eabf) )
|
| 765 |
+
ROM_LOAD32_BYTE( "tsu_22.17j", 0x00000, 0x8000, CRC(5ee1ae6a) SHA1(76ca53d847c940c4176d79ba49b0c10efd6342e8) )
|
| 766 |
+
ROM_LOAD32_BYTE( "tsu_21.15j", 0x20000, 0x8000, CRC(98777006) SHA1(bcc2058b639e9b71d16af05f63df298bcce91fdc) )
|
| 767 |
+
|
| 768 |
+
ROM_REGION( 0x0100, "proms", 0 )
|
| 769 |
+
ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */
|
| 770 |
+
ROM_END
|
| 771 |
+
|
| 772 |
+
ROM_START( bionicc2 ) /* "Not for use outside of USA or Canada" 1st release */
|
| 773 |
+
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
|
| 774 |
+
ROM_LOAD16_BYTE( "tsu_02.1a", 0x00000, 0x10000, CRC(f2528f08) SHA1(04c793837c86d83312fd44b46a6a94378c90113b) ) /* 68000 code */
|
| 775 |
+
ROM_LOAD16_BYTE( "tsu_04.1b", 0x00001, 0x10000, CRC(38b1c7e4) SHA1(14bf743726c214bd00177e7b410c272dd7ab3d3f) ) /* 68000 code */
|
| 776 |
+
ROM_LOAD16_BYTE( "tsu_03.2a", 0x20000, 0x10000, CRC(72c3b76f) SHA1(f7f71eae7617e3348b727775088b496e86d51e38) ) /* 68000 code */
|
| 777 |
+
ROM_LOAD16_BYTE( "tsu_05.2b", 0x20001, 0x10000, CRC(70621f83) SHA1(0a77c2827a5c50457d90ccc62e463508d83d2f20) ) /* 68000 code */
|
| 778 |
+
|
| 779 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 780 |
+
ROM_LOAD( "ts_01b.4e", 0x00000, 0x8000, CRC(a9a6cafa) SHA1(55e0a0e6ca11e8e73339d5b4604e130031211291) )
|
| 781 |
+
|
| 782 |
+
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */
|
| 783 |
+
ROM_LOAD( "ts.2f", 0x0000, 0x1000, CRC(3ed7f0be) SHA1(db9e972065c8e60b5d74762dc3424271ea9524cb) ) /* from 'topsecrt' bootleg, but appears to be original */
|
| 784 |
+
|
| 785 |
+
ROM_REGION( 0x08000, "gfx1", 0 )
|
| 786 |
+
ROM_LOAD( "tsu_08.8l", 0x00000, 0x8000, CRC(9bf0b7a2) SHA1(1361335c3c2c8a9c6a7d99566048d8aac99e7c8f) ) /* VIDEORAM (text layer) tiles */
|
| 787 |
+
|
| 788 |
+
ROM_REGION( 0x10000, "gfx2", 0 )
|
| 789 |
+
ROM_LOAD( "tsu_07.5l", 0x00000, 0x8000, CRC(9469efa4) SHA1(53c70361e8d9e54825f61b87a10df42438aaf5b0) ) /* SCROLL2 Layer Tiles */
|
| 790 |
+
ROM_LOAD( "tsu_06.4l", 0x08000, 0x8000, CRC(40bf0eb4) SHA1(fcb186c31747e2c9872de01e34b3e713dc74df82) )
|
| 791 |
+
|
| 792 |
+
ROM_REGION( 0x40000, "gfx3", 0 )
|
| 793 |
+
ROM_LOAD( "ts_12.17f", 0x00000, 0x8000, CRC(e4b4619e) SHA1(3bec8399ffb28fd50ce6ae88d90b091eadf8bda1) ) /* SCROLL1 Layer Tiles */
|
| 794 |
+
ROM_LOAD( "ts_11.15f", 0x08000, 0x8000, CRC(ab30237a) SHA1(ea6c07df992ba48f9eca7daa4ea775faa94358d2) )
|
| 795 |
+
ROM_LOAD( "ts_17.17g", 0x10000, 0x8000, CRC(deb657e4) SHA1(b36b468f9bbb7a4937286230d3f6caa14c61d4dd) )
|
| 796 |
+
ROM_LOAD( "ts_16.15g", 0x18000, 0x8000, CRC(d363b5f9) SHA1(1dd3991d99db2d6bcbdb12879ba50a01fef95004) )
|
| 797 |
+
ROM_LOAD( "ts_13.18f", 0x20000, 0x8000, CRC(a8f5a004) SHA1(36ab0cb8ec9ce0519876f7461ccc5020c9c5b597) )
|
| 798 |
+
ROM_LOAD( "ts_18.18g", 0x28000, 0x8000, CRC(3b36948c) SHA1(d85fcc0265ba1729c587b046cc5a7ba6f25363dd) )
|
| 799 |
+
ROM_LOAD( "ts_23.18j", 0x30000, 0x8000, CRC(bbfbe58a) SHA1(9b1d5672b6f3c5c0952f8dcd0da71acc68a97a5e) )
|
| 800 |
+
ROM_LOAD( "ts_24.18k", 0x38000, 0x8000, CRC(f156e564) SHA1(a6cad05bcc6d9ded6294f9b5aa856d05641aed02) )
|
| 801 |
+
|
| 802 |
+
ROM_REGION( 0x40000, "spritegen", 0 )
|
| 803 |
+
ROM_LOAD32_BYTE( "tsu_10.13f", 0x00003, 0x8000, CRC(f1180d02) SHA1(312626af48235a1f726ab596f296ef4739785ca0) ) /* Sprites */
|
| 804 |
+
ROM_LOAD32_BYTE( "tsu_09.11f", 0x20003, 0x8000, CRC(6a049292) SHA1(525c862061f426d679b539b6926af4c9f14b47b5) )
|
| 805 |
+
ROM_LOAD32_BYTE( "tsu_15.13g", 0x00002, 0x8000, CRC(ea912701) SHA1(106336c63a1c8a0b13236268bc533a8263285cad) )
|
| 806 |
+
ROM_LOAD32_BYTE( "tsu_14.11g", 0x20002, 0x8000, CRC(46b2ad83) SHA1(21ebd5691a544323fdfcf330b9a37bbe0428e3e3) )
|
| 807 |
+
ROM_LOAD32_BYTE( "tsu_20.13j", 0x00001, 0x8000, CRC(17857ad2) SHA1(9f45cea6e9ce82bfc9ee6896a30257d20fb38bca) )
|
| 808 |
+
ROM_LOAD32_BYTE( "tsu_19.11j", 0x20001, 0x8000, CRC(b5c82722) SHA1(969f9159f7d59e4e4c9ef9ddbdc27cbfa531eabf) )
|
| 809 |
+
ROM_LOAD32_BYTE( "tsu_22.17j", 0x00000, 0x8000, CRC(5ee1ae6a) SHA1(76ca53d847c940c4176d79ba49b0c10efd6342e8) )
|
| 810 |
+
ROM_LOAD32_BYTE( "tsu_21.15j", 0x20000, 0x8000, CRC(98777006) SHA1(bcc2058b639e9b71d16af05f63df298bcce91fdc) )
|
| 811 |
+
|
| 812 |
+
ROM_REGION( 0x0100, "proms", 0 )
|
| 813 |
+
ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */
|
| 814 |
+
ROM_END
|
| 815 |
+
|
| 816 |
+
ROM_START( topsecrt2 ) /* "Not for use in any other country but Japan" */
|
| 817 |
+
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
|
| 818 |
+
ROM_LOAD16_BYTE( "ts_02b.1a", 0x00000, 0x10000, CRC(0b84497f) SHA1(f7e9412d37a1e4b7a437d3f7bc5dc448c8a22079) ) /* 68000 code */
|
| 819 |
+
ROM_LOAD16_BYTE( "ts_04b.1b", 0x00001, 0x10000, CRC(9ab6de8d) SHA1(04445bc183364ebb6a8833a147b694234b509634) ) /* 68000 code */
|
| 820 |
+
ROM_LOAD16_BYTE( "ts_03b.2a", 0x20000, 0x10000, CRC(1b3f8a82) SHA1(2f9cad83b7bd10617bbd5172a1d31f41b194d3ac) ) /* 68000 code */
|
| 821 |
+
ROM_LOAD16_BYTE( "ts_05b.2b", 0x20001, 0x10000, CRC(962a89d8) SHA1(4aa5b0fd68a59ff74716253b0ba4c1933e92855b) ) /* 68000 code */
|
| 822 |
+
|
| 823 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 824 |
+
ROM_LOAD( "ts_01b.4e", 0x00000, 0x8000, CRC(a9a6cafa) SHA1(55e0a0e6ca11e8e73339d5b4604e130031211291) )
|
| 825 |
+
|
| 826 |
+
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */
|
| 827 |
+
ROM_LOAD( "ts.2f", 0x0000, 0x1000, CRC(3ed7f0be) SHA1(db9e972065c8e60b5d74762dc3424271ea9524cb) ) /* from 'topsecrt' bootleg, but appears to be original */
|
| 828 |
+
|
| 829 |
+
ROM_REGION( 0x08000, "gfx1", 0 )
|
| 830 |
+
ROM_LOAD( "ts_08.8l", 0x00000, 0x8000, CRC(96ad379e) SHA1(accd3a560b259c186bc28cdc004ed8de0b12f9d5) ) /* VIDEORAM (text layer) tiles */
|
| 831 |
+
|
| 832 |
+
ROM_REGION( 0x10000, "gfx2", 0 )
|
| 833 |
+
ROM_LOAD( "ts_07.5l", 0x00000, 0x8000, CRC(25cdf8b2) SHA1(316f6acc46878682dabeab12722e6a64504d23bd) ) /* SCROLL2 Layer Tiles */
|
| 834 |
+
ROM_LOAD( "ts_06.4l", 0x08000, 0x8000, CRC(314fb12d) SHA1(dab0519a49b64fe7a837b3c6383f6147e1ab6ffd) )
|
| 835 |
+
|
| 836 |
+
ROM_REGION( 0x40000, "gfx3", 0 )
|
| 837 |
+
ROM_LOAD( "ts_12.17f", 0x00000, 0x8000, CRC(e4b4619e) SHA1(3bec8399ffb28fd50ce6ae88d90b091eadf8bda1) ) /* SCROLL1 Layer Tiles */
|
| 838 |
+
ROM_LOAD( "ts_11.15f", 0x08000, 0x8000, CRC(ab30237a) SHA1(ea6c07df992ba48f9eca7daa4ea775faa94358d2) )
|
| 839 |
+
ROM_LOAD( "ts_17.17g", 0x10000, 0x8000, CRC(deb657e4) SHA1(b36b468f9bbb7a4937286230d3f6caa14c61d4dd) )
|
| 840 |
+
ROM_LOAD( "ts_16.15g", 0x18000, 0x8000, CRC(d363b5f9) SHA1(1dd3991d99db2d6bcbdb12879ba50a01fef95004) )
|
| 841 |
+
ROM_LOAD( "ts_13.18f", 0x20000, 0x8000, CRC(a8f5a004) SHA1(36ab0cb8ec9ce0519876f7461ccc5020c9c5b597) )
|
| 842 |
+
ROM_LOAD( "ts_18.18g", 0x28000, 0x8000, CRC(3b36948c) SHA1(d85fcc0265ba1729c587b046cc5a7ba6f25363dd) )
|
| 843 |
+
ROM_LOAD( "ts_23.18j", 0x30000, 0x8000, CRC(bbfbe58a) SHA1(9b1d5672b6f3c5c0952f8dcd0da71acc68a97a5e) )
|
| 844 |
+
ROM_LOAD( "ts_24.18k", 0x38000, 0x8000, CRC(f156e564) SHA1(a6cad05bcc6d9ded6294f9b5aa856d05641aed02) )
|
| 845 |
+
|
| 846 |
+
ROM_REGION( 0x40000, "spritegen", 0 )
|
| 847 |
+
ROM_LOAD32_BYTE( "ts_10.13f", 0x00003, 0x8000, CRC(c3587d05) SHA1(ad0898a5d4cf110783ef092bf8e65b6ef31a8ae0) ) /* Sprites */
|
| 848 |
+
ROM_LOAD32_BYTE( "ts_09.11f", 0x20003, 0x8000, CRC(6b63eef2) SHA1(5d1580db7f49c5994c2a08a36c2d05f3e246930d) )
|
| 849 |
+
ROM_LOAD32_BYTE( "ts_15.13g", 0x00002, 0x8000, CRC(db8cebb0) SHA1(1cc9eac14851cde95fb2d69d6f5ffb08bc9c0d93) )
|
| 850 |
+
ROM_LOAD32_BYTE( "ts_14.11g", 0x20002, 0x8000, CRC(e2e41abf) SHA1(d002d0d8fdbb9ec3e2eac218f6338f733953ca82) )
|
| 851 |
+
ROM_LOAD32_BYTE( "ts_20.13j", 0x00001, 0x8000, CRC(bfd1a695) SHA1(bf93486b96bfa1a1d5015189043b07e6130e6df1) )
|
| 852 |
+
ROM_LOAD32_BYTE( "ts_19.11j", 0x20001, 0x8000, CRC(928b669e) SHA1(98ea9d23a46b0700490fd2fa7ab4fb0988dd5ca6) )
|
| 853 |
+
ROM_LOAD32_BYTE( "ts_22.17j", 0x00000, 0x8000, CRC(3fe05d9a) SHA1(32e28ef03fb82785019d1ae8b3859215b5368c2b) )
|
| 854 |
+
ROM_LOAD32_BYTE( "ts_21.15j", 0x20000, 0x8000, CRC(27a9bb7c) SHA1(bb60332c0ecde4d7797960dec39c1079498175c3) )
|
| 855 |
+
|
| 856 |
+
ROM_REGION( 0x0100, "proms", 0 )
|
| 857 |
+
ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */
|
| 858 |
+
ROM_END
|
| 859 |
+
|
| 860 |
+
ROM_START( topsecrt ) /* "Not for use in any other country but Japan" */
|
| 861 |
+
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
|
| 862 |
+
ROM_LOAD16_BYTE( "ts_02.1a", 0x00000, 0x10000, CRC(b2fe1ddb) SHA1(892f19124993add96edabdba3aafeecc6668c5d9) ) /* 68000 code */
|
| 863 |
+
ROM_LOAD16_BYTE( "ts_04.1b", 0x00001, 0x10000, CRC(427a003d) SHA1(5a379fe2942e5565810939d5eb843003226222cc) ) /* 68000 code */
|
| 864 |
+
ROM_LOAD16_BYTE( "ts_03.2a", 0x20000, 0x10000, CRC(27f04bb6) SHA1(41d17b84b34dc8b2e5dfa67794a8df3e898b740b) ) /* 68000 code */
|
| 865 |
+
ROM_LOAD16_BYTE( "ts_05.2b", 0x20001, 0x10000, CRC(c01547b1) SHA1(563bf6be4f10f5e6eb5b562266accf168f62bf30) ) /* 68000 code */
|
| 866 |
+
|
| 867 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 868 |
+
ROM_LOAD( "ts_01.4e", 0x00000, 0x8000, CRC(8ea07917) SHA1(e9ace70d89482fc3669860450a41aacacbee9083) )
|
| 869 |
+
|
| 870 |
+
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */
|
| 871 |
+
ROM_LOAD( "ts.2f", 0x0000, 0x1000, CRC(3ed7f0be) SHA1(db9e972065c8e60b5d74762dc3424271ea9524cb) ) /* from 'topsecrt' bootleg, but appears to be original */
|
| 872 |
+
|
| 873 |
+
ROM_REGION( 0x08000, "gfx1", 0 )
|
| 874 |
+
ROM_LOAD( "ts_08.8l", 0x00000, 0x8000, CRC(96ad379e) SHA1(accd3a560b259c186bc28cdc004ed8de0b12f9d5) ) /* VIDEORAM (text layer) tiles */
|
| 875 |
+
|
| 876 |
+
ROM_REGION( 0x10000, "gfx2", 0 )
|
| 877 |
+
ROM_LOAD( "ts_07.5l", 0x00000, 0x8000, CRC(25cdf8b2) SHA1(316f6acc46878682dabeab12722e6a64504d23bd) ) /* SCROLL2 Layer Tiles */
|
| 878 |
+
ROM_LOAD( "ts_06.4l", 0x08000, 0x8000, CRC(314fb12d) SHA1(dab0519a49b64fe7a837b3c6383f6147e1ab6ffd) )
|
| 879 |
+
|
| 880 |
+
ROM_REGION( 0x40000, "gfx3", 0 )
|
| 881 |
+
ROM_LOAD( "ts_12.17f", 0x00000, 0x8000, CRC(e4b4619e) SHA1(3bec8399ffb28fd50ce6ae88d90b091eadf8bda1) ) /* SCROLL1 Layer Tiles */
|
| 882 |
+
ROM_LOAD( "ts_11.15f", 0x08000, 0x8000, CRC(ab30237a) SHA1(ea6c07df992ba48f9eca7daa4ea775faa94358d2) )
|
| 883 |
+
ROM_LOAD( "ts_17.17g", 0x10000, 0x8000, CRC(deb657e4) SHA1(b36b468f9bbb7a4937286230d3f6caa14c61d4dd) )
|
| 884 |
+
ROM_LOAD( "ts_16.15g", 0x18000, 0x8000, CRC(d363b5f9) SHA1(1dd3991d99db2d6bcbdb12879ba50a01fef95004) )
|
| 885 |
+
ROM_LOAD( "ts_13.18f", 0x20000, 0x8000, CRC(a8f5a004) SHA1(36ab0cb8ec9ce0519876f7461ccc5020c9c5b597) )
|
| 886 |
+
ROM_LOAD( "ts_18.18g", 0x28000, 0x8000, CRC(3b36948c) SHA1(d85fcc0265ba1729c587b046cc5a7ba6f25363dd) )
|
| 887 |
+
ROM_LOAD( "ts_23.18j", 0x30000, 0x8000, CRC(bbfbe58a) SHA1(9b1d5672b6f3c5c0952f8dcd0da71acc68a97a5e) )
|
| 888 |
+
ROM_LOAD( "ts_24.18k", 0x38000, 0x8000, CRC(f156e564) SHA1(a6cad05bcc6d9ded6294f9b5aa856d05641aed02) )
|
| 889 |
+
|
| 890 |
+
ROM_REGION( 0x40000, "spritegen", 0 )
|
| 891 |
+
ROM_LOAD32_BYTE( "ts_10.13f", 0x00003, 0x8000, CRC(c3587d05) SHA1(ad0898a5d4cf110783ef092bf8e65b6ef31a8ae0) ) /* Sprites */
|
| 892 |
+
ROM_LOAD32_BYTE( "ts_09.11f", 0x20003, 0x8000, CRC(6b63eef2) SHA1(5d1580db7f49c5994c2a08a36c2d05f3e246930d) )
|
| 893 |
+
ROM_LOAD32_BYTE( "ts_15.13g", 0x00002, 0x8000, CRC(db8cebb0) SHA1(1cc9eac14851cde95fb2d69d6f5ffb08bc9c0d93) )
|
| 894 |
+
ROM_LOAD32_BYTE( "ts_14.11g", 0x20002, 0x8000, CRC(e2e41abf) SHA1(d002d0d8fdbb9ec3e2eac218f6338f733953ca82) )
|
| 895 |
+
ROM_LOAD32_BYTE( "ts_20.13j", 0x00001, 0x8000, CRC(bfd1a695) SHA1(bf93486b96bfa1a1d5015189043b07e6130e6df1) )
|
| 896 |
+
ROM_LOAD32_BYTE( "ts_19.11j", 0x20001, 0x8000, CRC(928b669e) SHA1(98ea9d23a46b0700490fd2fa7ab4fb0988dd5ca6) )
|
| 897 |
+
ROM_LOAD32_BYTE( "ts_22.17j", 0x00000, 0x8000, CRC(3fe05d9a) SHA1(32e28ef03fb82785019d1ae8b3859215b5368c2b) )
|
| 898 |
+
ROM_LOAD32_BYTE( "ts_21.15j", 0x20000, 0x8000, CRC(27a9bb7c) SHA1(bb60332c0ecde4d7797960dec39c1079498175c3) )
|
| 899 |
+
|
| 900 |
+
ROM_REGION( 0x0100, "proms", 0 )
|
| 901 |
+
ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */
|
| 902 |
+
ROM_END
|
| 903 |
+
|
| 904 |
+
ROM_START( bioniccbl )
|
| 905 |
+
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
|
| 906 |
+
ROM_LOAD16_BYTE( "02l.bin", 0x00000, 0x10000, CRC(b2fe1ddb) SHA1(892f19124993add96edabdba3aafeecc6668c5d9) )
|
| 907 |
+
ROM_LOAD16_BYTE( "03l.bin", 0x00001, 0x10000, CRC(427a003d) SHA1(5a379fe2942e5565810939d5eb843003226222cc) )
|
| 908 |
+
ROM_LOAD16_BYTE( "02u.bin", 0x20000, 0x10000, CRC(27f04bb6) SHA1(41d17b84b34dc8b2e5dfa67794a8df3e898b740b) )
|
| 909 |
+
ROM_LOAD16_BYTE( "03u.bin", 0x20001, 0x10000, CRC(c01547b1) SHA1(563bf6be4f10f5e6eb5b562266accf168f62bf30) )
|
| 910 |
+
|
| 911 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 912 |
+
ROM_LOAD( "01.bin", 0x00000, 0x8000, CRC(8ea07917) SHA1(e9ace70d89482fc3669860450a41aacacbee9083) )
|
| 913 |
+
|
| 914 |
+
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */
|
| 915 |
+
ROM_LOAD( "d8751h.bin", 0x0000, 0x1000, CRC(3ed7f0be) SHA1(db9e972065c8e60b5d74762dc3424271ea9524cb) ) /* from 'topsecrt' bootleg, but appears to be original */
|
| 916 |
+
|
| 917 |
+
ROM_REGION( 0x08000, "gfx1", 0 )
|
| 918 |
+
ROM_LOAD( "06.bin", 0x00000, 0x4000, CRC(4e6b81d9) SHA1(052784d789b0c9193edf218fa1883b6e3b7df988) )
|
| 919 |
+
|
| 920 |
+
ROM_REGION( 0x10000, "gfx2", 0 )
|
| 921 |
+
ROM_LOAD( "05.bin", 0x00000, 0x8000, CRC(9bf8dc7f) SHA1(539a52087ed1f58839b6aa8c0b5ed249f4f4041e) )
|
| 922 |
+
ROM_LOAD( "04.bin", 0x08000, 0x8000, CRC(1b43bf63) SHA1(b80d675a07cebd83daf202d1c3d3f7c2dedf5c30) )
|
| 923 |
+
|
| 924 |
+
ROM_REGION( 0x40000, "gfx3", 0 )
|
| 925 |
+
ROM_LOAD( "ts_12.17f", 0x00000, 0x8000, CRC(e4b4619e) SHA1(3bec8399ffb28fd50ce6ae88d90b091eadf8bda1) ) // 09.bin
|
| 926 |
+
ROM_LOAD( "ts_11.15f", 0x08000, 0x8000, CRC(ab30237a) SHA1(ea6c07df992ba48f9eca7daa4ea775faa94358d2) ) // 08.bin
|
| 927 |
+
ROM_LOAD( "ts_17.17g", 0x10000, 0x8000, CRC(deb657e4) SHA1(b36b468f9bbb7a4937286230d3f6caa14c61d4dd) ) // 13.bin
|
| 928 |
+
ROM_LOAD( "ts_16.15g", 0x18000, 0x8000, CRC(d363b5f9) SHA1(1dd3991d99db2d6bcbdb12879ba50a01fef95004) ) // 12.bin
|
| 929 |
+
ROM_LOAD( "ts_13.18f", 0x20000, 0x8000, CRC(a8f5a004) SHA1(36ab0cb8ec9ce0519876f7461ccc5020c9c5b597) ) // 10.bin
|
| 930 |
+
ROM_LOAD( "ts_18.18g", 0x28000, 0x8000, CRC(3b36948c) SHA1(d85fcc0265ba1729c587b046cc5a7ba6f25363dd) ) // 14.bin
|
| 931 |
+
ROM_LOAD( "ts_23.18j", 0x30000, 0x8000, CRC(bbfbe58a) SHA1(9b1d5672b6f3c5c0952f8dcd0da71acc68a97a5e) ) // 17.bin
|
| 932 |
+
ROM_LOAD( "ts_24.18k", 0x38000, 0x8000, CRC(f156e564) SHA1(a6cad05bcc6d9ded6294f9b5aa856d05641aed02) ) // 18.bin
|
| 933 |
+
|
| 934 |
+
ROM_REGION( 0x40000, "spritegen", 0 )
|
| 935 |
+
ROM_LOAD32_BYTE( "07.bin", 0x00003, 0x10000, CRC(a0e78996) SHA1(810a54e657c0faaff6a8494acaf803d1d2151893) )
|
| 936 |
+
ROM_LOAD32_BYTE( "11.bin", 0x00002, 0x10000, CRC(37cb11c2) SHA1(af8c2ae4bb6e6c13ea3e8b7c96e5b18f1eb1d5a5) )
|
| 937 |
+
ROM_LOAD32_BYTE( "15.bin", 0x00001, 0x10000, CRC(4e0354ce) SHA1(d3256c891b44c6593b0b44c0d0a3e754ce78c1cb) )
|
| 938 |
+
ROM_LOAD32_BYTE( "16.bin", 0x00000, 0x10000, CRC(ac89e5cc) SHA1(aa7e065ece6d25b7e83fadcd22c09e1f7dc0b86f) )
|
| 939 |
+
|
| 940 |
+
ROM_REGION( 0x0100, "proms", 0 )
|
| 941 |
+
ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */
|
| 942 |
+
ROM_END
|
| 943 |
+
|
| 944 |
+
ROM_START( bioniccbl2 ) // only the 4 maincpu ROMs differ, they came from an original, not working, Capcom board, but the title screen is Bionic Commandos like a bootleg? The other ROMs match topsecrt
|
| 945 |
+
ROM_REGION( 0x40000, "maincpu", 0 ) /* 68000 code */
|
| 946 |
+
ROM_LOAD16_BYTE( "tsu_02.1a", 0x00000, 0x10000, CRC(c03d3424) SHA1(1d47185e10813c2792bda31c7dfbb40e88fd46ee) ) //sldc
|
| 947 |
+
ROM_LOAD16_BYTE( "tsu_04.1b", 0x00001, 0x10000, CRC(9f13eb9d) SHA1(b9c8cfc22a1d2adcc6a93e3e382b2126446c05aa) ) //sldc
|
| 948 |
+
ROM_LOAD16_BYTE( "3", 0x20000, 0x10000, CRC(a909ec2c) SHA1(7979480b5d82704f7d15546bda6af78316505f85) ) // the only ROM without an original sticker
|
| 949 |
+
ROM_LOAD16_BYTE( "tsu_05.1d", 0x20001, 0x10000, CRC(4e6b75ce) SHA1(44c3900b8dc9f375a7d6ed57c4025bc35771e29c) ) //sldc
|
| 950 |
+
|
| 951 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 952 |
+
ROM_LOAD( "ts_01.4e", 0x00000, 0x8000, CRC(8ea07917) SHA1(e9ace70d89482fc3669860450a41aacacbee9083) )
|
| 953 |
+
|
| 954 |
+
ROM_REGION( 0x1000, "mcu", 0 ) /* i8751 microcontroller */
|
| 955 |
+
ROM_LOAD( "d8751h.bin", 0x0000, 0x1000, CRC(3ed7f0be) SHA1(db9e972065c8e60b5d74762dc3424271ea9524cb) ) /* from 'topsecrt' bootleg, but appears to be original */
|
| 956 |
+
|
| 957 |
+
ROM_REGION( 0x08000, "gfx1", 0 )
|
| 958 |
+
ROM_LOAD( "ts_08.8l", 0x00000, 0x8000, CRC(96ad379e) SHA1(accd3a560b259c186bc28cdc004ed8de0b12f9d5) ) /* VIDEORAM (text layer) tiles */
|
| 959 |
+
|
| 960 |
+
ROM_REGION( 0x10000, "gfx2", 0 )
|
| 961 |
+
ROM_LOAD( "ts_07.5l", 0x00000, 0x8000, CRC(25cdf8b2) SHA1(316f6acc46878682dabeab12722e6a64504d23bd) ) /* SCROLL2 Layer Tiles */
|
| 962 |
+
ROM_LOAD( "ts_06.4l", 0x08000, 0x8000, CRC(314fb12d) SHA1(dab0519a49b64fe7a837b3c6383f6147e1ab6ffd) )
|
| 963 |
+
|
| 964 |
+
ROM_REGION( 0x40000, "gfx3", 0 )
|
| 965 |
+
ROM_LOAD( "ts_12.17f", 0x00000, 0x8000, CRC(e4b4619e) SHA1(3bec8399ffb28fd50ce6ae88d90b091eadf8bda1) ) /* SCROLL1 Layer Tiles */
|
| 966 |
+
ROM_LOAD( "ts_11.15f", 0x08000, 0x8000, CRC(ab30237a) SHA1(ea6c07df992ba48f9eca7daa4ea775faa94358d2) )
|
| 967 |
+
ROM_LOAD( "ts_17.17g", 0x10000, 0x8000, CRC(deb657e4) SHA1(b36b468f9bbb7a4937286230d3f6caa14c61d4dd) )
|
| 968 |
+
ROM_LOAD( "ts_16.15g", 0x18000, 0x8000, CRC(d363b5f9) SHA1(1dd3991d99db2d6bcbdb12879ba50a01fef95004) )
|
| 969 |
+
ROM_LOAD( "ts_13.18f", 0x20000, 0x8000, CRC(a8f5a004) SHA1(36ab0cb8ec9ce0519876f7461ccc5020c9c5b597) )
|
| 970 |
+
ROM_LOAD( "ts_18.18g", 0x28000, 0x8000, CRC(3b36948c) SHA1(d85fcc0265ba1729c587b046cc5a7ba6f25363dd) )
|
| 971 |
+
ROM_LOAD( "ts_23.18j", 0x30000, 0x8000, CRC(bbfbe58a) SHA1(9b1d5672b6f3c5c0952f8dcd0da71acc68a97a5e) )
|
| 972 |
+
ROM_LOAD( "ts_24.18k", 0x38000, 0x8000, CRC(f156e564) SHA1(a6cad05bcc6d9ded6294f9b5aa856d05641aed02) )
|
| 973 |
+
|
| 974 |
+
ROM_REGION( 0x40000, "spritegen", 0 )
|
| 975 |
+
ROM_LOAD32_BYTE( "tse_10.13f", 0x00003, 0x8000, CRC(d28eeacc) SHA1(8b4a655a48da276b07f3464c65743b13cec52bcb) ) /* Sprites */
|
| 976 |
+
ROM_LOAD32_BYTE( "tsu_09.11f", 0x20003, 0x8000, CRC(6a049292) SHA1(525c862061f426d679b539b6926af4c9f14b47b5) )
|
| 977 |
+
ROM_LOAD32_BYTE( "tse_15.13g", 0x00002, 0x8000, CRC(9b5593c0) SHA1(73c0acbb01fe69c2bd29dea11b6a223c8efb54a0) )
|
| 978 |
+
ROM_LOAD32_BYTE( "tsu_14.11g", 0x20002, 0x8000, CRC(46b2ad83) SHA1(21ebd5691a544323fdfcf330b9a37bbe0428e3e3) )
|
| 979 |
+
ROM_LOAD32_BYTE( "tse_20.13j", 0x00001, 0x8000, CRC(b03db778) SHA1(f72a93e73196c800c1893fd3b523394d702547dd) )
|
| 980 |
+
ROM_LOAD32_BYTE( "tsu_19.11j", 0x20001, 0x8000, CRC(b5c82722) SHA1(969f9159f7d59e4e4c9ef9ddbdc27cbfa531eabf) )
|
| 981 |
+
ROM_LOAD32_BYTE( "tse_22.17j", 0x00000, 0x8000, CRC(d4dedeb3) SHA1(e121057bb541f3f5c755963ca22832c3fe2637c0) )
|
| 982 |
+
ROM_LOAD32_BYTE( "tsu_21.15j", 0x20000, 0x8000, CRC(98777006) SHA1(bcc2058b639e9b71d16af05f63df298bcce91fdc) )
|
| 983 |
+
|
| 984 |
+
ROM_REGION( 0x0100, "proms", 0 )
|
| 985 |
+
ROM_LOAD( "63s141.18f", 0x0000, 0x0100, CRC(b58d0023) SHA1(e8a4a2e2951bf73b3d9eed6957e9ee1e61c9c58a) ) /* priority (not used), Labeled "TSB" */
|
| 986 |
+
ROM_END
|
| 987 |
+
|
| 988 |
+
|
| 989 |
+
//**************************************************************************
|
| 990 |
+
// SYSTEM DRIVERS
|
| 991 |
+
//**************************************************************************
|
| 992 |
+
|
| 993 |
+
// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS
|
| 994 |
+
GAME( 1987, bionicc, 0, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Bionic Commando (Euro)", MACHINE_SUPPORTS_SAVE )
|
| 995 |
+
GAME( 1987, bionicc1, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Bionic Commando (US set 1)", MACHINE_SUPPORTS_SAVE )
|
| 996 |
+
GAME( 1987, bionicc2, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Bionic Commando (US set 2)", MACHINE_SUPPORTS_SAVE )
|
| 997 |
+
GAME( 1987, topsecrt, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Top Secret (Japan, old revision)", MACHINE_SUPPORTS_SAVE )
|
| 998 |
+
GAME( 1987, topsecrt2, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "Capcom", "Top Secret (Japan, revision B)", MACHINE_SUPPORTS_SAVE )
|
| 999 |
+
GAME( 1987, bioniccbl, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "bootleg", "Bionic Commandos (bootleg, set 1)", MACHINE_SUPPORTS_SAVE )
|
| 1000 |
+
GAME( 1987, bioniccbl2, bionicc, bionicc, bionicc, bionicc_state, empty_init, ROT0, "bootleg", "Bionic Commandos (bootleg, set 2)", MACHINE_SUPPORTS_SAVE )
|
| 1001 |
+
|
| 1002 |
+
// there's also an undumped JP new revision on which there are no extra lives after 1 million points, plus other bug-fixes / changes (possibly topsecrt2 set?)
|
snapshots/jotego_jtcores_pr1100/cores/biocom/doc/brightness.ods
ADDED
|
Binary file (22.4 kB). View file
|
|
|
snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_bus.v
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 12-9-2019 */
|
| 18 |
+
|
| 19 |
+
// Bionic Commando: Main CPU
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
module jtbiocom_bus(
|
| 23 |
+
input [16:1] mcu_addr,
|
| 24 |
+
input [19:1] cpu_addr,
|
| 25 |
+
input mcu_wr,
|
| 26 |
+
input UDSWn,
|
| 27 |
+
input LDSWn,
|
| 28 |
+
input mcu_DMAn,
|
| 29 |
+
input [ 7:0] mcu_dout,
|
| 30 |
+
input [15:0] cpu_dout,
|
| 31 |
+
|
| 32 |
+
output reg [19:1] bus_addr,
|
| 33 |
+
output reg [15:0] bus_din,
|
| 34 |
+
output reg bus_UDSWn,
|
| 35 |
+
output reg bus_LDSWn
|
| 36 |
+
);
|
| 37 |
+
|
| 38 |
+
always @(*) begin
|
| 39 |
+
if ( !mcu_DMAn ) begin // MCU access
|
| 40 |
+
bus_addr = {3'b111, mcu_addr };
|
| 41 |
+
bus_din = { 8'hff, mcu_dout };
|
| 42 |
+
bus_UDSWn = 1'b1;
|
| 43 |
+
bus_LDSWn = ~mcu_wr;
|
| 44 |
+
end else begin // OBJ access
|
| 45 |
+
bus_addr = cpu_addr;
|
| 46 |
+
bus_din = cpu_dout;
|
| 47 |
+
bus_UDSWn = UDSWn;
|
| 48 |
+
bus_LDSWn = LDSWn;
|
| 49 |
+
end
|
| 50 |
+
end
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_colmix.v
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 22-9-2019 */
|
| 18 |
+
|
| 19 |
+
// Resistor values measured on PCB by Caius (Twitter @Caius63417737)
|
| 20 |
+
// Pin number 7 6 5 4 3 2 1
|
| 21 |
+
// R2R ladders: 4.7k-2.2K-1K-470-220-100 common net
|
| 22 |
+
// R9 470, R10 470, R11 470, R12 1K, R14 1K, R16 1K, R13 220, R15 220, R17 220
|
| 23 |
+
|
| 24 |
+
// Table of colours (voltages)
|
| 25 |
+
// Brightness
|
| 26 |
+
// 0 1 2 3 4 5 6 7
|
| 27 |
+
// Colour
|
| 28 |
+
// 0 0.000 0.194 0.412 0.606 0.881 1.075 1.293 1.487
|
| 29 |
+
// 1 0.088 0.282 0.500 0.694 0.969 1.163 1.381 1.575
|
| 30 |
+
// 2 0.194 0.388 0.606 0.800 1.075 1.268 1.487 1.681
|
| 31 |
+
// 3 0.282 0.476 0.694 0.888 1.163 1.357 1.575 1.769
|
| 32 |
+
// 4 0.412 0.606 0.825 1.018 1.293 1.487 1.706 1.899
|
| 33 |
+
// 5 0.500 0.694 0.913 1.107 1.381 1.575 1.794 1.987
|
| 34 |
+
// 6 0.606 0.800 1.018 1.212 1.487 1.681 1.899 2.093
|
| 35 |
+
// 7 0.694 0.888 1.107 1.300 1.575 1.769 1.987 2.181
|
| 36 |
+
// 8 0.881 1.075 1.293 1.487 1.762 1.956 2.174 2.368
|
| 37 |
+
// 9 0.969 1.163 1.381 1.575 1.850 2.044 2.262 2.456
|
| 38 |
+
// 10 1.075 1.268 1.487 1.681 1.956 2.149 2.368 2.562
|
| 39 |
+
// 11 1.163 1.357 1.575 1.769 2.044 2.237 2.456 2.650
|
| 40 |
+
// 12 1.293 1.487 1.706 1.899 2.174 2.368 2.586 2.780
|
| 41 |
+
// 13 1.381 1.575 1.794 1.987 2.262 2.456 2.674 2.868
|
| 42 |
+
// 14 1.487 1.681 1.899 2.093 2.368 2.562 2.780 2.974
|
| 43 |
+
// 15 1.575 1.769 1.987 2.181 2.456 2.650 2.868 3.062
|
| 44 |
+
//
|
| 45 |
+
// For a 5-bit value:
|
| 46 |
+
// Col 0 1 2 3 4 5 6 7
|
| 47 |
+
// 0 0 2 4 6 9 11 13 15
|
| 48 |
+
// 1 1 3 5 7 10 12 14 16
|
| 49 |
+
// 2 2 4 6 8 11 13 15 17
|
| 50 |
+
// 3 3 5 7 9 12 14 16 18
|
| 51 |
+
// 4 4 6 8 10 13 15 17 19
|
| 52 |
+
// 5 5 7 9 11 14 16 18 20
|
| 53 |
+
// 6 6 8 10 12 15 17 19 21
|
| 54 |
+
// 7 7 9 11 13 16 18 20 22
|
| 55 |
+
// 8 9 11 13 15 18 20 22 24
|
| 56 |
+
// 9 10 12 14 16 19 21 23 25
|
| 57 |
+
// 10 11 13 15 17 20 22 24 26
|
| 58 |
+
// 11 12 14 16 18 21 23 25 27
|
| 59 |
+
// 12 13 15 17 19 22 24 26 28
|
| 60 |
+
// 13 14 16 18 20 23 25 27 29
|
| 61 |
+
// 14 15 17 19 21 24 26 28 30
|
| 62 |
+
// 15 16 18 20 22 25 27 29 31
|
| 63 |
+
|
| 64 |
+
module jtbiocom_colmix(
|
| 65 |
+
input rst,
|
| 66 |
+
input clk,
|
| 67 |
+
input cen6 /* synthesis direct_enable = 1 */,
|
| 68 |
+
input cpu_cen,
|
| 69 |
+
// pixel input from generator modules
|
| 70 |
+
input [5:0] char_pxl, // character color code
|
| 71 |
+
input [7:0] scr1_pxl,
|
| 72 |
+
input [7:0] scr2_pxl,
|
| 73 |
+
input [7:0] obj_pxl,
|
| 74 |
+
input preLVBL,
|
| 75 |
+
input preLHBL,
|
| 76 |
+
output LHBL,
|
| 77 |
+
output LVBL,
|
| 78 |
+
// Priority PROM
|
| 79 |
+
input [7:0] prog_addr,
|
| 80 |
+
input prom_prio_we,
|
| 81 |
+
input [3:0] prom_din,
|
| 82 |
+
// CPU inteface
|
| 83 |
+
input [10:1] AB,
|
| 84 |
+
input col_uw,
|
| 85 |
+
input col_lw,
|
| 86 |
+
input [15:0] DB,
|
| 87 |
+
|
| 88 |
+
output [4:0] red,
|
| 89 |
+
output [4:0] green,
|
| 90 |
+
output [4:0] blue,
|
| 91 |
+
// Debug
|
| 92 |
+
input [3:0] gfx_en
|
| 93 |
+
);
|
| 94 |
+
|
| 95 |
+
parameter SIM_PRIO = "../../../rom/biocom/63s141.18f";
|
| 96 |
+
localparam BLANK_DLY=2;
|
| 97 |
+
|
| 98 |
+
reg [9:0] pxl_mux;
|
| 99 |
+
|
| 100 |
+
wire char_en = gfx_en[0];
|
| 101 |
+
wire scr1_en = gfx_en[1];
|
| 102 |
+
wire scr2_en = gfx_en[2];
|
| 103 |
+
wire obj_en = gfx_en[3];
|
| 104 |
+
|
| 105 |
+
wire [1:0] pre_prio;
|
| 106 |
+
reg [7:0] seladdr;
|
| 107 |
+
reg [1:0] prio, presel;
|
| 108 |
+
wire char_blank_n = ~&char_pxl[1:0];
|
| 109 |
+
wire preLBL;
|
| 110 |
+
|
| 111 |
+
always @(*) begin
|
| 112 |
+
seladdr[0] = scr2_en ? ~&scr2_pxl[3:0] : 1'b0;
|
| 113 |
+
seladdr[6:1] = scr1_en ? { scr1_pxl[7:6], scr1_pxl[3:0] } : 6'h3f;
|
| 114 |
+
seladdr[7] = obj_en ? ~&obj_pxl[3:0] : 1'b0;
|
| 115 |
+
prio = pre_prio | ( char_en ? {2{char_blank_n}} : 2'b0 );
|
| 116 |
+
end
|
| 117 |
+
|
| 118 |
+
always @(posedge clk) if(cen6) begin
|
| 119 |
+
case( prio )
|
| 120 |
+
2'b11: pxl_mux[7:0] <= { 2'b0, char_pxl };
|
| 121 |
+
2'b10: pxl_mux[7:0] <= obj_pxl;
|
| 122 |
+
2'b01: pxl_mux[7:0] <= { 2'b0, scr1_pxl[5:0] };
|
| 123 |
+
2'b00: pxl_mux[7:0] <= { 1'b0, scr2_pxl[6:0] };
|
| 124 |
+
endcase
|
| 125 |
+
pxl_mux[9:8] <= prio;
|
| 126 |
+
end
|
| 127 |
+
|
| 128 |
+
// Address mux
|
| 129 |
+
wire [3:0] pal_red, pal_green, pal_blue, pal_bright;
|
| 130 |
+
|
| 131 |
+
jtframe_dual_ram16 #(
|
| 132 |
+
.AW (10 ),
|
| 133 |
+
.SIMFILE_LO("pal_lo.bin"), // palrg.hex
|
| 134 |
+
.SIMFILE_HI("pal_hi.bin") // palbb.hex
|
| 135 |
+
) u_ram(
|
| 136 |
+
.clk0 ( clk ),
|
| 137 |
+
.clk1 ( clk ),
|
| 138 |
+
|
| 139 |
+
// CPU writes
|
| 140 |
+
.addr0 ( AB ),
|
| 141 |
+
.data0 ( DB ),
|
| 142 |
+
.we0 ( {col_uw, col_lw} ),
|
| 143 |
+
.q0 ( ),
|
| 144 |
+
|
| 145 |
+
// Video reads
|
| 146 |
+
.addr1 ( pxl_mux ),
|
| 147 |
+
.data1 ( ),
|
| 148 |
+
.we1 ( 2'b0 ),
|
| 149 |
+
.q1 ( {pal_red, pal_green, pal_blue, pal_bright } )
|
| 150 |
+
);
|
| 151 |
+
|
| 152 |
+
// Clock must be faster than 6MHz so pre_prio is ready for the next
|
| 153 |
+
// 6MHz clock cycle:
|
| 154 |
+
jtframe_prom #(.AW(8),.DW(2),.SIMFILE(SIM_PRIO)) u_pre_prio(
|
| 155 |
+
.clk ( clk ),
|
| 156 |
+
.cen ( 1'b1 ),
|
| 157 |
+
.data ( prom_din[1:0] ),
|
| 158 |
+
.rd_addr( seladdr ),
|
| 159 |
+
.wr_addr( prog_addr ),
|
| 160 |
+
.we ( prom_prio_we ),
|
| 161 |
+
.q ( pre_prio )
|
| 162 |
+
);
|
| 163 |
+
|
| 164 |
+
reg [4:0] pre_r, pre_g, pre_b;
|
| 165 |
+
|
| 166 |
+
always @(posedge clk) begin
|
| 167 |
+
if( ~preLBL ) begin
|
| 168 |
+
pre_r <= 5'd0;
|
| 169 |
+
pre_g <= 5'd0;
|
| 170 |
+
pre_b <= 5'd0;
|
| 171 |
+
end else begin
|
| 172 |
+
pre_r <= pal_bright[3] ? { pal_red, pal_red[3] } : { 1'b0, pal_red } + { 1'b0, pal_bright[2:0], pal_bright[2]};
|
| 173 |
+
pre_g <= pal_bright[3] ? { pal_green,pal_green[3] } : { 1'b0, pal_green } + { 1'b0, pal_bright[2:0], pal_bright[2]};
|
| 174 |
+
pre_b <= pal_bright[3] ? { pal_blue, pal_blue[3] } : { 1'b0, pal_blue } + { 1'b0, pal_bright[2:0], pal_bright[2]};
|
| 175 |
+
end
|
| 176 |
+
end
|
| 177 |
+
|
| 178 |
+
jtframe_blank #(.DLY(BLANK_DLY),.DW(15)) u_dly(
|
| 179 |
+
.clk ( clk ),
|
| 180 |
+
.pxl_cen ( cen6 ),
|
| 181 |
+
.preLHBL ( preLHBL ),
|
| 182 |
+
.preLVBL ( preLVBL ),
|
| 183 |
+
.LHBL ( LHBL ),
|
| 184 |
+
.LVBL ( LVBL ),
|
| 185 |
+
.preLBL ( preLBL ),
|
| 186 |
+
.rgb_in ( {pre_r, pre_g, pre_b}),
|
| 187 |
+
.rgb_out ( {red, green, blue } )
|
| 188 |
+
);
|
| 189 |
+
|
| 190 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_game.v
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 14-9-2019 */
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
module jtbiocom_game(
|
| 21 |
+
`include "jtframe_game_ports.inc" // see $JTFRAME/hdl/inc/jtframe_game_ports.inc
|
| 22 |
+
);
|
| 23 |
+
|
| 24 |
+
wire [ 8:0] V, H;
|
| 25 |
+
wire HINIT;
|
| 26 |
+
|
| 27 |
+
wire [13:1] cpu_AB;
|
| 28 |
+
wire char_cs, col_uw, col_lw, RnW;
|
| 29 |
+
wire flip;
|
| 30 |
+
wire [ 7:0] char_dout, scr1_dout, scr2_dout;
|
| 31 |
+
wire [15:0] cpu_dout;
|
| 32 |
+
wire rd, cpu_cen;
|
| 33 |
+
wire char_busy, scr1_busy, scr2_busy;
|
| 34 |
+
wire clk_mcu;
|
| 35 |
+
|
| 36 |
+
// MCU interface
|
| 37 |
+
wire [ 7:0] snd_din, snd_dout;
|
| 38 |
+
wire snd_mcu_wr, snd_mcu_rd;
|
| 39 |
+
wire mcu_brn;
|
| 40 |
+
wire [ 7:0] mcu_din, mcu_dout;
|
| 41 |
+
wire [16:1] mcu_addr;
|
| 42 |
+
wire mcu_wr, mcu_DMAn, mcu_DMAONn;
|
| 43 |
+
|
| 44 |
+
wire preLHBL, preLVBL,
|
| 45 |
+
LHBL_obj, LVBL_obj;
|
| 46 |
+
|
| 47 |
+
wire nc,ncb;
|
| 48 |
+
|
| 49 |
+
// sound
|
| 50 |
+
wire [7:0] snd_latch;
|
| 51 |
+
wire snd_nmi_n;
|
| 52 |
+
// OBJ
|
| 53 |
+
wire OKOUT, blcnten, obj_br, bus_ack;
|
| 54 |
+
wire [13:1] obj_AB; // 1 more bit than older games
|
| 55 |
+
wire [15:0] oram_dout;
|
| 56 |
+
|
| 57 |
+
wire prom_mcu_we, prom_prio_we;
|
| 58 |
+
|
| 59 |
+
wire scr1_cs, scr2_cs;
|
| 60 |
+
wire [15:0] scr1_hpos, scr1_vpos;
|
| 61 |
+
wire [ 8:0] scr2_hpos, scr2_vpos;
|
| 62 |
+
|
| 63 |
+
assign clk_mcu = clk24;
|
| 64 |
+
assign prom_mcu_we = prom_we && !ioctl_addr[12];
|
| 65 |
+
assign prom_prio_we = prom_we && ioctl_addr[12];
|
| 66 |
+
assign debug_view = 0;
|
| 67 |
+
assign dip_flip = ~flip;
|
| 68 |
+
|
| 69 |
+
always @* begin
|
| 70 |
+
post_addr = prog_addr;
|
| 71 |
+
if( ioctl_addr>=`JTFRAME_BA2_START && ioctl_addr<`JTFRAME_BA3_START ) begin
|
| 72 |
+
post_addr[5:1] = { prog_addr[4:1], prog_addr[5] };
|
| 73 |
+
end
|
| 74 |
+
end
|
| 75 |
+
|
| 76 |
+
jtgng_timer u_timer(
|
| 77 |
+
.clk ( clk ),
|
| 78 |
+
.cen6 ( pxl_cen ),
|
| 79 |
+
.V ( V ),
|
| 80 |
+
.H ( H ),
|
| 81 |
+
.Hinit ( HINIT ),
|
| 82 |
+
.LHBL ( preLHBL ),
|
| 83 |
+
.LHBL_obj ( LHBL_obj ),
|
| 84 |
+
.LVBL ( preLVBL ),
|
| 85 |
+
.LVBL_obj ( LVBL_obj ),
|
| 86 |
+
.HS ( HS ),
|
| 87 |
+
.VS ( VS ),
|
| 88 |
+
.Vinit ( )
|
| 89 |
+
);
|
| 90 |
+
|
| 91 |
+
jtbiocom_main u_main(
|
| 92 |
+
.rst ( rst ),
|
| 93 |
+
.clk ( clk ),
|
| 94 |
+
.cpu_cen ( cpu_cen ),
|
| 95 |
+
.cpu_cenb ( ),
|
| 96 |
+
// Timing
|
| 97 |
+
.flip ( flip ),
|
| 98 |
+
.V ( V ),
|
| 99 |
+
.LHBL ( LHBL ),
|
| 100 |
+
.LVBL ( LVBL ),
|
| 101 |
+
// sound
|
| 102 |
+
.snd_latch ( snd_latch ),
|
| 103 |
+
.snd_nmi_n ( snd_nmi_n ),
|
| 104 |
+
// CHAR
|
| 105 |
+
.char_dout ( { 8'hff, char_dout } ), // upper 8 bits unused
|
| 106 |
+
.cpu_dout ( cpu_dout ),
|
| 107 |
+
.char_cs ( char_cs ),
|
| 108 |
+
.char_busy ( char_busy ),
|
| 109 |
+
// SCROLL 1
|
| 110 |
+
.scr1_dout ( scr1_dout ),
|
| 111 |
+
.scr1_cs ( scr1_cs ),
|
| 112 |
+
.scr1_busy ( scr1_busy ),
|
| 113 |
+
.scr1_hpos ( scr1_hpos ),
|
| 114 |
+
.scr1_vpos ( scr1_vpos ),
|
| 115 |
+
.scr_bank ( ), // only Tiger Road
|
| 116 |
+
// SCROLL 2
|
| 117 |
+
.scr2_dout ( scr2_dout ),
|
| 118 |
+
.scr2_cs ( scr2_cs ),
|
| 119 |
+
.scr2_busy ( scr2_busy ),
|
| 120 |
+
.scr2_hpos ( scr2_hpos ),
|
| 121 |
+
.scr2_vpos ( scr2_vpos ),
|
| 122 |
+
// OBJ - bus sharing
|
| 123 |
+
.UDSWn ( ),
|
| 124 |
+
.LDSWn ( ),
|
| 125 |
+
.obj_AB ( obj_AB ),
|
| 126 |
+
.cpu_AB ( cpu_AB ),
|
| 127 |
+
.oram_dout ( oram_dout ),
|
| 128 |
+
.OKOUT ( OKOUT ),
|
| 129 |
+
.blcnten ( blcnten ),
|
| 130 |
+
.obj_br ( obj_br ),
|
| 131 |
+
.bus_ack ( bus_ack ),
|
| 132 |
+
.col_uw ( col_uw ),
|
| 133 |
+
.col_lw ( col_lw ),
|
| 134 |
+
// MCU interface
|
| 135 |
+
.mcu_cen ( mcu_cen ),
|
| 136 |
+
.mcu_brn ( mcu_brn ),
|
| 137 |
+
.mcu_din ( mcu_din ),
|
| 138 |
+
.mcu_dout ( mcu_dout ),
|
| 139 |
+
.mcu_addr ( mcu_addr ),
|
| 140 |
+
.mcu_wr ( mcu_wr ),
|
| 141 |
+
.mcu_DMAn ( mcu_DMAn ),
|
| 142 |
+
.mcu_DMAONn ( mcu_DMAONn ),
|
| 143 |
+
// ROM
|
| 144 |
+
.rom_cs ( main_cs ),
|
| 145 |
+
.rom_addr ( main_addr ),
|
| 146 |
+
.rom_data ( main_data ),
|
| 147 |
+
.rom_ok ( main_ok ),
|
| 148 |
+
// Cabinet input
|
| 149 |
+
.cab_1p ( cab_1p[1:0] ),
|
| 150 |
+
.coin ( coin[1:0] ),
|
| 151 |
+
.joystick1 ( joystick1[5:0]),
|
| 152 |
+
.joystick2 ( joystick2[5:0]),
|
| 153 |
+
|
| 154 |
+
.RnW ( RnW ),
|
| 155 |
+
// DIP switches
|
| 156 |
+
.service ( service ),
|
| 157 |
+
.dip_pause ( dip_pause ),
|
| 158 |
+
.dipsw_a ( dipsw[ 7:0] ),
|
| 159 |
+
.dipsw_b ( dipsw[15:8] )
|
| 160 |
+
);
|
| 161 |
+
|
| 162 |
+
jtbiocom_mcu u_mcu(
|
| 163 |
+
.rst ( rst24 ),
|
| 164 |
+
.clk ( clk_mcu ),
|
| 165 |
+
.rst_cpu ( rst ),
|
| 166 |
+
.clk_rom ( clk ),
|
| 167 |
+
.clk_cpu ( clk ),
|
| 168 |
+
.cen6a ( mcu_cen ), // 6 MHz
|
| 169 |
+
// Main CPU interface
|
| 170 |
+
.DMAONn ( mcu_DMAONn ),
|
| 171 |
+
.mcu_din ( mcu_din ),
|
| 172 |
+
.mcu_dout ( mcu_dout ),
|
| 173 |
+
.mcu_wr ( mcu_wr ), // always write to low bytes
|
| 174 |
+
.mcu_addr ( mcu_addr ),
|
| 175 |
+
.mcu_brn ( mcu_brn ), // RQBSQn
|
| 176 |
+
.DMAn ( mcu_DMAn ),
|
| 177 |
+
|
| 178 |
+
// Sound CPU interface
|
| 179 |
+
.snd_din ( snd_din ),
|
| 180 |
+
.snd_dout ( snd_dout ),
|
| 181 |
+
.snd_mcu_wr ( snd_mcu_wr ),
|
| 182 |
+
.snd_mcu_rd ( snd_mcu_rd ),
|
| 183 |
+
// ROM programming
|
| 184 |
+
.prog_addr ( prog_addr[11:0] ),
|
| 185 |
+
.prom_din ( prog_data[7:0] ),
|
| 186 |
+
.prom_we ( prom_mcu_we )
|
| 187 |
+
);
|
| 188 |
+
|
| 189 |
+
jtbiocom_sound #(.RECOVERY(1)) u_sound (
|
| 190 |
+
.rst ( rst ),
|
| 191 |
+
.clk ( clk ),
|
| 192 |
+
.cen_fm ( cen_fm ),
|
| 193 |
+
.cen_fm2 ( cen_fm2 ),
|
| 194 |
+
// Interface with main CPU
|
| 195 |
+
.snd_latch ( snd_latch ),
|
| 196 |
+
.nmi_n ( snd_nmi_n ),
|
| 197 |
+
// Interface with MCU
|
| 198 |
+
.snd_din ( snd_din ),
|
| 199 |
+
.snd_dout ( snd_dout ),
|
| 200 |
+
.snd_mcu_wr ( snd_mcu_wr ),
|
| 201 |
+
.snd_mcu_rd ( snd_mcu_rd ),
|
| 202 |
+
// ROM
|
| 203 |
+
.rom_addr ( snd_addr ),
|
| 204 |
+
.rom_data ( snd_data ),
|
| 205 |
+
.rom_cs ( snd_cs ),
|
| 206 |
+
.rom_ok ( snd_ok ),
|
| 207 |
+
// sound output
|
| 208 |
+
.fm_l ( fm_l ),
|
| 209 |
+
.fm_r ( fm_r )
|
| 210 |
+
);
|
| 211 |
+
|
| 212 |
+
jtbiocom_video #(
|
| 213 |
+
.OBJ_PAL (2'b10),
|
| 214 |
+
.PALETTE_PROM (1),
|
| 215 |
+
.SCRWIN (0)
|
| 216 |
+
) u_video(
|
| 217 |
+
.rst ( rst ),
|
| 218 |
+
.clk ( clk ),
|
| 219 |
+
.cen12 ( pxl2_cen ),
|
| 220 |
+
.cen8 ( video_cen8 ),
|
| 221 |
+
.cen6 ( pxl_cen ),
|
| 222 |
+
.cpu_cen ( cpu_cen ),
|
| 223 |
+
.cpu_AB ( cpu_AB ),
|
| 224 |
+
.V ( V ),
|
| 225 |
+
.H ( H ),
|
| 226 |
+
.RnW ( RnW ),
|
| 227 |
+
.flip ( flip ),
|
| 228 |
+
.cpu_dout ( cpu_dout ),
|
| 229 |
+
// CHAR
|
| 230 |
+
.char_cs ( char_cs ),
|
| 231 |
+
.char_dout ( char_dout ),
|
| 232 |
+
.char_addr ( char_addr ),
|
| 233 |
+
.char_data ( char_data ),
|
| 234 |
+
.char_busy ( char_busy ),
|
| 235 |
+
.char_ok ( char_ok ),
|
| 236 |
+
// SCROLL 1
|
| 237 |
+
.scr1_cs ( scr1_cs ),
|
| 238 |
+
.scr1_dout ( scr1_dout ),
|
| 239 |
+
.scr1_addr ( scr1_addr ),
|
| 240 |
+
.scr1_data ( scr1_data ),
|
| 241 |
+
.scr1_busy ( scr1_busy ),
|
| 242 |
+
.scr1_hpos ( scr1_hpos[9:0]),
|
| 243 |
+
.scr1_vpos ( scr1_vpos[9:0]),
|
| 244 |
+
.scr1_ok ( scr1_ok ),
|
| 245 |
+
// SCROLL 2
|
| 246 |
+
.scr2_cs ( scr2_cs ),
|
| 247 |
+
.scr2_dout ( scr2_dout ),
|
| 248 |
+
.scr2_addr ( scr2_addr ),
|
| 249 |
+
.scr2_data ( scr2_data ),
|
| 250 |
+
.scr2_busy ( scr2_busy ),
|
| 251 |
+
.scr2_hpos ( scr2_hpos ),
|
| 252 |
+
.scr2_vpos ( scr2_vpos ),
|
| 253 |
+
.scr2_ok ( scr2_ok ),
|
| 254 |
+
// OBJ
|
| 255 |
+
.HINIT ( HINIT ),
|
| 256 |
+
.obj_AB ( obj_AB ),
|
| 257 |
+
.oram_dout ( oram_dout[11:0] ),
|
| 258 |
+
.obj_addr ( obj_addr ),
|
| 259 |
+
.obj_data ( obj_data ),
|
| 260 |
+
.obj_cs ( obj_cs ),
|
| 261 |
+
.OKOUT ( OKOUT ),
|
| 262 |
+
.bus_req ( obj_br ), // Request bus
|
| 263 |
+
.bus_ack ( bus_ack ), // bus acknowledge
|
| 264 |
+
.blcnten ( blcnten ), // bus line counter enable
|
| 265 |
+
.col_uw ( col_uw ),
|
| 266 |
+
.col_lw ( col_lw ),
|
| 267 |
+
.obj_ok ( obj_ok ),
|
| 268 |
+
// PROMs
|
| 269 |
+
.prog_addr ( prog_addr[7:0]),
|
| 270 |
+
.prom_prio_we ( prom_prio_we ),
|
| 271 |
+
.prom_din ( prog_data[3:0]),
|
| 272 |
+
// Color Mix
|
| 273 |
+
.HS ( HS ),
|
| 274 |
+
.preLHBL ( preLHBL ),
|
| 275 |
+
.preLVBL ( preLVBL ),
|
| 276 |
+
.LHBL_obj ( LHBL_obj ),
|
| 277 |
+
.LVBL_obj ( LVBL_obj ),
|
| 278 |
+
.LHBL ( LHBL ),
|
| 279 |
+
.LVBL ( LVBL ),
|
| 280 |
+
.gfx_en ( gfx_en ),
|
| 281 |
+
// Pixel Output
|
| 282 |
+
.red ( red ),
|
| 283 |
+
.green ( green ),
|
| 284 |
+
.blue ( blue )
|
| 285 |
+
);
|
| 286 |
+
|
| 287 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_main.v
ADDED
|
@@ -0,0 +1,514 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 12-9-2019 */
|
| 18 |
+
|
| 19 |
+
// Bionic Commando: Main CPU
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
module jtbiocom_main(
|
| 23 |
+
input rst,
|
| 24 |
+
input clk,
|
| 25 |
+
output cpu_cen,
|
| 26 |
+
output cpu_cenb,
|
| 27 |
+
// Timing
|
| 28 |
+
output reg flip,
|
| 29 |
+
input [8:0] V,
|
| 30 |
+
input LHBL,
|
| 31 |
+
input LVBL,
|
| 32 |
+
// Sound
|
| 33 |
+
output reg [7:0] snd_latch,
|
| 34 |
+
//output reg [7:0] snd_hack,
|
| 35 |
+
output reg snd_nmi_n,
|
| 36 |
+
// Characters
|
| 37 |
+
input [15:0] char_dout,
|
| 38 |
+
output [15:0] cpu_dout,
|
| 39 |
+
output reg char_cs,
|
| 40 |
+
input char_busy,
|
| 41 |
+
// scroll
|
| 42 |
+
input [7:0] scr1_dout,
|
| 43 |
+
input [7:0] scr2_dout,
|
| 44 |
+
output reg scr1_cs,
|
| 45 |
+
output reg scr2_cs,
|
| 46 |
+
input scr1_busy,
|
| 47 |
+
input scr2_busy,
|
| 48 |
+
output reg [15:0] scr1_hpos,
|
| 49 |
+
output reg [15:0] scr1_vpos,
|
| 50 |
+
output reg [8:0] scr2_hpos,
|
| 51 |
+
output reg [8:0] scr2_vpos,
|
| 52 |
+
output reg scr_bank,
|
| 53 |
+
// cabinet I/O
|
| 54 |
+
input [5:0] joystick1,
|
| 55 |
+
input [5:0] joystick2,
|
| 56 |
+
input [1:0] cab_1p,
|
| 57 |
+
input [1:0] coin,
|
| 58 |
+
// BUS sharing
|
| 59 |
+
output UDSWn,
|
| 60 |
+
output LDSWn,
|
| 61 |
+
output [13:1] cpu_AB,
|
| 62 |
+
output [15:0] oram_dout,
|
| 63 |
+
input [13:1] obj_AB,
|
| 64 |
+
output RnW,
|
| 65 |
+
output reg OKOUT,
|
| 66 |
+
input obj_br, // Request bus
|
| 67 |
+
output bus_ack, // bus acknowledge for Object engine
|
| 68 |
+
input blcnten, // bus line counter enable
|
| 69 |
+
// MCU interface
|
| 70 |
+
input mcu_cen,
|
| 71 |
+
input mcu_brn,
|
| 72 |
+
input [ 7:0] mcu_dout,
|
| 73 |
+
output reg [ 7:0] mcu_din,
|
| 74 |
+
input [16:1] mcu_addr,
|
| 75 |
+
input mcu_wr,
|
| 76 |
+
input mcu_DMAn,
|
| 77 |
+
output reg mcu_DMAONn,
|
| 78 |
+
// Palette
|
| 79 |
+
output col_uw,
|
| 80 |
+
output col_lw,
|
| 81 |
+
// ROM access
|
| 82 |
+
output reg rom_cs,
|
| 83 |
+
output [17:1] rom_addr,
|
| 84 |
+
input [15:0] rom_data,
|
| 85 |
+
input rom_ok,
|
| 86 |
+
// DIP switches
|
| 87 |
+
input service,
|
| 88 |
+
input dip_pause,
|
| 89 |
+
input [7:0] dipsw_a,
|
| 90 |
+
input [7:0] dipsw_b
|
| 91 |
+
);
|
| 92 |
+
|
| 93 |
+
parameter GAME=0; // 0 for Bionic Commando, 1 for Tiger Road/F1Dream
|
| 94 |
+
`ifndef NOMAIN
|
| 95 |
+
wire [19:1] A;
|
| 96 |
+
wire [3:0] ncA;
|
| 97 |
+
|
| 98 |
+
`ifdef SIMULATION
|
| 99 |
+
wire [23:0] A_full = {ncA, A,1'b0};
|
| 100 |
+
`endif
|
| 101 |
+
wire [15:0] wram_dout;
|
| 102 |
+
reg [15:0] cpu_din;
|
| 103 |
+
wire BRn, BGACKn, BGn;
|
| 104 |
+
reg io_cs, ram_cs, obj_cs, col_cs;
|
| 105 |
+
reg scr1hpos_cs, scr2hpos_cs, scr1vpos_cs, scr2vpos_cs;
|
| 106 |
+
wire ASn;
|
| 107 |
+
|
| 108 |
+
wire mreq_n, rfsh_n, busak_n;
|
| 109 |
+
reg BERRn;
|
| 110 |
+
|
| 111 |
+
// high during DMA transfer
|
| 112 |
+
wire UDSn, LDSn;
|
| 113 |
+
|
| 114 |
+
assign UDSWn = RnW | UDSn;
|
| 115 |
+
assign LDSWn = RnW | LDSn;
|
| 116 |
+
assign col_uw = col_cs & ~UDSWn;
|
| 117 |
+
assign col_lw = col_cs & ~LDSWn;
|
| 118 |
+
|
| 119 |
+
wire CPUbus = !blcnten && mcu_DMAn; // main CPU in control of the bus
|
| 120 |
+
wire [16:1] mcu_addr_s;
|
| 121 |
+
wire [ 7:0] mcu_dout_s;
|
| 122 |
+
wire mcu_wr_s;
|
| 123 |
+
wire [16:1] Aeff = CPUbus ? A[16:1] : mcu_addr_s;
|
| 124 |
+
|
| 125 |
+
jtframe_sync #(.W(16+8+1)) u_mcus(
|
| 126 |
+
.clk_in ( 1'b0 ),
|
| 127 |
+
.clk_out( clk ),
|
| 128 |
+
.raw ( {mcu_addr, mcu_dout, mcu_wr } ),
|
| 129 |
+
.sync ( {mcu_addr_s, mcu_dout_s, mcu_wr_s } )
|
| 130 |
+
);
|
| 131 |
+
|
| 132 |
+
always @(*) begin
|
| 133 |
+
ram_cs = 1'b0;
|
| 134 |
+
obj_cs = 1'b0;
|
| 135 |
+
col_cs = 1'b0;
|
| 136 |
+
io_cs = 1'b0;
|
| 137 |
+
char_cs = 1'b0;
|
| 138 |
+
scr1_cs = 1'b0;
|
| 139 |
+
scr2_cs = 1'b0;
|
| 140 |
+
OKOUT = 1'b0;
|
| 141 |
+
mcu_DMAONn = 1'b1; // for once, I leave the original active low setting
|
| 142 |
+
scr1vpos_cs = 1'b0;
|
| 143 |
+
scr1hpos_cs = 1'b0;
|
| 144 |
+
scr2vpos_cs = 1'b0;
|
| 145 |
+
scr2hpos_cs = 1'b0;
|
| 146 |
+
|
| 147 |
+
// The address decoder is shared with the MCU like the original design
|
| 148 |
+
if( !CPUbus || (A[19:17]==3'b111 && !ASn) )
|
| 149 |
+
case( Aeff[16:14] ) // 111X
|
| 150 |
+
3'd0: obj_cs = 1'b1; // E_0000
|
| 151 |
+
3'd1: begin
|
| 152 |
+
io_cs = 1'b1; // E_4000
|
| 153 |
+
if( GAME==1 ) mcu_DMAONn = !(A[1] && !RnW);// E_4002
|
| 154 |
+
end
|
| 155 |
+
3'd2: if( !UDSWn && !LDSWn && (Aeff[4]^GAME==1)) begin // E_8010
|
| 156 |
+
// scrpt_cs
|
| 157 |
+
// $display("SCRPTn");
|
| 158 |
+
case( Aeff[3:1]) // SCRPTn in the schematics
|
| 159 |
+
0: scr1hpos_cs = 1;
|
| 160 |
+
1: scr1vpos_cs = 1;
|
| 161 |
+
2: scr2hpos_cs = 1; // Unused if GAME==1
|
| 162 |
+
3: scr2vpos_cs = 1;
|
| 163 |
+
4: if( GAME==0 ) OKOUT = 1;
|
| 164 |
+
5: if( GAME==0 ) mcu_DMAONn = 0; // to MCU
|
| 165 |
+
7: if( GAME==1 ) OKOUT = 1;
|
| 166 |
+
default:;
|
| 167 |
+
endcase
|
| 168 |
+
end
|
| 169 |
+
3'd3: char_cs = 1'b1; // E_C000
|
| 170 |
+
3'd4: scr1_cs = GAME==0; // F_0000
|
| 171 |
+
3'd5: scr2_cs = GAME==0; // F_4000
|
| 172 |
+
3'd6: col_cs = 1'b1; // F_8000
|
| 173 |
+
3'd7: ram_cs = 1'b1; // F_C000
|
| 174 |
+
endcase
|
| 175 |
+
end
|
| 176 |
+
|
| 177 |
+
always @(*) begin
|
| 178 |
+
rom_cs = 1'b0;
|
| 179 |
+
BERRn = 1'b1;
|
| 180 |
+
if( CPUbus ) begin
|
| 181 |
+
case(A[19:18])
|
| 182 |
+
2'd0: rom_cs = 1'b1;
|
| 183 |
+
2'd1, 2'd2: BERRn = ASn;
|
| 184 |
+
default:;
|
| 185 |
+
endcase
|
| 186 |
+
end
|
| 187 |
+
end
|
| 188 |
+
|
| 189 |
+
// SCROLL H/V POSITION
|
| 190 |
+
always @(posedge clk, posedge rst) begin
|
| 191 |
+
if( rst ) begin
|
| 192 |
+
scr1_hpos <= 0;
|
| 193 |
+
scr1_vpos <= 0;
|
| 194 |
+
scr2_hpos <= 0;
|
| 195 |
+
scr2_vpos <= 0;
|
| 196 |
+
end else if(cpu_cen) begin
|
| 197 |
+
if( GAME==0 ) begin
|
| 198 |
+
if( scr1hpos_cs && !RnW) scr1_hpos <= {6'd0, cpu_dout[9:0]};
|
| 199 |
+
if( scr1vpos_cs && !RnW) scr1_vpos <= {6'd0, cpu_dout[9:0]};
|
| 200 |
+
if( scr2hpos_cs && !RnW) scr2_hpos <= cpu_dout[8:0];
|
| 201 |
+
if( scr2vpos_cs && !RnW) scr2_vpos <= cpu_dout[8:0];
|
| 202 |
+
end else begin
|
| 203 |
+
scr2_hpos <= 0;
|
| 204 |
+
scr2_vpos <= 0;
|
| 205 |
+
if( scr1hpos_cs ) begin
|
| 206 |
+
if(!UDSWn) scr1_hpos[15:8] <= cpu_dout[15:8];
|
| 207 |
+
if(!LDSWn) scr1_hpos[ 7:0] <= cpu_dout[ 7:0];
|
| 208 |
+
end
|
| 209 |
+
if( scr1vpos_cs ) begin
|
| 210 |
+
if(!UDSWn) scr1_vpos[15:8] <= cpu_dout[15:8];
|
| 211 |
+
if(!LDSWn) scr1_vpos[ 7:0] <= cpu_dout[ 7:0];
|
| 212 |
+
end
|
| 213 |
+
end
|
| 214 |
+
end
|
| 215 |
+
end
|
| 216 |
+
|
| 217 |
+
// special registers
|
| 218 |
+
always @(posedge clk) begin
|
| 219 |
+
if( rst ) begin
|
| 220 |
+
flip <= 1'b0;
|
| 221 |
+
snd_latch <= 8'b0;
|
| 222 |
+
snd_nmi_n <= 1'b1;
|
| 223 |
+
scr_bank <= 1'b0;
|
| 224 |
+
end else if(cpu_cen) begin
|
| 225 |
+
snd_nmi_n <= 1'b1;
|
| 226 |
+
if( !UDSWn && io_cs)
|
| 227 |
+
case( { A[1]} )
|
| 228 |
+
1'b0: begin
|
| 229 |
+
flip <= cpu_dout[GAME==0 ? 8 : 1];
|
| 230 |
+
scr_bank <= cpu_dout[2];
|
| 231 |
+
end
|
| 232 |
+
1'b1: begin
|
| 233 |
+
// sound latch is updated here on the actual PCB
|
| 234 |
+
// however, the main CPU software never writes a
|
| 235 |
+
// value here. This is only used to trigger the NMI
|
| 236 |
+
// in practice
|
| 237 |
+
snd_latch <= GAME==0 ? cpu_dout[7:0] : // real PCB behaviour
|
| 238 |
+
cpu_dout[15:8];
|
| 239 |
+
snd_nmi_n <= 1'b0; // only Biocom ?
|
| 240 |
+
end
|
| 241 |
+
endcase
|
| 242 |
+
// Hack to capture the sound code that is sent to the MCU
|
| 243 |
+
// if( !LDSWn && work_A==13'h1ffc && ram_cs)
|
| 244 |
+
// snd_hack <= cpu_dout[7:0]; // hack
|
| 245 |
+
end
|
| 246 |
+
end
|
| 247 |
+
|
| 248 |
+
reg [15:0] cabinet_input;
|
| 249 |
+
|
| 250 |
+
always @(posedge clk) begin
|
| 251 |
+
if( GAME==0 ) // Bionic Commando:
|
| 252 |
+
cabinet_input = Aeff[1] ?
|
| 253 |
+
{ dipsw_b, dipsw_a } :
|
| 254 |
+
{ coin[0], coin[1], // COINS
|
| 255 |
+
cab_1p[0], cab_1p[1], // START
|
| 256 |
+
{ joystick1[3:0], joystick1[4], joystick1[5]}, // 2 buttons
|
| 257 |
+
{ joystick2[3:0], joystick2[4], joystick2[5]} };
|
| 258 |
+
else // Tiger Road:
|
| 259 |
+
case( A[2:1] )
|
| 260 |
+
2'b00: cabinet_input <= {
|
| 261 |
+
2'b11, joystick2[5:0],
|
| 262 |
+
2'b11, joystick1[5:0] };
|
| 263 |
+
2'b01: cabinet_input <=
|
| 264 |
+
{ coin,
|
| 265 |
+
service,
|
| 266 |
+
2'b11,
|
| 267 |
+
~LVBL, cab_1p, 8'hff };
|
| 268 |
+
2'b10: cabinet_input <= { dipsw_a, dipsw_b };
|
| 269 |
+
default:;
|
| 270 |
+
endcase
|
| 271 |
+
end
|
| 272 |
+
|
| 273 |
+
/////////////////////////////////////////////////////
|
| 274 |
+
// MCU DMA data output mux
|
| 275 |
+
always @(posedge clk) begin
|
| 276 |
+
mcu_din <= cpu_din[7:0];
|
| 277 |
+
end
|
| 278 |
+
|
| 279 |
+
/////////////////////////////////////////////////////
|
| 280 |
+
// Work RAM, 16kB
|
| 281 |
+
wire [1:0] wram_dsn = {2{ram_cs}} & ~{UDSWn, LDSWn};
|
| 282 |
+
wire wmcu_wr = mcu_wr_s & ram_cs;
|
| 283 |
+
|
| 284 |
+
jtframe_dual_ram16 #(.AW(13)) u_work_ram (
|
| 285 |
+
.clk0 ( clk ),
|
| 286 |
+
.clk1 ( clk ),
|
| 287 |
+
// Port 0: CPU
|
| 288 |
+
.data0 ( cpu_dout ),
|
| 289 |
+
.addr0 ( Aeff[13:1] ),
|
| 290 |
+
.we0 ( wram_dsn ),
|
| 291 |
+
.q0 ( wram_dout ),
|
| 292 |
+
// Port 1: MCU
|
| 293 |
+
.data1 ( { 8'hff, mcu_dout_s} ) ,
|
| 294 |
+
.addr1 ( mcu_addr_s[13:1] ),
|
| 295 |
+
.we1 ( {1'b0,wmcu_wr} ),
|
| 296 |
+
.q1 ( )
|
| 297 |
+
);
|
| 298 |
+
|
| 299 |
+
/////////////////////////////////////////////////////
|
| 300 |
+
// Object RAM, 4kB
|
| 301 |
+
assign cpu_AB = Aeff[13:1];
|
| 302 |
+
|
| 303 |
+
wire [10:0] oram_addr = blcnten ? obj_AB[11:1] : Aeff[11:1];
|
| 304 |
+
wire [ 1:0] oram_dsn = {2{obj_cs}} & ~{UDSWn, LDSWn};
|
| 305 |
+
wire omcu_wr = mcu_wr_s & obj_cs;
|
| 306 |
+
|
| 307 |
+
jtframe_dual_ram16 #(.AW(11)) u_obj_ram (
|
| 308 |
+
.clk0 ( clk ),
|
| 309 |
+
.clk1 ( clk ),
|
| 310 |
+
// Port 0: CPU or Object DMA
|
| 311 |
+
.data0 ( cpu_dout ),
|
| 312 |
+
.addr0 ( oram_addr ),
|
| 313 |
+
.we0 ( oram_dsn ),
|
| 314 |
+
.q0 ( oram_dout ),
|
| 315 |
+
// Port 1: MCU
|
| 316 |
+
.data1 ( { 8'hff, mcu_dout_s} ) ,
|
| 317 |
+
.addr1 ( mcu_addr_s[11:1] ),
|
| 318 |
+
.we1 ( {1'b0,omcu_wr} ),
|
| 319 |
+
.q1 ( )
|
| 320 |
+
);
|
| 321 |
+
|
| 322 |
+
// Data bus input
|
| 323 |
+
reg [ 7:0] video_dout;
|
| 324 |
+
wire video_cs = char_cs | scr2_cs | scr1_cs;
|
| 325 |
+
reg [15:0] owram_dout;
|
| 326 |
+
wire owram_cs = obj_cs | ram_cs;
|
| 327 |
+
|
| 328 |
+
always @(posedge clk) begin
|
| 329 |
+
owram_dout <= obj_cs ? oram_dout : wram_dout;
|
| 330 |
+
// GAME==0 uses this:
|
| 331 |
+
case( {scr2_cs, scr1_cs} )
|
| 332 |
+
2'b10: video_dout <= scr2_dout;
|
| 333 |
+
2'b01: video_dout <= scr1_dout;
|
| 334 |
+
default: video_dout <= char_dout[7:0];
|
| 335 |
+
endcase
|
| 336 |
+
end
|
| 337 |
+
|
| 338 |
+
always @(*)
|
| 339 |
+
case( {owram_cs, video_cs, io_cs} )
|
| 340 |
+
3'b100: cpu_din = owram_dout;
|
| 341 |
+
3'b010: cpu_din = GAME==1 ? char_dout : { 8'hff, video_dout };
|
| 342 |
+
3'b001: cpu_din = cabinet_input;
|
| 343 |
+
default: cpu_din = rom_data;
|
| 344 |
+
endcase
|
| 345 |
+
|
| 346 |
+
assign rom_addr = A[17:1];
|
| 347 |
+
|
| 348 |
+
// DTACKn generation
|
| 349 |
+
wire inta_n;
|
| 350 |
+
reg [7:0] io_busy_cnt;
|
| 351 |
+
wire io_busy = io_busy_cnt[0];
|
| 352 |
+
wire bus_cs = |{ rom_cs, scr1_cs, scr2_cs, char_cs };
|
| 353 |
+
// io_busy must be bus_legit or it will halt the machine
|
| 354 |
+
wire bus_legit = |{scr1_busy, scr2_busy, char_busy, io_busy};
|
| 355 |
+
wire bus_busy = |{ rom_cs & ~rom_ok, bus_legit };
|
| 356 |
+
|
| 357 |
+
// DTACK is also held down during IO access in order to make
|
| 358 |
+
// the NMI request to the Z80 CPU long enough
|
| 359 |
+
// If the Z80 misses these requests it will not play any sound at all.
|
| 360 |
+
always @(posedge clk, posedge rst) begin : io_busy_gen
|
| 361 |
+
reg last_iocs;
|
| 362 |
+
if( rst ) begin
|
| 363 |
+
io_busy_cnt <= 8'd0;
|
| 364 |
+
last_iocs <= 1'b0;
|
| 365 |
+
end else if(cpu_cen) begin
|
| 366 |
+
last_iocs <= io_cs;
|
| 367 |
+
if( io_cs && !last_iocs )
|
| 368 |
+
io_busy_cnt <= ~8'd0;
|
| 369 |
+
else
|
| 370 |
+
io_busy_cnt <= io_busy_cnt>>1;
|
| 371 |
+
end
|
| 372 |
+
end
|
| 373 |
+
|
| 374 |
+
wire DTACKn;
|
| 375 |
+
|
| 376 |
+
localparam [3:0] DIV_NUM= GAME==0 ? 4'd1 : 4'd5;
|
| 377 |
+
localparam [4:0] DIV_DEN= GAME==0 ? 5'd4 : 5'd24;
|
| 378 |
+
|
| 379 |
+
jtframe_68kdtack_cen u_dtack( // cen = 12 or 10 MHz
|
| 380 |
+
.rst ( rst ),
|
| 381 |
+
.clk ( clk ),
|
| 382 |
+
.num ( DIV_NUM ),
|
| 383 |
+
.den ( DIV_DEN ),
|
| 384 |
+
.cpu_cen ( cpu_cen ),
|
| 385 |
+
.cpu_cenb ( cpu_cenb ),
|
| 386 |
+
.bus_cs ( bus_cs ),
|
| 387 |
+
.bus_busy ( bus_busy ),
|
| 388 |
+
.bus_legit ( bus_legit ),
|
| 389 |
+
.ASn ( ASn ),
|
| 390 |
+
.DSn ({UDSn,LDSn} ),
|
| 391 |
+
.DTACKn ( DTACKn ),
|
| 392 |
+
.wait2 ( 1'b0 ),
|
| 393 |
+
.wait3 ( 1'b0 ),
|
| 394 |
+
// Unused
|
| 395 |
+
.fave ( ),
|
| 396 |
+
.fworst ( )
|
| 397 |
+
);
|
| 398 |
+
|
| 399 |
+
// interrupt generation
|
| 400 |
+
reg int1, int2;
|
| 401 |
+
wire [2:0] FC;
|
| 402 |
+
assign inta_n = ~&{ FC[2], FC[1], FC[0], ~ASn }; // interrupt ack.
|
| 403 |
+
|
| 404 |
+
always @(posedge clk, posedge rst) begin : int_gen
|
| 405 |
+
reg last_LVBL, last_V256;
|
| 406 |
+
if( rst ) begin
|
| 407 |
+
int1 <= 1'b1;
|
| 408 |
+
int2 <= 1'b1;
|
| 409 |
+
end else begin
|
| 410 |
+
last_LVBL <= LVBL;
|
| 411 |
+
last_V256 <= V[8];
|
| 412 |
+
|
| 413 |
+
if( !inta_n ) begin
|
| 414 |
+
int1 <= 1'b1;
|
| 415 |
+
int2 <= 1'b1;
|
| 416 |
+
end
|
| 417 |
+
else if(dip_pause) begin
|
| 418 |
+
if( V[8] && !last_V256 ) int2 <= 1'b0;
|
| 419 |
+
if( !LVBL && last_LVBL ) int1 <= 1'b0;
|
| 420 |
+
end
|
| 421 |
+
end
|
| 422 |
+
end
|
| 423 |
+
|
| 424 |
+
// Original design uses HALT signal instead of BR/BG/BGACK triad
|
| 425 |
+
// but fx68k does not support it, so HALT operation is implemented
|
| 426 |
+
// through regular bus arbitrion
|
| 427 |
+
|
| 428 |
+
wire [1:0] dev_br = { ~mcu_brn, obj_br };
|
| 429 |
+
assign bus_ack = ~BGACKn;
|
| 430 |
+
|
| 431 |
+
jtframe_68kdma #(.BW(2)) u_arbitration(
|
| 432 |
+
.clk ( clk ),
|
| 433 |
+
.rst ( rst ),
|
| 434 |
+
.cen ( cpu_cenb ),
|
| 435 |
+
.cpu_BRn ( BRn ),
|
| 436 |
+
.cpu_BGACKn ( BGACKn ),
|
| 437 |
+
.cpu_BGn ( BGn ),
|
| 438 |
+
.cpu_ASn ( ASn ),
|
| 439 |
+
.cpu_DTACKn ( DTACKn ),
|
| 440 |
+
.dev_br ( dev_br )
|
| 441 |
+
);
|
| 442 |
+
|
| 443 |
+
fx68k u_cpu(
|
| 444 |
+
.clk ( clk ),
|
| 445 |
+
.extReset ( rst ),
|
| 446 |
+
.pwrUp ( rst ),
|
| 447 |
+
.enPhi1 ( cpu_cen ),
|
| 448 |
+
.enPhi2 ( cpu_cenb ),
|
| 449 |
+
.HALTn ( 1'b1 ),
|
| 450 |
+
|
| 451 |
+
// Buses
|
| 452 |
+
.eab ( { ncA, A } ),
|
| 453 |
+
.iEdb ( cpu_din ),
|
| 454 |
+
.oEdb ( cpu_dout ),
|
| 455 |
+
|
| 456 |
+
|
| 457 |
+
.eRWn ( RnW ),
|
| 458 |
+
.LDSn ( LDSn ),
|
| 459 |
+
.UDSn ( UDSn ),
|
| 460 |
+
.ASn ( ASn ),
|
| 461 |
+
.VPAn ( inta_n ),
|
| 462 |
+
.FC0 ( FC[0] ),
|
| 463 |
+
.FC1 ( FC[1] ),
|
| 464 |
+
.FC2 ( FC[2] ),
|
| 465 |
+
|
| 466 |
+
.BERRn ( BERRn ),
|
| 467 |
+
// Bus arbitrion
|
| 468 |
+
.BRn ( BRn ),
|
| 469 |
+
.BGACKn ( BGACKn ),
|
| 470 |
+
.BGn ( BGn ),
|
| 471 |
+
|
| 472 |
+
.DTACKn ( DTACKn ),
|
| 473 |
+
.IPL0n ( 1'b1 ),
|
| 474 |
+
.IPL1n ( int1 ),
|
| 475 |
+
.IPL2n ( int2 ),
|
| 476 |
+
|
| 477 |
+
// Unused
|
| 478 |
+
.oRESETn ( ),
|
| 479 |
+
.oHALTEDn ( ),
|
| 480 |
+
.VMAn ( ),
|
| 481 |
+
.E ( )
|
| 482 |
+
);
|
| 483 |
+
`else // NOMAIN
|
| 484 |
+
assign cpu_cen = 0;
|
| 485 |
+
assign cpu_cenb = 0;
|
| 486 |
+
assign cpu_dout = 0;
|
| 487 |
+
assign UDSWn = 1;
|
| 488 |
+
assign LDSWn = 1;
|
| 489 |
+
assign cpu_AB = 0;
|
| 490 |
+
assign oram_dout = 0;
|
| 491 |
+
assign RnW = 1;
|
| 492 |
+
assign bus_ack = 0;
|
| 493 |
+
assign col_uw = 0;
|
| 494 |
+
assign col_lw = 0;
|
| 495 |
+
assign rom_addr = 0;
|
| 496 |
+
initial begin
|
| 497 |
+
flip = 0;
|
| 498 |
+
snd_latch = 0;
|
| 499 |
+
snd_nmi_n = 1;
|
| 500 |
+
char_cs = 0;
|
| 501 |
+
scr1_cs = 0;
|
| 502 |
+
scr2_cs = 0;
|
| 503 |
+
scr1_hpos = `ifdef SIM_SCR1_HPOS `SIM_SCR1_HPOS `else 0 `endif;
|
| 504 |
+
scr1_vpos = `ifdef SIM_SCR1_VPOS `SIM_SCR1_VPOS `else 0 `endif;
|
| 505 |
+
scr2_hpos = `ifdef SIM_SCR2_HPOS `SIM_SCR2_HPOS `else 0 `endif;
|
| 506 |
+
scr2_vpos = `ifdef SIM_SCR2_VPOS `SIM_SCR2_VPOS `else 0 `endif;
|
| 507 |
+
scr_bank = `ifdef SIM_SCR_BANK `SIM_SCR_BANK `else 0 `endif;
|
| 508 |
+
OKOUT = 0;
|
| 509 |
+
mcu_din = 0;
|
| 510 |
+
mcu_DMAONn = 0;
|
| 511 |
+
rom_cs = 0;
|
| 512 |
+
end
|
| 513 |
+
`endif
|
| 514 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_mcu.v
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 14-9-2019 */
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
// Interface with sound CPU:
|
| 21 |
+
// The sound CPU can read and write to the MCU at a fixed
|
| 22 |
+
// address. The MCU only knows when data has been written to it
|
| 23 |
+
// The MCU responds by writting an answer. The MCU cannot
|
| 24 |
+
// know whether the sound CPU has read the value
|
| 25 |
+
|
| 26 |
+
// Interface with main CPU:
|
| 27 |
+
// The MCU takes control of the bus directly, including the bus decoder
|
| 28 |
+
// Because it doesn't drive AB[19:17], which will remain high, the MCU
|
| 29 |
+
// cannot access the PROM, OBJRAM, IO, scroll positions or char RAM
|
| 30 |
+
// It can drive both scrolls, palette and work RAM because it drives
|
| 31 |
+
// AB[16:14]. However, it doesn't have any bus arbitrion with the video
|
| 32 |
+
// components, so it wouldn't be able to access video components
|
| 33 |
+
// successfully. Thus, I am assuming that it only interacts with the
|
| 34 |
+
// work RAM
|
| 35 |
+
|
| 36 |
+
module jtbiocom_mcu(
|
| 37 |
+
input rst,
|
| 38 |
+
input rst_cpu,
|
| 39 |
+
input clk_rom,
|
| 40 |
+
input clk_cpu,
|
| 41 |
+
input clk,
|
| 42 |
+
input cen6a, // 6 MHz
|
| 43 |
+
// Main CPU interface
|
| 44 |
+
(*keep*) input DMAONn,
|
| 45 |
+
output [ 7:0] mcu_dout,
|
| 46 |
+
input [ 7:0] mcu_din,
|
| 47 |
+
output mcu_wr, // always write to low bytes
|
| 48 |
+
output [16:1] mcu_addr,
|
| 49 |
+
(*keep*) output mcu_brn, // RQBSQn
|
| 50 |
+
(*keep*) output DMAn,
|
| 51 |
+
// Sound CPU interface
|
| 52 |
+
input [ 7:0] snd_dout,
|
| 53 |
+
output reg [ 7:0] snd_din,
|
| 54 |
+
input snd_mcu_wr,
|
| 55 |
+
input snd_mcu_rd,
|
| 56 |
+
// ROM programming
|
| 57 |
+
input [11:0] prog_addr,
|
| 58 |
+
input [ 7:0] prom_din,
|
| 59 |
+
input prom_we
|
| 60 |
+
);
|
| 61 |
+
|
| 62 |
+
parameter SINC_XDATA=1;
|
| 63 |
+
parameter ROMBIN="../../../../rom/biocom/ts.2f";
|
| 64 |
+
`ifndef NOMCU
|
| 65 |
+
wire [15:0] ext_addr;
|
| 66 |
+
|
| 67 |
+
wire [ 7:0] p0_o, p1_o, p2_o, p3_o;
|
| 68 |
+
reg int0n, int1n;
|
| 69 |
+
|
| 70 |
+
// interface with main CPU
|
| 71 |
+
wire [7:0] p3_os;
|
| 72 |
+
assign mcu_addr[13:9] = ~5'b0;
|
| 73 |
+
assign { mcu_addr[16:14], mcu_addr[8:1] } = ext_addr[10:0];
|
| 74 |
+
assign mcu_brn = int0n;
|
| 75 |
+
assign DMAn = p3_os[5];
|
| 76 |
+
reg last_DMAONn;
|
| 77 |
+
|
| 78 |
+
jtframe_sync #(.W(8)) u_p3sync(
|
| 79 |
+
.clk_in ( 1'b0 ),
|
| 80 |
+
.clk_out( clk_cpu ),
|
| 81 |
+
.raw ( p3_o ),
|
| 82 |
+
.sync ( p3_os )
|
| 83 |
+
);
|
| 84 |
+
|
| 85 |
+
wire int0n_mcu;
|
| 86 |
+
|
| 87 |
+
jtframe_sync #(.W(1)) u_intsync(
|
| 88 |
+
.clk_in ( 1'b0 ),
|
| 89 |
+
.clk_out( clk ),
|
| 90 |
+
.raw ( int0n ),
|
| 91 |
+
.sync ( int0n_mcu )
|
| 92 |
+
);
|
| 93 |
+
|
| 94 |
+
always @(posedge clk_cpu, posedge rst_cpu) begin
|
| 95 |
+
if( rst_cpu ) begin
|
| 96 |
+
int0n <= 1;
|
| 97 |
+
last_DMAONn <= 1;
|
| 98 |
+
end else begin
|
| 99 |
+
last_DMAONn <= DMAONn;
|
| 100 |
+
if(!p3_os[0]) // CLR
|
| 101 |
+
int0n <= 1;
|
| 102 |
+
else if(!p3_os[1])
|
| 103 |
+
int0n <= 0; // PR
|
| 104 |
+
else if( DMAONn && !last_DMAONn )
|
| 105 |
+
int0n <= 0;
|
| 106 |
+
end
|
| 107 |
+
end
|
| 108 |
+
|
| 109 |
+
// interface with sound CPU
|
| 110 |
+
wire int1_clrn = p3_o[4];
|
| 111 |
+
|
| 112 |
+
reg [7:0] snd_dout_latch;
|
| 113 |
+
reg last_snd_mcu_wr, last_p3_6, last_snd_mcu_rd;
|
| 114 |
+
wire posedge_snd = snd_mcu_wr && !last_snd_mcu_wr;
|
| 115 |
+
wire posedge_snd_rd = snd_mcu_rd && !last_snd_mcu_rd;
|
| 116 |
+
wire posedge_p3_6 = p3_o[6] && !last_p3_6;
|
| 117 |
+
wire snd_blank = p1_o == 8'hff;
|
| 118 |
+
reg snd_done;
|
| 119 |
+
|
| 120 |
+
always @(posedge clk, posedge rst) begin
|
| 121 |
+
if( rst ) begin
|
| 122 |
+
snd_dout_latch <= 8'd0;
|
| 123 |
+
int1n <= 1;
|
| 124 |
+
last_snd_mcu_wr <= 1'b0;
|
| 125 |
+
snd_done <= 1'b1;
|
| 126 |
+
end else begin
|
| 127 |
+
last_snd_mcu_wr <= snd_mcu_wr;
|
| 128 |
+
last_snd_mcu_rd <= snd_mcu_rd;
|
| 129 |
+
last_p3_6 <= p3_o[6];
|
| 130 |
+
if( posedge_snd )
|
| 131 |
+
snd_dout_latch <= snd_dout;
|
| 132 |
+
// interrupt line
|
| 133 |
+
if( !int1_clrn )
|
| 134 |
+
int1n <= 1;
|
| 135 |
+
else if( posedge_snd ) int1n <= 0;
|
| 136 |
+
// latch sound data
|
| 137 |
+
if( posedge_snd_rd ) snd_done <= 1'b1;
|
| 138 |
+
if( posedge_p3_6 && (snd_done || !snd_blank) ) begin
|
| 139 |
+
snd_done <= snd_blank;
|
| 140 |
+
snd_din <= p1_o;
|
| 141 |
+
end
|
| 142 |
+
end
|
| 143 |
+
end
|
| 144 |
+
|
| 145 |
+
wire [7:0] mcu_din_s, x_dout;
|
| 146 |
+
wire x_wr;
|
| 147 |
+
|
| 148 |
+
assign mcu_wr = x_wr | ~p3_o[6]; // wr pin
|
| 149 |
+
assign mcu_dout = x_wr ? x_dout : p0_o;
|
| 150 |
+
|
| 151 |
+
jtframe_sync #(.W(8)) u_sync(
|
| 152 |
+
.clk_in ( clk_cpu ),
|
| 153 |
+
.clk_out( clk ),
|
| 154 |
+
.raw ( mcu_din ),
|
| 155 |
+
.sync ( mcu_din_s )
|
| 156 |
+
);
|
| 157 |
+
|
| 158 |
+
jtframe_8751mcu #(
|
| 159 |
+
.ROMBIN(ROMBIN),
|
| 160 |
+
.SYNC_XDATA(SINC_XDATA)
|
| 161 |
+
) u_mcu(
|
| 162 |
+
.rst ( rst ),
|
| 163 |
+
.clk ( clk ),
|
| 164 |
+
.cen ( cen6a ),
|
| 165 |
+
// external memory: connected to main CPU
|
| 166 |
+
.x_din ( mcu_din_s ),
|
| 167 |
+
.x_dout ( x_dout ),
|
| 168 |
+
.x_addr ( ext_addr ),
|
| 169 |
+
.x_wr ( x_wr ),
|
| 170 |
+
.x_acc ( ),
|
| 171 |
+
// interrupts
|
| 172 |
+
.int0n ( int0n_mcu ),
|
| 173 |
+
.int1n ( int1n ),
|
| 174 |
+
// Ports
|
| 175 |
+
.p0_i ( 8'hff ),
|
| 176 |
+
.p0_o ( p0_o ),
|
| 177 |
+
|
| 178 |
+
.p1_i ( snd_dout_latch ),
|
| 179 |
+
.p1_o ( p1_o ),
|
| 180 |
+
|
| 181 |
+
.p2_i ( 8'hff ),
|
| 182 |
+
.p2_o ( p2_o ),
|
| 183 |
+
|
| 184 |
+
.p3_i ( 8'hff ),
|
| 185 |
+
.p3_o ( p3_o ),
|
| 186 |
+
|
| 187 |
+
.clk_rom ( clk_rom ),
|
| 188 |
+
.prog_addr ( prog_addr ),
|
| 189 |
+
.prom_din ( prom_din ),
|
| 190 |
+
.prom_we ( prom_we )
|
| 191 |
+
);
|
| 192 |
+
|
| 193 |
+
`ifdef SIMULATION
|
| 194 |
+
always @(negedge int0n)
|
| 195 |
+
$display ("MCU: int0n edge - main CPU");
|
| 196 |
+
|
| 197 |
+
always @(negedge int1n)
|
| 198 |
+
$display ("MCU: int1n edge - sound CPU");
|
| 199 |
+
`endif
|
| 200 |
+
`else // NOMCU
|
| 201 |
+
assign mcu_dout=0;
|
| 202 |
+
assign mcu_wr=0;
|
| 203 |
+
assign mcu_addr=0;
|
| 204 |
+
assign mcu_brn=1;
|
| 205 |
+
assign DMAn=1;
|
| 206 |
+
initial snd_din=0;
|
| 207 |
+
`endif
|
| 208 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_sound.v
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 27-10-2017 */
|
| 18 |
+
|
| 19 |
+
// This module is equivalent to the function
|
| 20 |
+
// of CAPCOM's 85H001 package found in GunSmoke, GnG, etc.
|
| 21 |
+
|
| 22 |
+
module jtbiocom_sound(
|
| 23 |
+
input rst,
|
| 24 |
+
input clk,
|
| 25 |
+
input cen_fm, // 14.31318/4 MHz ~ 3.5 MHz => 10/134 of 48MHz clock
|
| 26 |
+
input cen_fm2, // 14.31318/4/8 MHz ~ 1.75 MHz => 5/134 of 48MHz clock
|
| 27 |
+
// Interface with main CPU
|
| 28 |
+
input [7:0] snd_latch,
|
| 29 |
+
input nmi_n,
|
| 30 |
+
// Interface with MCU
|
| 31 |
+
input [7:0] snd_din,
|
| 32 |
+
output [7:0] snd_dout,
|
| 33 |
+
output snd_mcu_wr,
|
| 34 |
+
output snd_mcu_rd,
|
| 35 |
+
// ROM
|
| 36 |
+
output reg [14:0] rom_addr,
|
| 37 |
+
output reg rom_cs,
|
| 38 |
+
input [ 7:0] rom_data,
|
| 39 |
+
input rom_ok,
|
| 40 |
+
|
| 41 |
+
// Sound output
|
| 42 |
+
output signed [15:0] fm_l,
|
| 43 |
+
output signed [15:0] fm_r
|
| 44 |
+
);
|
| 45 |
+
|
| 46 |
+
parameter LAYOUT = 3, // 9 for SF
|
| 47 |
+
RECOVERY= 0;
|
| 48 |
+
`ifndef NOSOUND
|
| 49 |
+
|
| 50 |
+
wire [15:0] A;
|
| 51 |
+
reg fm_cs, latch_cs, ram_cs, mcu_cs;
|
| 52 |
+
wire mreq_n, rfsh_n, int_n, iorq_n, m1_n, nmiff_n;
|
| 53 |
+
wire WRn, rd_n, wr_n, fm_csn, RAM_we;
|
| 54 |
+
wire [ 7:0] ram_dout, dout, fm_dout;
|
| 55 |
+
reg [ 7:0] din;
|
| 56 |
+
reg rom2_ok;
|
| 57 |
+
|
| 58 |
+
assign fm_csn = ~fm_cs;
|
| 59 |
+
assign RAM_we = ram_cs && !WRn;
|
| 60 |
+
assign snd_mcu_wr = mcu_cs && !WRn;
|
| 61 |
+
assign snd_mcu_rd = mcu_cs && WRn;
|
| 62 |
+
|
| 63 |
+
always @(posedge clk) begin
|
| 64 |
+
rom_cs <= 1'b0;
|
| 65 |
+
ram_cs <= 1'b0;
|
| 66 |
+
latch_cs <= 1'b0;
|
| 67 |
+
fm_cs <= 1'b0;
|
| 68 |
+
mcu_cs <= 1'b0;
|
| 69 |
+
rom2_ok <= rom_ok;
|
| 70 |
+
if(!mreq_n) begin
|
| 71 |
+
if( LAYOUT==9 ) begin // Stret Fighter
|
| 72 |
+
casez( A[15:13] )
|
| 73 |
+
3'b0??: begin
|
| 74 |
+
rom_cs <= 1;
|
| 75 |
+
rom_addr <= A[14:0];
|
| 76 |
+
end
|
| 77 |
+
3'b110: begin
|
| 78 |
+
ram_cs <= !A[11];
|
| 79 |
+
latch_cs <= A[11];
|
| 80 |
+
end
|
| 81 |
+
3'b111: fm_cs <= 1;
|
| 82 |
+
default:;
|
| 83 |
+
endcase
|
| 84 |
+
end else begin // Bionic Commando
|
| 85 |
+
casez( A[15:13] )
|
| 86 |
+
3'b0??: begin
|
| 87 |
+
rom_cs <= 1'b1;
|
| 88 |
+
rom_addr <= A[14:0];
|
| 89 |
+
end
|
| 90 |
+
3'b100: fm_cs <= 1'b1;
|
| 91 |
+
3'b101: mcu_cs <= 1'b1;
|
| 92 |
+
3'b110: ram_cs <= 1'b1;
|
| 93 |
+
3'b111: latch_cs <= 1'b1;
|
| 94 |
+
endcase
|
| 95 |
+
end
|
| 96 |
+
end
|
| 97 |
+
end
|
| 98 |
+
|
| 99 |
+
assign WRn = wr_n | mreq_n;
|
| 100 |
+
assign snd_dout = dout;
|
| 101 |
+
|
| 102 |
+
always @(posedge clk, posedge rst) begin
|
| 103 |
+
if( rst ) begin
|
| 104 |
+
din <= 8'hff;
|
| 105 |
+
end else begin
|
| 106 |
+
din <= rom_cs ? rom_data : (
|
| 107 |
+
fm_cs ? fm_dout : (
|
| 108 |
+
latch_cs ? (LAYOUT==9 ? snd_latch : snd_din) : (
|
| 109 |
+
mcu_cs ? snd_din : (
|
| 110 |
+
ram_cs ? ram_dout :
|
| 111 |
+
8'hff ))));
|
| 112 |
+
end
|
| 113 |
+
end
|
| 114 |
+
|
| 115 |
+
jtframe_ram #(.AW(11)) u_ram(
|
| 116 |
+
.clk ( clk ),
|
| 117 |
+
.cen ( 1'b1 ),
|
| 118 |
+
.data ( dout ),
|
| 119 |
+
.addr ( A[10:0] ),
|
| 120 |
+
.we ( RAM_we ),
|
| 121 |
+
.q ( ram_dout )
|
| 122 |
+
);
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
jtframe_z80_romwait #(.RECOVERY(RECOVERY)) u_cpu(
|
| 126 |
+
.rst_n ( ~rst ),
|
| 127 |
+
.clk ( clk ),
|
| 128 |
+
.cen ( cen_fm ),
|
| 129 |
+
.int_n ( int_n ),
|
| 130 |
+
.nmi_n ( nmi_n ),
|
| 131 |
+
.busrq_n ( 1'b1 ),
|
| 132 |
+
.m1_n ( m1_n ),
|
| 133 |
+
.mreq_n ( mreq_n ),
|
| 134 |
+
.iorq_n ( iorq_n ),
|
| 135 |
+
.rd_n ( rd_n ),
|
| 136 |
+
.wr_n ( wr_n ),
|
| 137 |
+
.rfsh_n ( rfsh_n ),
|
| 138 |
+
.halt_n ( ),
|
| 139 |
+
.busak_n ( ),
|
| 140 |
+
.A ( A ),
|
| 141 |
+
.din ( din ),
|
| 142 |
+
.dout ( dout ),
|
| 143 |
+
// manage access to ROM data from SDRAM
|
| 144 |
+
.rom_cs ( rom_cs ),
|
| 145 |
+
.rom_ok ( rom2_ok ),
|
| 146 |
+
// unused
|
| 147 |
+
.cpu_cen ( )
|
| 148 |
+
);
|
| 149 |
+
|
| 150 |
+
jt51 u_jt51(
|
| 151 |
+
.rst ( rst ), // reset
|
| 152 |
+
.clk ( clk ), // main clock
|
| 153 |
+
.cen ( cen_fm ),
|
| 154 |
+
.cen_p1 ( cen_fm2 ),
|
| 155 |
+
.cs_n ( fm_csn ), // chip select
|
| 156 |
+
.wr_n ( WRn ), // write
|
| 157 |
+
.a0 ( A[0] ),
|
| 158 |
+
.din ( dout ), // data in
|
| 159 |
+
.dout ( fm_dout ), // data out
|
| 160 |
+
.ct1 ( ),
|
| 161 |
+
.ct2 ( ),
|
| 162 |
+
.irq_n ( int_n ),
|
| 163 |
+
// Low resolution output (same as real chip)
|
| 164 |
+
.sample ( ),
|
| 165 |
+
.left ( ),
|
| 166 |
+
.right ( ),
|
| 167 |
+
// Full resolution output
|
| 168 |
+
.xleft ( fm_l ),
|
| 169 |
+
.xright ( fm_r )
|
| 170 |
+
);
|
| 171 |
+
|
| 172 |
+
`else // NOSOUND
|
| 173 |
+
assign snd_dout = 0;
|
| 174 |
+
assign snd_mcu_wr = 0;
|
| 175 |
+
assign snd_mcu_rd = 0;
|
| 176 |
+
assign fm_l = 0;
|
| 177 |
+
assign fm_r = 0;
|
| 178 |
+
initial begin
|
| 179 |
+
rom_addr = 0;
|
| 180 |
+
rom_cs = 0;
|
| 181 |
+
end
|
| 182 |
+
`endif
|
| 183 |
+
|
| 184 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/biocom/hdl/jtbiocom_video.v
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 15-9-2019 */
|
| 18 |
+
|
| 19 |
+
module jtbiocom_video(
|
| 20 |
+
input rst,
|
| 21 |
+
input clk,
|
| 22 |
+
input cen12,
|
| 23 |
+
input cen8,
|
| 24 |
+
input cen6,
|
| 25 |
+
input cpu_cen,
|
| 26 |
+
input [13:1] cpu_AB,
|
| 27 |
+
input [ 8:0] V,
|
| 28 |
+
input [ 8:0] H,
|
| 29 |
+
input RnW,
|
| 30 |
+
input flip,
|
| 31 |
+
input [15:0] cpu_dout,
|
| 32 |
+
// CHAR
|
| 33 |
+
input char_cs,
|
| 34 |
+
output [ 7:0] char_dout,
|
| 35 |
+
input char_ok,
|
| 36 |
+
output char_busy,
|
| 37 |
+
output [12:0] char_addr,
|
| 38 |
+
input [15:0] char_data,
|
| 39 |
+
// SCROLL 1
|
| 40 |
+
input scr1_cs,
|
| 41 |
+
output [ 7:0] scr1_dout,
|
| 42 |
+
output [16:0] scr1_addr,
|
| 43 |
+
input [15:0] scr1_data,
|
| 44 |
+
input scr1_ok,
|
| 45 |
+
output scr1_busy,
|
| 46 |
+
input [ 9:0] scr1_hpos,
|
| 47 |
+
input [ 9:0] scr1_vpos,
|
| 48 |
+
// SCROLL 2
|
| 49 |
+
input scr2_cs,
|
| 50 |
+
output [ 7:0] scr2_dout,
|
| 51 |
+
output [14:0] scr2_addr,
|
| 52 |
+
input [15:0] scr2_data,
|
| 53 |
+
input scr2_ok,
|
| 54 |
+
output scr2_busy,
|
| 55 |
+
input [ 8:0] scr2_hpos,
|
| 56 |
+
input [ 8:0] scr2_vpos,
|
| 57 |
+
// OBJ
|
| 58 |
+
input HINIT,
|
| 59 |
+
output [13:1] obj_AB,
|
| 60 |
+
input [11:0] oram_dout, // only 12 bits are read
|
| 61 |
+
input OKOUT,
|
| 62 |
+
output bus_req, // Request bus
|
| 63 |
+
input bus_ack, // bus acknowledge
|
| 64 |
+
output blcnten, // bus line counter enable
|
| 65 |
+
output [17:2] obj_addr,
|
| 66 |
+
input [31:0] obj_data,
|
| 67 |
+
input obj_ok,
|
| 68 |
+
output obj_cs,
|
| 69 |
+
// Color Mix
|
| 70 |
+
input HS,
|
| 71 |
+
input preLHBL,
|
| 72 |
+
input preLVBL,
|
| 73 |
+
input LVBL_obj,
|
| 74 |
+
input LHBL_obj,
|
| 75 |
+
output LHBL,
|
| 76 |
+
output LVBL,
|
| 77 |
+
input col_uw,
|
| 78 |
+
input col_lw,
|
| 79 |
+
input [3:0] gfx_en,
|
| 80 |
+
// Priority PROM
|
| 81 |
+
input [7:0] prog_addr,
|
| 82 |
+
input prom_prio_we,
|
| 83 |
+
input [3:0] prom_din,
|
| 84 |
+
// Pixel output: 5 bits per colour!
|
| 85 |
+
output [4:0] red,
|
| 86 |
+
output [4:0] green,
|
| 87 |
+
output [4:0] blue
|
| 88 |
+
);
|
| 89 |
+
|
| 90 |
+
// parameters from jtgng_colmix:
|
| 91 |
+
parameter SCRWIN = 1,
|
| 92 |
+
PALETTE_PROM = 0,
|
| 93 |
+
PALETTE_RED = "",
|
| 94 |
+
PALETTE_GREEN = "",
|
| 95 |
+
PALETTE_BLUE = "";
|
| 96 |
+
parameter [1:0] OBJ_PAL = 2'b01; // 01 for GnG, 10 for Commando
|
| 97 |
+
// These two bits mark the region of the palette RAM/PROM where
|
| 98 |
+
// palettes for objects are stored
|
| 99 |
+
|
| 100 |
+
localparam CHAR_OFFSET = 9'd5;
|
| 101 |
+
localparam SCR1_OFFSET = 9'd1;
|
| 102 |
+
localparam SCR2_OFFSET = 9'd1;
|
| 103 |
+
localparam OBJ_DLY = 3;
|
| 104 |
+
|
| 105 |
+
wire [5:0] char_pxl;
|
| 106 |
+
wire [7:0] obj_pxl;
|
| 107 |
+
wire [3:0] scr1_col, scr2_col;
|
| 108 |
+
wire [3:0] scr1_pal, scr2_pal;
|
| 109 |
+
wire [3:0] cc;
|
| 110 |
+
|
| 111 |
+
reg [7:0] scr1_pxl, scr2_pxl;
|
| 112 |
+
|
| 113 |
+
always @(posedge clk) if(cen6) begin
|
| 114 |
+
scr1_pxl <= { scr1_pal, scr1_col };
|
| 115 |
+
scr2_pxl <= { scr2_pal, scr2_col };
|
| 116 |
+
end
|
| 117 |
+
|
| 118 |
+
jtgng_char #(.HOFFSET(CHAR_OFFSET)) u_char (
|
| 119 |
+
.clk ( clk ),
|
| 120 |
+
.pxl_cen ( cen6 ),
|
| 121 |
+
.AB ( cpu_AB[11:1] ),
|
| 122 |
+
.V ( V[7:0] ),
|
| 123 |
+
.H ( H[7:0] ),
|
| 124 |
+
.flip ( flip ),
|
| 125 |
+
.din ( cpu_dout[7:0] ),
|
| 126 |
+
.dout ( char_dout ),
|
| 127 |
+
// Bus arbitrion
|
| 128 |
+
.char_cs ( char_cs ),
|
| 129 |
+
.wr_n ( RnW ),
|
| 130 |
+
.busy ( char_busy ),
|
| 131 |
+
// ROM
|
| 132 |
+
.char_addr ( char_addr ),
|
| 133 |
+
.rom_data ( char_data ),
|
| 134 |
+
.rom_ok ( char_ok ),
|
| 135 |
+
// Pixel output
|
| 136 |
+
.char_on ( 1'b1 ),
|
| 137 |
+
.char_pxl ( char_pxl ),
|
| 138 |
+
// unused
|
| 139 |
+
.dseln ( 2'b11 ),
|
| 140 |
+
.prog_addr ( ),
|
| 141 |
+
.prog_din ( ),
|
| 142 |
+
.prom_we ( )
|
| 143 |
+
);
|
| 144 |
+
|
| 145 |
+
`ifdef NOSCR
|
| 146 |
+
`define NOSCR1
|
| 147 |
+
`define NOSCR2
|
| 148 |
+
`endif
|
| 149 |
+
|
| 150 |
+
`ifndef NOSCR1
|
| 151 |
+
jtgng_scroll #(
|
| 152 |
+
.ROM_AW ( 17 ),
|
| 153 |
+
.SCANW ( 12 ),
|
| 154 |
+
.POSW ( 10 ),
|
| 155 |
+
.HOFFSET ( SCR1_OFFSET ),
|
| 156 |
+
.TILE4 ( 1 ), // 4bpp
|
| 157 |
+
.LAYOUT ( 1 ),
|
| 158 |
+
.SIMID ( 1 ))
|
| 159 |
+
u_scroll1 (
|
| 160 |
+
.clk ( clk ),
|
| 161 |
+
.pxl_cen ( cen6 ),
|
| 162 |
+
// screen position
|
| 163 |
+
.H ( H ),
|
| 164 |
+
.V ( V[7:0] ),
|
| 165 |
+
.hpos ( scr1_hpos ),
|
| 166 |
+
.vpos ( scr1_vpos ),
|
| 167 |
+
.flip ( flip ),
|
| 168 |
+
// bus arbitrion
|
| 169 |
+
.Asel ( cpu_AB[1] ),
|
| 170 |
+
.AB ( cpu_AB[13:2] ),
|
| 171 |
+
.scr_cs ( scr1_cs ),
|
| 172 |
+
.din ( cpu_dout[7:0] ),
|
| 173 |
+
.dout ( scr1_dout ),
|
| 174 |
+
.wr_n ( RnW ),
|
| 175 |
+
.busy ( scr1_busy ),
|
| 176 |
+
// ROM
|
| 177 |
+
.scr_addr ( scr1_addr ),
|
| 178 |
+
.rom_data ( scr1_data ),
|
| 179 |
+
.rom_ok ( scr1_ok ),
|
| 180 |
+
// pixel output
|
| 181 |
+
.scr_col ( scr1_col ),
|
| 182 |
+
.scr_pal ( scr1_pal )
|
| 183 |
+
);
|
| 184 |
+
`else
|
| 185 |
+
assign scr1_busy = 0;
|
| 186 |
+
assign scr1_col = ~4'd0;
|
| 187 |
+
assign scr1_pal = ~4'd0;
|
| 188 |
+
assign scr1_addr = 0;
|
| 189 |
+
assign scr1_dout = 0;
|
| 190 |
+
`endif
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
`ifndef NOSCR2
|
| 195 |
+
jtgng_scroll #(
|
| 196 |
+
.ROM_AW ( 15 ),
|
| 197 |
+
.SCANW ( 12 ),
|
| 198 |
+
.HOFFSET ( SCR2_OFFSET ),
|
| 199 |
+
.TILE4 ( 1 ), // 4bpp
|
| 200 |
+
.LAYOUT ( 2 ),
|
| 201 |
+
.SIMID ( 2 ))
|
| 202 |
+
u_scroll2 (
|
| 203 |
+
.clk ( clk ),
|
| 204 |
+
.pxl_cen ( cen6 ),
|
| 205 |
+
// screen position
|
| 206 |
+
.H ( H ),
|
| 207 |
+
.V ( V[7:0] ),
|
| 208 |
+
.hpos ( scr2_hpos ),
|
| 209 |
+
.vpos ( scr2_vpos ),
|
| 210 |
+
.flip ( flip ),
|
| 211 |
+
// bus arbitrion
|
| 212 |
+
.Asel ( cpu_AB[1] ),
|
| 213 |
+
.AB ( cpu_AB[13:2] ),
|
| 214 |
+
.scr_cs ( scr2_cs ),
|
| 215 |
+
.din ( cpu_dout[7:0] ),
|
| 216 |
+
.dout ( scr2_dout ),
|
| 217 |
+
.wr_n ( RnW ),
|
| 218 |
+
.busy ( scr2_busy ),
|
| 219 |
+
// ROM
|
| 220 |
+
.scr_addr ( scr2_addr ),
|
| 221 |
+
.rom_data ( scr2_data ),
|
| 222 |
+
.rom_ok ( scr2_ok ),
|
| 223 |
+
// pixel output
|
| 224 |
+
.scr_col ( scr2_col ),
|
| 225 |
+
.scr_pal ( scr2_pal )
|
| 226 |
+
);
|
| 227 |
+
`else
|
| 228 |
+
assign scr2_busy = 0;
|
| 229 |
+
assign scr2_col = ~4'd0;
|
| 230 |
+
assign scr2_pal = ~4'd0;
|
| 231 |
+
assign scr2_addr = 0;
|
| 232 |
+
assign scr2_dout = 0;
|
| 233 |
+
`endif
|
| 234 |
+
|
| 235 |
+
/* verilator tracing_off */
|
| 236 |
+
jttora_obj #( // 160 objects scanned. Max 31 objects drawn per line
|
| 237 |
+
.VINV ( 0 ),
|
| 238 |
+
.HOFF ( 9'h8 ),
|
| 239 |
+
.VOFF ( 9'h1fe ),
|
| 240 |
+
.ROM_AW ( 18 ),
|
| 241 |
+
.DMA_AW ( 10 ),
|
| 242 |
+
.DMA_DW ( 12 ))
|
| 243 |
+
u_obj (
|
| 244 |
+
.rst ( rst ),
|
| 245 |
+
.clk ( clk ),
|
| 246 |
+
.dma_cen ( cen8 ),
|
| 247 |
+
.pxl_cen ( cen6 ),
|
| 248 |
+
// screen
|
| 249 |
+
.hs ( HS ),
|
| 250 |
+
.LVBL ( LVBL ),
|
| 251 |
+
.vdump ( V ),
|
| 252 |
+
.hdump ( H ),
|
| 253 |
+
.flip ( flip ),
|
| 254 |
+
// CPU bus
|
| 255 |
+
.AB ( obj_AB[10:1]),
|
| 256 |
+
.DB ( oram_dout ),
|
| 257 |
+
// shared bus
|
| 258 |
+
.OKOUT ( OKOUT ),
|
| 259 |
+
.bus_req ( bus_req ),
|
| 260 |
+
.bus_ack ( bus_ack ),
|
| 261 |
+
.blen ( blcnten ),
|
| 262 |
+
// SDRAM interface
|
| 263 |
+
.rom_addr ( obj_addr ),
|
| 264 |
+
.rom_data ( obj_data ),
|
| 265 |
+
.rom_cs ( obj_cs ),
|
| 266 |
+
.rom_ok ( obj_ok ),
|
| 267 |
+
// pixel data
|
| 268 |
+
.pxl ( obj_pxl ),
|
| 269 |
+
.debug_bus ( 8'd0 )
|
| 270 |
+
);
|
| 271 |
+
|
| 272 |
+
assign obj_AB[13:11] = 3'b111;
|
| 273 |
+
/* verilator tracing_on */
|
| 274 |
+
`ifndef NOCOLMIX
|
| 275 |
+
jtbiocom_colmix u_colmix (
|
| 276 |
+
.rst ( rst ),
|
| 277 |
+
.clk ( clk ),
|
| 278 |
+
.cen6 ( cen6 ),
|
| 279 |
+
.cpu_cen ( cpu_cen ),
|
| 280 |
+
|
| 281 |
+
.char_pxl ( char_pxl ),
|
| 282 |
+
.scr1_pxl ( scr1_pxl ),
|
| 283 |
+
.scr2_pxl ( scr2_pxl ),
|
| 284 |
+
.obj_pxl ( obj_pxl ),
|
| 285 |
+
.LVBL ( LVBL ),
|
| 286 |
+
.LHBL ( LHBL ),
|
| 287 |
+
.preLHBL ( preLHBL ),
|
| 288 |
+
.preLVBL ( preLVBL ),
|
| 289 |
+
|
| 290 |
+
// PROMs
|
| 291 |
+
.prog_addr ( prog_addr ),
|
| 292 |
+
.prom_prio_we ( prom_prio_we ),
|
| 293 |
+
.prom_din ( prom_din ),
|
| 294 |
+
|
| 295 |
+
// DEBUG
|
| 296 |
+
.gfx_en ( gfx_en ),
|
| 297 |
+
|
| 298 |
+
// CPU interface
|
| 299 |
+
.AB ( cpu_AB[10:1] ),
|
| 300 |
+
.col_uw ( col_uw ),
|
| 301 |
+
.col_lw ( col_lw ),
|
| 302 |
+
.DB ( cpu_dout ),
|
| 303 |
+
|
| 304 |
+
// colour output
|
| 305 |
+
.red ( red ),
|
| 306 |
+
.green ( green ),
|
| 307 |
+
.blue ( blue )
|
| 308 |
+
);
|
| 309 |
+
`else
|
| 310 |
+
assign red = 4'd0;
|
| 311 |
+
assign blue = 4'd0;
|
| 312 |
+
assign green= 4'd0;
|
| 313 |
+
`endif
|
| 314 |
+
|
| 315 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/biocom.mame
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
save biocom_obj.bin, 0xfe0800,0x500
|
| 2 |
+
save biocom_char.bin, 0xfec000,0x1000
|
| 3 |
+
save biocom_scr1.bin, 0xff0000,0x4000
|
| 4 |
+
save biocom_scr2.bin, 0xff4000,0x4000
|
| 5 |
+
save biocom_pal.bin, 0xff8000,0x800
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/biocom_wp.mame
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
wpset 0xfe8010,2,w,1,{printf "Write SCR1 HPOS=%04X\n",wpdata;g}
|
| 2 |
+
wpset 0xfe8012,2,w,1,{printf "Write SCR1 VPOS=%04X\n",wpdata;g}
|
| 3 |
+
wpset 0xfe8014,2,w,1,{printf "Write SCR2 HPOS=%04X\n",wpdata;g}
|
| 4 |
+
wpset 0xfe8016,2,w,1,{printf "Write SCR2 VPOS=%04X\n",wpdata;g}
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/gomcu.sh
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#/bin/bash
|
| 2 |
+
cp sim_inputs_game.hex sim_inputs.hex || exit $?
|
| 3 |
+
go.sh -nosnd -video 190 -w -d DUMP_START=139 -inputs
|
| 4 |
+
#go.sh -nosnd -video 19 -w -inputs
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/mame2char.sh
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# Convert character MAME memory dump to input files
|
| 3 |
+
if [ ! -e jtutil drop1 ]; then
|
| 4 |
+
g++ jtutil drop1.cc -o jtutil drop1
|
| 5 |
+
fi
|
| 6 |
+
|
| 7 |
+
dd if=biocom_char.bin count=4 | jtutil drop1 > char_lower.bin
|
| 8 |
+
dd if=biocom_char.bin count=4 skip=4 | jtutil drop1 > char_upper.bin
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/mame2sim.sh
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Use MAME debugger command files:
|
| 4 |
+
# biocom.cmd and biocom_wp.cmd
|
| 5 |
+
# to obtain the input files and scroll position bytes for the sim
|
| 6 |
+
|
| 7 |
+
SCR1HPOS=0000
|
| 8 |
+
SCR2HPOS=0000
|
| 9 |
+
SCR1VPOS=0300
|
| 10 |
+
SCR2VPOS=0100
|
| 11 |
+
|
| 12 |
+
while [ $# -gt 0 ]; do
|
| 13 |
+
case "$1" in
|
| 14 |
+
-h1|-scr1hpos)
|
| 15 |
+
shift
|
| 16 |
+
SCR1HPOS=$1;;
|
| 17 |
+
-h2|-scr2hpos)
|
| 18 |
+
shift
|
| 19 |
+
SCR2HPOS=$1;;
|
| 20 |
+
-v1|-scr1vpos)
|
| 21 |
+
shift
|
| 22 |
+
SCR1VPOS=$1;;
|
| 23 |
+
-v2|-scr2vpos)
|
| 24 |
+
shift
|
| 25 |
+
SCR2VPOS=$1;;
|
| 26 |
+
-help)
|
| 27 |
+
cat <<EOF
|
| 28 |
+
-h1 or -scr1hpos: indicate horizontal scroll 1 in hexadecimal
|
| 29 |
+
-h2 or -scr2hpos: indicate horizontal scroll 2 in hexadecimal
|
| 30 |
+
-v1 or -scr1vpos: indicate vertical scroll 1 in hexadecimal
|
| 31 |
+
-v2 or -scr2vpos: indicate vertical scroll 2 in hexadecimal
|
| 32 |
+
EOF
|
| 33 |
+
exit 0;;
|
| 34 |
+
*) echo "Unknown option $1. Use -help to see the list of options"; exit 1;;
|
| 35 |
+
esac
|
| 36 |
+
shift
|
| 37 |
+
done
|
| 38 |
+
|
| 39 |
+
# Characters:
|
| 40 |
+
# Convert character MAME memory dump to input files
|
| 41 |
+
if [ ! -e jtutil drop1 ]; then
|
| 42 |
+
g++ jtutil drop1.cc -o jtutil drop1 || exit 1
|
| 43 |
+
fi
|
| 44 |
+
|
| 45 |
+
dd if=biocom_char.bin count=4 | jtutil drop1 > char_lower.bin
|
| 46 |
+
dd if=biocom_char.bin count=4 skip=4 | jtutil drop1 > char_upper.bin
|
| 47 |
+
|
| 48 |
+
# Palette
|
| 49 |
+
if [ ! -e pal_bin2hex ]; then
|
| 50 |
+
g++ pal_bin2hex.cc -o pal_bin2hex || exit 1
|
| 51 |
+
fi
|
| 52 |
+
|
| 53 |
+
pal_bin2hex < biocom_pal.bin
|
| 54 |
+
|
| 55 |
+
# Objects
|
| 56 |
+
cp -f biocom_obj.bin objdma.bin
|
| 57 |
+
|
| 58 |
+
# Scroll 1
|
| 59 |
+
jtutil drop1 < biocom_scr1.bin | jtutil drop1 > scr1_upper.bin
|
| 60 |
+
jtutil drop1 < biocom_scr1.bin | jtutil drop1 -l > scr1_lower.bin
|
| 61 |
+
|
| 62 |
+
# Scroll 2
|
| 63 |
+
jtutil drop1 < biocom_scr2.bin | jtutil drop1 > scr2_upper.bin
|
| 64 |
+
jtutil drop1 < biocom_scr2.bin | jtutil drop1 -l > scr2_lower.bin
|
| 65 |
+
|
| 66 |
+
go.sh -d NOSOUND -d NOMAIN -d NOMCU -video 2 \
|
| 67 |
+
-d JTCHAR_UPPER_SIMFILE=',.simfile({SIMID,"_upper.bin"})' \
|
| 68 |
+
-d JTCHAR_LOWER_SIMFILE=',.simfile({SIMID,"_lower.bin"})' \
|
| 69 |
+
-d SIM_SCR1_VPOS=10\'h$SCR1VPOS \
|
| 70 |
+
-d SIM_SCR2_VPOS=9\'h$SCR2VPOS \
|
| 71 |
+
-d SIM_SCR1_HPOS=10\'h0$SCR1HPOS \
|
| 72 |
+
-d SIM_SCR2_HPOS=10\'h0$SCR2HPOS \
|
| 73 |
+
-deep $*
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/pal_bin2hex.cc
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <iostream>
|
| 2 |
+
#include <fstream>
|
| 3 |
+
|
| 4 |
+
using namespace std;
|
| 5 |
+
|
| 6 |
+
// convert palette from MAME save command in debugger
|
| 7 |
+
// input binary palette file as stdin
|
| 8 |
+
|
| 9 |
+
int main() {
|
| 10 |
+
ofstream fr("palrg.hex");
|
| 11 |
+
ofstream fgb("palbb.hex");
|
| 12 |
+
char buf[2];
|
| 13 |
+
cin.read(buf,2);
|
| 14 |
+
while( !cin.eof() ) {
|
| 15 |
+
int v = 0xff&(int)buf[0];
|
| 16 |
+
fr << hex << v << '\n';
|
| 17 |
+
v = 0xff&(int)buf[1];
|
| 18 |
+
fgb << hex << v << '\n';
|
| 19 |
+
cin.read(buf,2);
|
| 20 |
+
}
|
| 21 |
+
}
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/game/simload.sh
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
jtsim -nosnd -d NOMAIN -d NOMCU -setname bionicc -load $*
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/prom_we/go.sh
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
iverilog test.v ../../hdl/jtbiocom_prom_we.v \
|
| 4 |
+
-D ROM_LEN=22\'hF1100 -D PROM_W=2 -D SIMULATION \
|
| 5 |
+
-o sim \
|
| 6 |
+
&& sim -lxt
|
snapshots/jotego_jtcores_pr1100/cores/biocom/ver/prom_we/test.v
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
`timescale 1ns/1ps
|
| 2 |
+
|
| 3 |
+
module test;
|
| 4 |
+
|
| 5 |
+
reg clk, downloading=1'b1;
|
| 6 |
+
reg [21:0] ioctl_addr=22'd0;
|
| 7 |
+
reg [ 7:0] ioctl_dout= 8'd0;
|
| 8 |
+
reg ioctl_wr;
|
| 9 |
+
|
| 10 |
+
wire [21:0] prog_addr;
|
| 11 |
+
wire [ 7:0] prog_data;
|
| 12 |
+
wire [ 1:0] prog_mask;
|
| 13 |
+
wire prog_we;
|
| 14 |
+
wire [`PROM_W-1:0] prom_we;
|
| 15 |
+
|
| 16 |
+
jtbiocom_prom_we
|
| 17 |
+
u_uut(
|
| 18 |
+
.clk ( clk ),
|
| 19 |
+
.downloading ( downloading ),
|
| 20 |
+
.ioctl_addr ( ioctl_addr ),
|
| 21 |
+
.ioctl_dout ( ioctl_dout ),
|
| 22 |
+
.ioctl_wr ( ioctl_wr ),
|
| 23 |
+
.prog_addr ( prog_addr ),
|
| 24 |
+
.prog_data ( prog_data ),
|
| 25 |
+
.prog_mask ( prog_mask ),
|
| 26 |
+
.prog_we ( prog_we ),
|
| 27 |
+
.prom_we ( prom_we )
|
| 28 |
+
);
|
| 29 |
+
|
| 30 |
+
initial begin
|
| 31 |
+
clk = 1'b0;
|
| 32 |
+
forever #10 clk = ~clk;
|
| 33 |
+
end
|
| 34 |
+
|
| 35 |
+
reg [1:0] cnt=2'b0;
|
| 36 |
+
|
| 37 |
+
always @(posedge clk) begin
|
| 38 |
+
cnt <= cnt+2'd1;
|
| 39 |
+
ioctl_wr <= 1'b0;
|
| 40 |
+
if( ioctl_addr < `ROM_LEN && cnt==2'b11 ) begin
|
| 41 |
+
ioctl_addr <= ioctl_addr + 22'd1;
|
| 42 |
+
ioctl_dout <= ioctl_dout+8'd1;
|
| 43 |
+
ioctl_wr <= 1'b1;
|
| 44 |
+
end else if( ioctl_addr >= `ROM_LEN ) begin
|
| 45 |
+
downloading <= 1'b0;
|
| 46 |
+
#100 $finish;
|
| 47 |
+
end
|
| 48 |
+
end
|
| 49 |
+
|
| 50 |
+
initial begin
|
| 51 |
+
$dumpfile("test.lxt");
|
| 52 |
+
$dumpvars(0,test);
|
| 53 |
+
$dumpon;
|
| 54 |
+
end
|
| 55 |
+
|
| 56 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/files.yaml
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
btiger:
|
| 2 |
+
- get:
|
| 3 |
+
- jtbtiger_main.v
|
| 4 |
+
- jtbtiger_game.v
|
| 5 |
+
- jtbtiger_video.v
|
| 6 |
+
- jtbtiger_mcu.v
|
| 7 |
+
- jtbtiger_colmix.v
|
| 8 |
+
- jtbtiger_scroll.v
|
| 9 |
+
gng:
|
| 10 |
+
- get:
|
| 11 |
+
- jtgng_video.v
|
| 12 |
+
- jtgng_video.yaml
|
| 13 |
+
- jtgng_sound.yaml
|
| 14 |
+
- jtgng_dual_ram.v
|
| 15 |
+
- jtgng_colmix.v
|
| 16 |
+
jtframe:
|
| 17 |
+
- from: clocking
|
| 18 |
+
get:
|
| 19 |
+
- jtframe_cen48.v
|
| 20 |
+
- from: cpu
|
| 21 |
+
get:
|
| 22 |
+
- jtframe_z80.yaml
|
| 23 |
+
- jtframe_8751.yaml
|
| 24 |
+
- from: video
|
| 25 |
+
get:
|
| 26 |
+
- jtframe_blank.v
|
| 27 |
+
- from: ram
|
| 28 |
+
get:
|
| 29 |
+
- jtframe_ram.v
|
| 30 |
+
jt12:
|
| 31 |
+
- get:
|
| 32 |
+
- jt12_rst.v
|
snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/macros.def
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[*]
|
| 2 |
+
CORENAME=JTBTIGER
|
| 3 |
+
JTFRAME_BUTTONS=2
|
| 4 |
+
JTFRAME_WIDTH=256
|
| 5 |
+
JTFRAME_HEIGHT=224
|
| 6 |
+
# 24 MHz used in MCU to avoid timing errors
|
| 7 |
+
JTFRAME_CLK24
|
| 8 |
+
JTFRAME_CREDITS_PAGES=1
|
| 9 |
+
|
| 10 |
+
# SDRAM
|
| 11 |
+
JTFRAME_BA1_START=0x48000
|
| 12 |
+
CHAR_START=0x50000
|
| 13 |
+
JTFRAME_BA2_START=0x58000
|
| 14 |
+
JTFRAME_BA3_START=0x98000
|
| 15 |
+
JTFRAME_PROM_START=0xD8000
|
| 16 |
+
|
| 17 |
+
# OSD options
|
| 18 |
+
JOIN_JOYSTICKS
|
| 19 |
+
|
| 20 |
+
[sidi]
|
| 21 |
+
-JTFRAME_CREDITS
|
| 22 |
+
|
| 23 |
+
[mister]
|
| 24 |
+
JTFRAME_ARX=5
|
| 25 |
+
JTFRAME_ARY=4
|
snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/mame2mra.toml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[global]
|
| 2 |
+
author=["jotego"]
|
| 3 |
+
|
| 4 |
+
[parse]
|
| 5 |
+
sourcefile=[ "blktiger.cpp" ]
|
| 6 |
+
skip.bootlegs=true
|
| 7 |
+
|
| 8 |
+
[Audio]
|
| 9 |
+
volume = [
|
| 10 |
+
{ machine="blktiger", value=0x25 },
|
| 11 |
+
]
|
| 12 |
+
|
| 13 |
+
[buttons]
|
| 14 |
+
names=[
|
| 15 |
+
{ names="Attack,Jump" }
|
| 16 |
+
]
|
| 17 |
+
|
| 18 |
+
[ROM]
|
| 19 |
+
regions=[
|
| 20 |
+
{ name="maincpu", no_offset=true, sequence=[1,2,3,4,0] },
|
| 21 |
+
{ name="audiocpu", start="JTFRAME_BA1_START" },
|
| 22 |
+
{ name="chars", start="CHAR_START", reverse=true, no_offset=true },
|
| 23 |
+
{ name="tiles", start="JTFRAME_BA2_START", sequence=[2,0,3,1], width=16 },
|
| 24 |
+
# { name="sprites", start="JTFRAME_BA3_START", sequence=[0,2,1,3], width=16 },
|
| 25 |
+
{ name="sprites", start="JTFRAME_BA3_START", sequence=[2,0,3,1], width=16 },
|
| 26 |
+
{ name="mcu", start="JTFRAME_PROM_START" },
|
| 27 |
+
{ name="proms" }
|
| 28 |
+
]
|
| 29 |
+
|
| 30 |
+
order=[
|
| 31 |
+
"maincpu", "audiocpu", "chars",
|
| 32 |
+
"tiles", "sprites", "mcu", "proms"
|
| 33 |
+
]
|
snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/mem.yaml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
params:
|
| 2 |
+
- { name: CHAR_OFFSET, value: "(`CHAR_START-`JTFRAME_BA1_START)>>1" }
|
| 3 |
+
audio:
|
| 4 |
+
missing_info: true # unknown value for PSG resistors, assuming same filtering as gng
|
| 5 |
+
channels:
|
| 6 |
+
- { name: psg0, module: jt03_psg, rsum: 68k }
|
| 7 |
+
- { name: psg1, module: jt03_psg, rsum: 68k }
|
| 8 |
+
- { name: fm0, module: jt03_fm, rsum: 47k, rc: [{ r: 1rout, c: 1n }]}
|
| 9 |
+
- { name: fm1, module: jt03_fm, rsum: 47k, rc: [{ r: 1rout, c: 1n }]}
|
| 10 |
+
download:
|
| 11 |
+
post_addr: true
|
| 12 |
+
sdram:
|
| 13 |
+
banks:
|
| 14 |
+
- buses:
|
| 15 |
+
- name: main
|
| 16 |
+
addr_width: 19
|
| 17 |
+
data_width: 8
|
| 18 |
+
- buses:
|
| 19 |
+
- name: snd
|
| 20 |
+
addr_width: 15
|
| 21 |
+
data_width: 8
|
| 22 |
+
- name: char
|
| 23 |
+
addr_width: 15
|
| 24 |
+
data_width: 16
|
| 25 |
+
cs: LVBL
|
| 26 |
+
offset: CHAR_OFFSET
|
| 27 |
+
- buses:
|
| 28 |
+
- name: scr
|
| 29 |
+
addr_width: 18
|
| 30 |
+
data_width: 16
|
| 31 |
+
cs: LVBL
|
| 32 |
+
- buses:
|
| 33 |
+
- name: obj
|
| 34 |
+
addr_width: 18
|
| 35 |
+
data_width: 16
|
| 36 |
+
cs: LVBL
|
snapshots/jotego_jtcores_pr1100/cores/btiger/cfg/msg
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
BLACK TIGER/DRAGON
|
| 2 |
+
BROUGHT TO YOU BY JOTEGO.
|
| 3 |
+
HTTP://PATREON.COM/JOTEGO
|
| 4 |
+
|
| 5 |
+
6th January 2020
|
| 6 |
+
|
| 7 |
+
SCRALINGS SUVERMAN
|
| 8 |
+
|
| 9 |
+
ARCADE EXPRESS
|
| 10 |
+
FREDERIC MAHE JO TOMIYORI
|
| 11 |
+
BRIAN SALLEE PHILLIP MCMAHON
|
| 12 |
+
DUSTIN HUBBARD DANIEL BAUZA
|
| 13 |
+
|
| 14 |
+
Andrew Moore Andyways
|
| 15 |
+
Don Gafford J. Slowfret
|
| 16 |
+
Kyle Good Leslie Law
|
| 17 |
+
M. Astudillo Mary Marshall
|
| 18 |
+
Matthew Young Oliver Jaksch
|
| 19 |
+
Blackstar Oscar Laguna
|
| 20 |
+
Roman Buser Ryan Fig
|
| 21 |
+
Steve Suavek Steve Wilson
|
| 22 |
+
Toby Boreham Xzarian
|
| 23 |
+
Xzarian Sembiance
|
| 24 |
+
ultrarobotninja William Clemens
|
| 25 |
+
Victor Gomariz
|
snapshots/jotego_jtcores_pr1100/cores/btiger/doc/blktiger.cpp
ADDED
|
@@ -0,0 +1,1086 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// license:BSD-3-Clause
|
| 2 |
+
// copyright-holders:Paul Leaman
|
| 3 |
+
/***************************************************************************
|
| 4 |
+
|
| 5 |
+
Black Tiger
|
| 6 |
+
|
| 7 |
+
Driver provided by Paul Leaman
|
| 8 |
+
|
| 9 |
+
Thanks to Ishmair for providing information about the screen
|
| 10 |
+
layout on level 3.
|
| 11 |
+
|
| 12 |
+
Notes:
|
| 13 |
+
- sprites/tile priority is a guess. I didn't find a PROM that would simply
|
| 14 |
+
translate to the scheme I implemented.
|
| 15 |
+
|
| 16 |
+
***************************************************************************
|
| 17 |
+
|
| 18 |
+
Black Tiger / Black Dragon (Capcom, 1987)
|
| 19 |
+
Hardware info by Guru
|
| 20 |
+
|
| 21 |
+
Note boards connect solder side to solder side and parts face outwards
|
| 22 |
+
on both boards.
|
| 23 |
+
|
| 24 |
+
Top Board
|
| 25 |
+
---------
|
| 26 |
+
|
| 27 |
+
CAPCOM
|
| 28 |
+
87118-A-X1
|
| 29 |
+
|-------------------------------------------------------------------------|
|
| 30 |
+
| VOL |------------------| BD_06.1L |
|
| 31 |
+
| HA13001 YM3014 YM2203 |138 138 21 08 | |
|
| 32 |
+
| |2kB 174 367 74 74| 3.579545MHz|
|
| 33 |
+
| M5224 YM3014 YM2203 |Z80 139 | JP7..12 |
|
| 34 |
+
| |---SOUND_MODULE---| |
|
| 35 |
+
| |
|
| 36 |
+
| 5814 4364 |
|
| 37 |
+
|J BD.6K |
|
| 38 |
+
|A BD_U_01A.5E |
|
| 39 |
+
|M 5814 24MHz |
|
| 40 |
+
|M BD_U_02A.6E |
|
| 41 |
+
|A |
|
| 42 |
+
| BD01.8J |
|
| 43 |
+
| BD_U_03A.8E |
|
| 44 |
+
| JP1..6 BD02.9J |
|
| 45 |
+
| SW2 BD_U_04A.9E |
|
| 46 |
+
| |
|
| 47 |
+
| BD_U_05A.10E BD03.11K |
|
| 48 |
+
| SW1 BD04.11L |
|
| 49 |
+
| Z80 |
|
| 50 |
+
|--------|--------------|-------------------------|--------------|--------|
|
| 51 |
+
|--------------| |--------------|
|
| 52 |
+
Notes:
|
| 53 |
+
Z80 - Zilog Z084006PSC CPU (main CPU). Clock input 6MHz [24/4]
|
| 54 |
+
Z80 (sound module) - Zilog Z084004PSC CPU (sound CPU). Clock input 3.579545MHz
|
| 55 |
+
BD.6K - Intel D8751H-8 Microcontroller with internal 4kBx8-bit EPROM and 128 bytes internal RAM. Clock input 8.000MHz [24/3]
|
| 56 |
+
YM2203 - Yamaha YM2203 FM Operator Type-N (OPN) sound chip. Clock input 3.579545MHz (both)
|
| 57 |
+
YM3014 - Yamaha YM3014B Serial Input Floating D/A Converter. Clock input 1.193181667MHz [3.579545/3] (both)
|
| 58 |
+
SOUND_MODULE - Contains commonly available parts.... logic, Z80A and 2kBx8-bit SRAM
|
| 59 |
+
JP1..6 - 0-ohm jumpers. JP1 & JP6 are shorted, others are open
|
| 60 |
+
JP7..12 - 0-ohm jumpers. JP10 & JP11 are shorted, others are open
|
| 61 |
+
HA13001 - Hitachi HA13001 5.5W Dual / 17.5W BTL Audio Power Amplifier
|
| 62 |
+
SW1/2 - 8-position DIP switch
|
| 63 |
+
M5224 - Mitsubishi M5224 Quad Operational Amplifier (compatible with LM324)
|
| 64 |
+
2kB - 2kBx8-bit SRAM (inside sound module). Compatible with 6116, 2018, 5814, 4016 etc.
|
| 65 |
+
5814 - Sony CXK5814 2kBx8-bit SRAM (color RAM)
|
| 66 |
+
4364 - NEC D4364 8kBx8-bit SRAM (main program RAM)
|
| 67 |
+
BD01.8J - Signetics 82S129 bipolar PROM. When removed: No backgrounds and no sprites. Text layer/characters ok.
|
| 68 |
+
BD02.9J - Signetics 82S129 bipolar PROM. When removed: Affects sprites, sometimes they are partial or disappear under tiles.
|
| 69 |
+
BD03.11K - Signetics 82S129 bipolar PROM. Timing. When removed: Black screen, no syncs, game plays blind.
|
| 70 |
+
BD04.11L - Signetics 82S129 bipolar PROM. Timing. When removed: No bootup, shows only static garbage
|
| 71 |
+
BD_06.1L - Hitachi HN27256 32kBx8-bit OTP EPROM (sound program)
|
| 72 |
+
BD_U_01A.5E - \
|
| 73 |
+
BD_U_02A.6E - \ 27C512 EPROM or OTP EPROM (main program)
|
| 74 |
+
BD_U_03A.8E - /
|
| 75 |
+
BD_U_04A.9E - /
|
| 76 |
+
BD_U_05A.10E - /
|
| 77 |
+
VSync - 59.6373Hz
|
| 78 |
+
HSync - 15.6250kHz
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
Bottom Board
|
| 82 |
+
------------
|
| 83 |
+
|
| 84 |
+
CAPCOM
|
| 85 |
+
87118-B-X1
|
| 86 |
+
|--------------| |--------------|
|
| 87 |
+
|--------|--------------|-------------------------|--------------|--------|
|
| 88 |
+
| 86S100 |
|
| 89 |
+
| |-------| |
|
| 90 |
+
| |CAPCOM | BD_U_15.2N |
|
| 91 |
+
| |86S105 | |
|
| 92 |
+
| |RJ5C39 | 2018 2018 |
|
| 93 |
+
| |-------| |
|
| 94 |
+
| |
|
| 95 |
+
| |
|
| 96 |
+
| BD_07.4A BD_U_11A.4B |
|
| 97 |
+
| |
|
| 98 |
+
| BD_08.5A BD_U_12A.5B |
|
| 99 |
+
| |
|
| 100 |
+
| 4016 |
|
| 101 |
+
| 86S100 86S100 |
|
| 102 |
+
| |
|
| 103 |
+
| BD_09.8A BD_U_13A.8B |
|
| 104 |
+
| |
|
| 105 |
+
| BD_10.9A BD_U_14A.9B 43256 |
|
| 106 |
+
| JP7..8 JP9..12 |
|
| 107 |
+
| JP1..6 |
|
| 108 |
+
|-------------------------------------------------------------------------|
|
| 109 |
+
Notes:
|
| 110 |
+
86S105 - Custom PLCC84 chip marked 'CAPCOM 86S105 RJ5C39 863 32 JAPAN'. Manufactured by Ricoh
|
| 111 |
+
This chip is used to generate sprites. Note the chip has 3x 2kBx8-bit (6kB) internal SRAM.
|
| 112 |
+
This chip fails often so when a game that uses this chip has vertical jailbars in the sprites
|
| 113 |
+
most likely this chip has failed.
|
| 114 |
+
86S100 - Custom chip marked 'CAPCOM 86S100 M ^ 73100'. ^ = triangle. Manufactured by Texas Instruments
|
| 115 |
+
This chip is similar to 2x 74LS165 8-bit parallel-to-serial shift register chips in one package
|
| 116 |
+
but with direction control and two data modes (4-bit/8-bit).
|
| 117 |
+
JP1..6 - 0-ohm jumpers. JP1 & JP5 are shorted, others are open
|
| 118 |
+
JP7..8 - 0-ohm jumpers. JP7 shorted, JP8 open
|
| 119 |
+
JP9..12 - 0-ohm jumpers. JP12 shorted, others are open
|
| 120 |
+
43256 - NEC D43256 32kBx8-bit SRAM (background tile RAM)
|
| 121 |
+
2018 - Toshiba TMM2018 2kBx8-bit SRAM (additional sprite RAM.... see note above re: 86S105)
|
| 122 |
+
4016 - NEC D4016 2kBx8-bit SRAM (text layer / character RAM)
|
| 123 |
+
BD_07.4A \
|
| 124 |
+
BD_08.5A \ 27C512 EPROM or OTP EPROM
|
| 125 |
+
BD_09.8A /
|
| 126 |
+
BD_10.9A /
|
| 127 |
+
BD_U_11A.4B \
|
| 128 |
+
BD_U_12A.5B \
|
| 129 |
+
BD_U_13A.8B / 27512 OTP EPROM
|
| 130 |
+
BD_U_14A.9B /
|
| 131 |
+
BD_U_15.2N - 27256 OTP EPROM
|
| 132 |
+
|
| 133 |
+
***************************************************************************/
|
| 134 |
+
|
| 135 |
+
|
| 136 |
+
#include "emu.h"
|
| 137 |
+
|
| 138 |
+
#include "cpu/mcs51/mcs51.h"
|
| 139 |
+
#include "cpu/z80/z80.h"
|
| 140 |
+
#include "machine/gen_latch.h"
|
| 141 |
+
#include "machine/watchdog.h"
|
| 142 |
+
#include "sound/ymopn.h"
|
| 143 |
+
#include "video/bufsprite.h"
|
| 144 |
+
|
| 145 |
+
#include "emupal.h"
|
| 146 |
+
#include "screen.h"
|
| 147 |
+
#include "speaker.h"
|
| 148 |
+
#include "tilemap.h"
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
// configurable logging
|
| 152 |
+
#define LOG_MCU (1U << 1)
|
| 153 |
+
|
| 154 |
+
//#define VERBOSE (LOG_GENERAL | LOG_MCU)
|
| 155 |
+
|
| 156 |
+
#include "logmacro.h"
|
| 157 |
+
|
| 158 |
+
#define LOGMCU(...) LOGMASKED(LOG_MCU, __VA_ARGS__)
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
namespace {
|
| 162 |
+
|
| 163 |
+
class blktiger_state : public driver_device
|
| 164 |
+
{
|
| 165 |
+
public:
|
| 166 |
+
blktiger_state(const machine_config &mconfig, device_type type, const char *tag) :
|
| 167 |
+
driver_device(mconfig, type, tag),
|
| 168 |
+
m_txvideoram(*this, "txvideoram"),
|
| 169 |
+
m_scrollram(*this, "scrollram", BGRAM_BANK_SIZE * BGRAM_BANKS, ENDIANNESS_LITTLE),
|
| 170 |
+
m_mainbank(*this, "mainbank"),
|
| 171 |
+
m_coin_lockout(*this, "COIN_LOCKOUT"),
|
| 172 |
+
m_maincpu(*this, "maincpu"),
|
| 173 |
+
m_audiocpu(*this, "audiocpu"),
|
| 174 |
+
m_spriteram(*this, "spriteram"),
|
| 175 |
+
m_gfxdecode(*this, "gfxdecode"),
|
| 176 |
+
m_palette(*this, "palette")
|
| 177 |
+
{ }
|
| 178 |
+
|
| 179 |
+
void init_blktigerb3();
|
| 180 |
+
void nomcu(machine_config &config);
|
| 181 |
+
|
| 182 |
+
protected:
|
| 183 |
+
virtual void machine_start() override;
|
| 184 |
+
virtual void machine_reset() override;
|
| 185 |
+
virtual void video_start() override;
|
| 186 |
+
|
| 187 |
+
void nomcu_main_io_map(address_map &map);
|
| 188 |
+
|
| 189 |
+
private:
|
| 190 |
+
// memory pointers
|
| 191 |
+
required_shared_ptr<uint8_t> m_txvideoram;
|
| 192 |
+
memory_share_creator<uint8_t> m_scrollram;
|
| 193 |
+
required_memory_bank m_mainbank;
|
| 194 |
+
|
| 195 |
+
// I/O
|
| 196 |
+
required_ioport m_coin_lockout;
|
| 197 |
+
|
| 198 |
+
// video-related
|
| 199 |
+
tilemap_t *m_tx_tilemap = nullptr;
|
| 200 |
+
tilemap_t *m_bg_tilemap8x4 = nullptr;
|
| 201 |
+
tilemap_t *m_bg_tilemap4x8 = nullptr;
|
| 202 |
+
uint32_t m_scroll_bank = 0U;
|
| 203 |
+
uint8_t m_scroll_x[2]{};
|
| 204 |
+
uint8_t m_scroll_y[2]{};
|
| 205 |
+
uint8_t m_screen_layout = 0U;
|
| 206 |
+
uint8_t m_chon = 0U;
|
| 207 |
+
uint8_t m_objon = 0U;
|
| 208 |
+
uint8_t m_bgon = 0U;
|
| 209 |
+
static constexpr uint16_t BGRAM_BANK_SIZE = 0x1000;
|
| 210 |
+
static constexpr uint8_t BGRAM_BANKS = 4;
|
| 211 |
+
|
| 212 |
+
// devices
|
| 213 |
+
required_device<cpu_device> m_maincpu;
|
| 214 |
+
required_device<cpu_device> m_audiocpu;
|
| 215 |
+
required_device<buffered_spriteram8_device> m_spriteram;
|
| 216 |
+
required_device<gfxdecode_device> m_gfxdecode;
|
| 217 |
+
required_device<palette_device> m_palette;
|
| 218 |
+
|
| 219 |
+
void bankswitch_w(uint8_t data);
|
| 220 |
+
void coinlockout_w(uint8_t data);
|
| 221 |
+
void txvideoram_w(offs_t offset, uint8_t data);
|
| 222 |
+
uint8_t bgvideoram_r(offs_t offset);
|
| 223 |
+
void bgvideoram_w(offs_t offset, uint8_t data);
|
| 224 |
+
void bgvideoram_bank_w(uint8_t data);
|
| 225 |
+
void scrolly_w(offs_t offset, uint8_t data);
|
| 226 |
+
void scrollx_w(offs_t offset, uint8_t data);
|
| 227 |
+
void video_control_w(uint8_t data);
|
| 228 |
+
void video_enable_w(uint8_t data);
|
| 229 |
+
void screen_layout_w(uint8_t data);
|
| 230 |
+
TILEMAP_MAPPER_MEMBER(bg8x4_scan);
|
| 231 |
+
TILEMAP_MAPPER_MEMBER(bg4x8_scan);
|
| 232 |
+
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
| 233 |
+
TILE_GET_INFO_MEMBER(get_tx_tile_info);
|
| 234 |
+
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
| 235 |
+
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
| 236 |
+
|
| 237 |
+
void main_prg_map(address_map &map);
|
| 238 |
+
void sound_map(address_map &map);
|
| 239 |
+
};
|
| 240 |
+
|
| 241 |
+
class blktiger_mcu_state : public blktiger_state
|
| 242 |
+
{
|
| 243 |
+
public:
|
| 244 |
+
blktiger_mcu_state(const machine_config &mconfig, device_type type, const char *tag) :
|
| 245 |
+
blktiger_state(mconfig, type, tag),
|
| 246 |
+
m_mcu(*this, "mcu")
|
| 247 |
+
{ }
|
| 248 |
+
|
| 249 |
+
void mcu(machine_config &config);
|
| 250 |
+
|
| 251 |
+
protected:
|
| 252 |
+
virtual void machine_start() override;
|
| 253 |
+
virtual void machine_reset() override;
|
| 254 |
+
|
| 255 |
+
private:
|
| 256 |
+
// MCU-related
|
| 257 |
+
uint8_t m_z80_latch = 0U;
|
| 258 |
+
uint8_t m_i8751_latch = 0U;
|
| 259 |
+
|
| 260 |
+
// devices
|
| 261 |
+
required_device<i8751_device> m_mcu;
|
| 262 |
+
|
| 263 |
+
uint8_t from_mcu_r();
|
| 264 |
+
void to_mcu_w(uint8_t data);
|
| 265 |
+
uint8_t from_main_r();
|
| 266 |
+
void to_main_w(uint8_t data);
|
| 267 |
+
|
| 268 |
+
void mcu_main_io_map(address_map &map);
|
| 269 |
+
};
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
// video
|
| 273 |
+
|
| 274 |
+
/***************************************************************************
|
| 275 |
+
|
| 276 |
+
Callbacks for the TileMap code
|
| 277 |
+
|
| 278 |
+
***************************************************************************/
|
| 279 |
+
|
| 280 |
+
TILEMAP_MAPPER_MEMBER(blktiger_state::bg8x4_scan)
|
| 281 |
+
{
|
| 282 |
+
// logical (col,row) -> memory offset
|
| 283 |
+
return (col & 0x0f) + ((row & 0x0f) << 4) + ((col & 0x70) << 4) + ((row & 0x30) << 7);
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
TILEMAP_MAPPER_MEMBER(blktiger_state::bg4x8_scan)
|
| 287 |
+
{
|
| 288 |
+
// logical (col,row) -> memory offset
|
| 289 |
+
return (col & 0x0f) + ((row & 0x0f) << 4) + ((col & 0x30) << 4) + ((row & 0x70) << 6);
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
TILE_GET_INFO_MEMBER(blktiger_state::get_bg_tile_info)
|
| 293 |
+
{
|
| 294 |
+
// the tile priority table is a guess compiled by looking at the game. It was not derived from a PROM so it could be wrong.
|
| 295 |
+
static const uint8_t split_table[16] =
|
| 296 |
+
{
|
| 297 |
+
3,3,2,2,
|
| 298 |
+
1,1,0,0,
|
| 299 |
+
0,0,0,0,
|
| 300 |
+
0,0,0,0
|
| 301 |
+
};
|
| 302 |
+
uint8_t attr = m_scrollram[2 * tile_index + 1];
|
| 303 |
+
int color = (attr & 0x78) >> 3;
|
| 304 |
+
tileinfo.set(1,
|
| 305 |
+
m_scrollram[2 * tile_index] + ((attr & 0x07) << 8),
|
| 306 |
+
color,
|
| 307 |
+
(attr & 0x80) ? TILE_FLIPX : 0);
|
| 308 |
+
tileinfo.group = split_table[color];
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
TILE_GET_INFO_MEMBER(blktiger_state::get_tx_tile_info)
|
| 312 |
+
{
|
| 313 |
+
uint8_t attr = m_txvideoram[tile_index + 0x400];
|
| 314 |
+
tileinfo.set(0,
|
| 315 |
+
m_txvideoram[tile_index] + ((attr & 0xe0) << 3),
|
| 316 |
+
attr & 0x1f,
|
| 317 |
+
0);
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
/***************************************************************************
|
| 322 |
+
|
| 323 |
+
Start the video hardware emulation.
|
| 324 |
+
|
| 325 |
+
***************************************************************************/
|
| 326 |
+
|
| 327 |
+
void blktiger_state::video_start()
|
| 328 |
+
{
|
| 329 |
+
m_chon = 1;
|
| 330 |
+
m_bgon = 1;
|
| 331 |
+
m_objon = 1;
|
| 332 |
+
m_screen_layout = 0;
|
| 333 |
+
|
| 334 |
+
m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(blktiger_state::get_tx_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
| 335 |
+
m_bg_tilemap8x4 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(blktiger_state::get_bg_tile_info)), tilemap_mapper_delegate(*this, FUNC(blktiger_state::bg8x4_scan)), 16, 16, 128, 64);
|
| 336 |
+
m_bg_tilemap4x8 = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(blktiger_state::get_bg_tile_info)), tilemap_mapper_delegate(*this, FUNC(blktiger_state::bg4x8_scan)), 16, 16, 64, 128);
|
| 337 |
+
|
| 338 |
+
m_tx_tilemap->set_transparent_pen(3);
|
| 339 |
+
|
| 340 |
+
m_bg_tilemap8x4->set_transmask(0, 0xffff, 0x8000); // split type 0 is totally transparent in front half
|
| 341 |
+
m_bg_tilemap8x4->set_transmask(1, 0xfff0, 0x800f); // split type 1 has pens 4-15 transparent in front half
|
| 342 |
+
m_bg_tilemap8x4->set_transmask(2, 0xff00, 0x80ff); // split type 1 has pens 8-15 transparent in front half
|
| 343 |
+
m_bg_tilemap8x4->set_transmask(3, 0xf000, 0x8fff); // split type 1 has pens 12-15 transparent in front half
|
| 344 |
+
m_bg_tilemap4x8->set_transmask(0, 0xffff, 0x8000);
|
| 345 |
+
m_bg_tilemap4x8->set_transmask(1, 0xfff0, 0x800f);
|
| 346 |
+
m_bg_tilemap4x8->set_transmask(2, 0xff00, 0x80ff);
|
| 347 |
+
m_bg_tilemap4x8->set_transmask(3, 0xf000, 0x8fff);
|
| 348 |
+
|
| 349 |
+
m_tx_tilemap->set_scrolldx(128, 128);
|
| 350 |
+
m_tx_tilemap->set_scrolldy( 6, 6);
|
| 351 |
+
m_bg_tilemap8x4->set_scrolldx(128, 128);
|
| 352 |
+
m_bg_tilemap8x4->set_scrolldy( 6, 6);
|
| 353 |
+
m_bg_tilemap4x8->set_scrolldx(128, 128);
|
| 354 |
+
m_bg_tilemap4x8->set_scrolldy( 6, 6);
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
/***************************************************************************
|
| 360 |
+
|
| 361 |
+
Memory handlers
|
| 362 |
+
|
| 363 |
+
***************************************************************************/
|
| 364 |
+
|
| 365 |
+
void blktiger_state::txvideoram_w(offs_t offset, uint8_t data)
|
| 366 |
+
{
|
| 367 |
+
m_txvideoram[offset] = data;
|
| 368 |
+
m_tx_tilemap->mark_tile_dirty(offset & 0x3ff);
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
uint8_t blktiger_state::bgvideoram_r(offs_t offset)
|
| 372 |
+
{
|
| 373 |
+
return m_scrollram[offset + m_scroll_bank];
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
void blktiger_state::bgvideoram_w(offs_t offset, uint8_t data)
|
| 377 |
+
{
|
| 378 |
+
offset += m_scroll_bank;
|
| 379 |
+
|
| 380 |
+
m_scrollram[offset] = data;
|
| 381 |
+
m_bg_tilemap8x4->mark_tile_dirty(offset / 2);
|
| 382 |
+
m_bg_tilemap4x8->mark_tile_dirty(offset / 2);
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
void blktiger_state::bgvideoram_bank_w(uint8_t data)
|
| 386 |
+
{
|
| 387 |
+
m_scroll_bank = (data % BGRAM_BANKS) * BGRAM_BANK_SIZE;
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
void blktiger_state::scrolly_w(offs_t offset, uint8_t data)
|
| 392 |
+
{
|
| 393 |
+
m_scroll_y[offset] = data;
|
| 394 |
+
int scrolly = m_scroll_y[0] | (m_scroll_y[1] << 8);
|
| 395 |
+
m_bg_tilemap8x4->set_scrolly(0, scrolly);
|
| 396 |
+
m_bg_tilemap4x8->set_scrolly(0, scrolly);
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
void blktiger_state::scrollx_w(offs_t offset, uint8_t data)
|
| 400 |
+
{
|
| 401 |
+
m_scroll_x[offset] = data;
|
| 402 |
+
int scrollx = m_scroll_x[0] | (m_scroll_x[1] << 8);
|
| 403 |
+
m_bg_tilemap8x4->set_scrollx(0, scrollx);
|
| 404 |
+
m_bg_tilemap4x8->set_scrollx(0, scrollx);
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
|
| 408 |
+
void blktiger_state::video_control_w(uint8_t data)
|
| 409 |
+
{
|
| 410 |
+
// bits 0 and 1 are coin counters
|
| 411 |
+
machine().bookkeeping().coin_counter_w(0,data & 1);
|
| 412 |
+
machine().bookkeeping().coin_counter_w(1,data & 2);
|
| 413 |
+
|
| 414 |
+
// bit 5 resets the sound CPU
|
| 415 |
+
m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE);
|
| 416 |
+
|
| 417 |
+
// bit 6 flips screen
|
| 418 |
+
flip_screen_set(data & 0x40);
|
| 419 |
+
|
| 420 |
+
// bit 7 enables characters? Just a guess
|
| 421 |
+
m_chon = ~data & 0x80;
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
void blktiger_state::video_enable_w(uint8_t data)
|
| 425 |
+
{
|
| 426 |
+
// not sure which is which, but I think that bit 1 and 2 enable background and sprites
|
| 427 |
+
// bit 1 enables bg ?
|
| 428 |
+
m_bgon = ~data & 0x02;
|
| 429 |
+
|
| 430 |
+
// bit 2 enables sprites ?
|
| 431 |
+
m_objon = ~data & 0x04;
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
void blktiger_state::screen_layout_w(uint8_t data)
|
| 435 |
+
{
|
| 436 |
+
m_screen_layout = data;
|
| 437 |
+
m_bg_tilemap8x4->enable(m_screen_layout);
|
| 438 |
+
m_bg_tilemap4x8->enable(!m_screen_layout);
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
|
| 442 |
+
|
| 443 |
+
/***************************************************************************
|
| 444 |
+
|
| 445 |
+
Display refresh
|
| 446 |
+
|
| 447 |
+
***************************************************************************/
|
| 448 |
+
|
| 449 |
+
void blktiger_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
| 450 |
+
{
|
| 451 |
+
uint8_t *buffered_spriteram = m_spriteram->buffer();
|
| 452 |
+
|
| 453 |
+
// Draw the sprites.
|
| 454 |
+
for (int offs = m_spriteram->bytes() - 4; offs >= 0; offs -= 4)
|
| 455 |
+
{
|
| 456 |
+
int attr = buffered_spriteram[offs + 1];
|
| 457 |
+
int sx = buffered_spriteram[offs + 3] - ((attr & 0x10) << 4);
|
| 458 |
+
int sy = buffered_spriteram[offs + 2];
|
| 459 |
+
int code = buffered_spriteram[offs] | ((attr & 0xe0) << 3);
|
| 460 |
+
int color = attr & 0x07;
|
| 461 |
+
int flipx = attr & 0x08;
|
| 462 |
+
|
| 463 |
+
if (flip_screen())
|
| 464 |
+
{
|
| 465 |
+
sx = 240 - sx;
|
| 466 |
+
sy = 240 - sy;
|
| 467 |
+
flipx = !flipx;
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
m_gfxdecode->gfx(2)->transpen(bitmap, cliprect,
|
| 471 |
+
code,
|
| 472 |
+
color,
|
| 473 |
+
flipx, flip_screen(),
|
| 474 |
+
sx + 128, sy + 6, 15);
|
| 475 |
+
}
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
uint32_t blktiger_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
| 479 |
+
{
|
| 480 |
+
bitmap.fill(1023, cliprect);
|
| 481 |
+
|
| 482 |
+
if (m_bgon)
|
| 483 |
+
(m_screen_layout ? m_bg_tilemap8x4 : m_bg_tilemap4x8)->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER1, 0);
|
| 484 |
+
|
| 485 |
+
if (m_objon)
|
| 486 |
+
draw_sprites(bitmap, cliprect);
|
| 487 |
+
|
| 488 |
+
if (m_bgon)
|
| 489 |
+
(m_screen_layout ? m_bg_tilemap8x4 : m_bg_tilemap4x8)->draw(screen, bitmap, cliprect, TILEMAP_DRAW_LAYER0, 0);
|
| 490 |
+
|
| 491 |
+
if (m_chon)
|
| 492 |
+
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
| 493 |
+
|
| 494 |
+
return 0;
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
|
| 498 |
+
// machine
|
| 499 |
+
|
| 500 |
+
/**************************************************
|
| 501 |
+
|
| 502 |
+
Protection comms between main cpu and i8751
|
| 503 |
+
|
| 504 |
+
**************************************************/
|
| 505 |
+
|
| 506 |
+
uint8_t blktiger_mcu_state::from_mcu_r()
|
| 507 |
+
{
|
| 508 |
+
return m_i8751_latch;
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
void blktiger_mcu_state::to_mcu_w(uint8_t data)
|
| 512 |
+
{
|
| 513 |
+
m_mcu->set_input_line(MCS51_INT1_LINE, ASSERT_LINE);
|
| 514 |
+
m_z80_latch = data;
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
uint8_t blktiger_mcu_state::from_main_r()
|
| 518 |
+
{
|
| 519 |
+
m_mcu->set_input_line(MCS51_INT1_LINE, CLEAR_LINE);
|
| 520 |
+
LOGMCU("%02x read\n", m_z80_latch);
|
| 521 |
+
return m_z80_latch;
|
| 522 |
+
}
|
| 523 |
+
|
| 524 |
+
void blktiger_mcu_state::to_main_w(uint8_t data)
|
| 525 |
+
{
|
| 526 |
+
LOGMCU("%02x write\n", data);
|
| 527 |
+
m_i8751_latch = data;
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
|
| 531 |
+
|
| 532 |
+
void blktiger_state::bankswitch_w(uint8_t data)
|
| 533 |
+
{
|
| 534 |
+
m_mainbank->set_entry(data & 0x0f);
|
| 535 |
+
}
|
| 536 |
+
|
| 537 |
+
void blktiger_state::coinlockout_w(uint8_t data)
|
| 538 |
+
{
|
| 539 |
+
if (m_coin_lockout->read() & 0x01)
|
| 540 |
+
{
|
| 541 |
+
machine().bookkeeping().coin_lockout_w(0, ~data & 0x01);
|
| 542 |
+
machine().bookkeeping().coin_lockout_w(1, ~data & 0x02);
|
| 543 |
+
}
|
| 544 |
+
}
|
| 545 |
+
|
| 546 |
+
|
| 547 |
+
void blktiger_state::main_prg_map(address_map &map)
|
| 548 |
+
{
|
| 549 |
+
map(0x0000, 0x7fff).rom();
|
| 550 |
+
map(0x8000, 0xbfff).bankr(m_mainbank);
|
| 551 |
+
map(0xc000, 0xcfff).rw(FUNC(blktiger_state::bgvideoram_r), FUNC(blktiger_state::bgvideoram_w));
|
| 552 |
+
map(0xd000, 0xd7ff).ram().w(FUNC(blktiger_state::txvideoram_w)).share(m_txvideoram);
|
| 553 |
+
map(0xd800, 0xdbff).ram().w(m_palette, FUNC(palette_device::write8)).share("palette");
|
| 554 |
+
map(0xdc00, 0xdfff).ram().w(m_palette, FUNC(palette_device::write8_ext)).share("palette_ext");
|
| 555 |
+
map(0xe000, 0xfdff).ram();
|
| 556 |
+
map(0xfe00, 0xffff).ram().share("spriteram");
|
| 557 |
+
}
|
| 558 |
+
|
| 559 |
+
void blktiger_state::nomcu_main_io_map(address_map &map)
|
| 560 |
+
{
|
| 561 |
+
map.global_mask(0xff);
|
| 562 |
+
map(0x00, 0x00).portr("IN0").w("soundlatch", FUNC(generic_latch_8_device::write));
|
| 563 |
+
map(0x01, 0x01).portr("IN1").w(FUNC(blktiger_state::bankswitch_w));
|
| 564 |
+
map(0x02, 0x02).portr("IN2");
|
| 565 |
+
map(0x03, 0x03).portr("DSW0").w(FUNC(blktiger_state::coinlockout_w));
|
| 566 |
+
map(0x04, 0x04).portr("DSW1").w(FUNC(blktiger_state::video_control_w));
|
| 567 |
+
map(0x05, 0x05).portr("FREEZE");
|
| 568 |
+
map(0x06, 0x06).w("watchdog", FUNC(watchdog_timer_device::reset_w));
|
| 569 |
+
map(0x07, 0x07).noprw(); // Software protection (7)
|
| 570 |
+
map(0x08, 0x09).w(FUNC(blktiger_state::scrollx_w));
|
| 571 |
+
map(0x0a, 0x0b).w(FUNC(blktiger_state::scrolly_w));
|
| 572 |
+
map(0x0c, 0x0c).w(FUNC(blktiger_state::video_enable_w));
|
| 573 |
+
map(0x0d, 0x0d).w(FUNC(blktiger_state::bgvideoram_bank_w));
|
| 574 |
+
map(0x0e, 0x0e).w(FUNC(blktiger_state::screen_layout_w));
|
| 575 |
+
}
|
| 576 |
+
|
| 577 |
+
void blktiger_mcu_state::mcu_main_io_map(address_map &map)
|
| 578 |
+
{
|
| 579 |
+
nomcu_main_io_map(map);
|
| 580 |
+
|
| 581 |
+
map(0x07, 0x07).rw(FUNC(blktiger_mcu_state::from_mcu_r), FUNC(blktiger_mcu_state::to_mcu_w)); // Software protection (7)
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
void blktiger_state::sound_map(address_map &map)
|
| 585 |
+
{
|
| 586 |
+
map(0x0000, 0x7fff).rom();
|
| 587 |
+
map(0xc000, 0xc7ff).ram();
|
| 588 |
+
map(0xc800, 0xc800).r("soundlatch", FUNC(generic_latch_8_device::read));
|
| 589 |
+
map(0xe000, 0xe001).rw("ym1", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
|
| 590 |
+
map(0xe002, 0xe003).rw("ym2", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
|
| 591 |
+
}
|
| 592 |
+
|
| 593 |
+
|
| 594 |
+
|
| 595 |
+
static INPUT_PORTS_START( blktiger )
|
| 596 |
+
PORT_START("IN0")
|
| 597 |
+
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
| 598 |
+
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
| 599 |
+
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // probably unused
|
| 600 |
+
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // probably unused
|
| 601 |
+
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // probably unused
|
| 602 |
+
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
| 603 |
+
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
| 604 |
+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
| 605 |
+
|
| 606 |
+
PORT_START("IN1")
|
| 607 |
+
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
| 608 |
+
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
| 609 |
+
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
| 610 |
+
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
| 611 |
+
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
| 612 |
+
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
| 613 |
+
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // probably unused
|
| 614 |
+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // probably unused
|
| 615 |
+
|
| 616 |
+
PORT_START("IN2")
|
| 617 |
+
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
| 618 |
+
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
| 619 |
+
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
| 620 |
+
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
| 621 |
+
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
| 622 |
+
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
| 623 |
+
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // probably unused
|
| 624 |
+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // probably unused
|
| 625 |
+
|
| 626 |
+
PORT_START("DSW0")
|
| 627 |
+
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION( "SW1:1,2,3" )
|
| 628 |
+
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
| 629 |
+
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
|
| 630 |
+
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
|
| 631 |
+
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
|
| 632 |
+
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
|
| 633 |
+
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
|
| 634 |
+
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
|
| 635 |
+
PORT_DIPSETTING( 0x03, DEF_STR( 1C_5C ) )
|
| 636 |
+
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION( "SW1:4,5,6" )
|
| 637 |
+
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
| 638 |
+
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
|
| 639 |
+
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
|
| 640 |
+
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
|
| 641 |
+
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
|
| 642 |
+
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
|
| 643 |
+
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
|
| 644 |
+
PORT_DIPSETTING( 0x18, DEF_STR( 1C_5C ) )
|
| 645 |
+
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION( "SW1:7" )
|
| 646 |
+
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
| 647 |
+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
| 648 |
+
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Test ) ) PORT_DIPLOCATION( "SW1:8" )
|
| 649 |
+
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
| 650 |
+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
| 651 |
+
|
| 652 |
+
PORT_START("DSW1")
|
| 653 |
+
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW2:1,2" )
|
| 654 |
+
PORT_DIPSETTING( 0x02, "2" )
|
| 655 |
+
PORT_DIPSETTING( 0x03, "3" )
|
| 656 |
+
PORT_DIPSETTING( 0x01, "5" )
|
| 657 |
+
PORT_DIPSETTING( 0x00, "7")
|
| 658 |
+
PORT_DIPNAME( 0x1c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION( "SW2:3,4,5" )
|
| 659 |
+
PORT_DIPSETTING( 0x1c, "1 (Easiest)")
|
| 660 |
+
PORT_DIPSETTING( 0x18, "2" )
|
| 661 |
+
PORT_DIPSETTING( 0x14, "3" )
|
| 662 |
+
PORT_DIPSETTING( 0x10, "4" )
|
| 663 |
+
PORT_DIPSETTING( 0x0c, "5 (Normal)" )
|
| 664 |
+
PORT_DIPSETTING( 0x08, "6" )
|
| 665 |
+
PORT_DIPSETTING( 0x04, "7" )
|
| 666 |
+
PORT_DIPSETTING( 0x00, "8 (Hardest)" )
|
| 667 |
+
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW2:6" )
|
| 668 |
+
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
| 669 |
+
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
| 670 |
+
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION( "SW2:7" )
|
| 671 |
+
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
| 672 |
+
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
|
| 673 |
+
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW2:8" )
|
| 674 |
+
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
| 675 |
+
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
|
| 676 |
+
|
| 677 |
+
PORT_START("FREEZE")
|
| 678 |
+
PORT_DIPNAME( 0x01, 0x01, "Freeze" ) // could be VBLANK
|
| 679 |
+
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
|
| 680 |
+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
| 681 |
+
|
| 682 |
+
PORT_START("COIN_LOCKOUT")
|
| 683 |
+
PORT_CONFNAME( 0x01, 0x01, "Coin Lockout Hardware Present" )
|
| 684 |
+
PORT_CONFSETTING( 0x01, DEF_STR( Yes ) )
|
| 685 |
+
PORT_CONFSETTING( 0x00, DEF_STR( No ) )
|
| 686 |
+
INPUT_PORTS_END
|
| 687 |
+
|
| 688 |
+
|
| 689 |
+
|
| 690 |
+
static const gfx_layout charlayout =
|
| 691 |
+
{
|
| 692 |
+
8,8,
|
| 693 |
+
RGN_FRAC(1,1),
|
| 694 |
+
2,
|
| 695 |
+
{ 4, 0 },
|
| 696 |
+
{ 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3 },
|
| 697 |
+
{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16 },
|
| 698 |
+
16*8
|
| 699 |
+
};
|
| 700 |
+
|
| 701 |
+
static const gfx_layout spritelayout =
|
| 702 |
+
{
|
| 703 |
+
16,16,
|
| 704 |
+
RGN_FRAC(1,2),
|
| 705 |
+
4,
|
| 706 |
+
{ RGN_FRAC(1,2)+4, RGN_FRAC(1,2)+0, 4, 0 },
|
| 707 |
+
{ 0, 1, 2, 3, 8+0, 8+1, 8+2, 8+3,
|
| 708 |
+
16*16+0, 16*16+1, 16*16+2, 16*16+3, 16*16+8+0, 16*16+8+1, 16*16+8+2, 16*16+8+3 },
|
| 709 |
+
{ 0*16, 1*16, 2*16, 3*16, 4*16, 5*16, 6*16, 7*16,
|
| 710 |
+
8*16, 9*16, 10*16, 11*16, 12*16, 13*16, 14*16, 15*16 },
|
| 711 |
+
32*16
|
| 712 |
+
};
|
| 713 |
+
|
| 714 |
+
static GFXDECODE_START( gfx_blktiger )
|
| 715 |
+
GFXDECODE_ENTRY( "chars", 0, charlayout, 0x300, 32 ) // colors 0x300-0x37f
|
| 716 |
+
GFXDECODE_ENTRY( "tiles", 0, spritelayout, 0x000, 16 ) // colors 0x000-0x0ff
|
| 717 |
+
GFXDECODE_ENTRY( "sprites", 0, spritelayout, 0x200, 8 ) // colors 0x200-0x27f
|
| 718 |
+
GFXDECODE_END
|
| 719 |
+
|
| 720 |
+
|
| 721 |
+
void blktiger_state::machine_start()
|
| 722 |
+
{
|
| 723 |
+
// configure bankswitching
|
| 724 |
+
m_mainbank->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000);
|
| 725 |
+
|
| 726 |
+
save_item(NAME(m_scroll_bank));
|
| 727 |
+
save_item(NAME(m_screen_layout));
|
| 728 |
+
save_item(NAME(m_chon));
|
| 729 |
+
save_item(NAME(m_objon));
|
| 730 |
+
save_item(NAME(m_bgon));
|
| 731 |
+
save_item(NAME(m_scroll_x));
|
| 732 |
+
save_item(NAME(m_scroll_y));
|
| 733 |
+
}
|
| 734 |
+
|
| 735 |
+
void blktiger_state::machine_reset()
|
| 736 |
+
{
|
| 737 |
+
m_scroll_x[0] = 0;
|
| 738 |
+
m_scroll_x[1] = 0;
|
| 739 |
+
m_scroll_y[0] = 0;
|
| 740 |
+
m_scroll_y[1] = 0;
|
| 741 |
+
m_scroll_bank = 0;
|
| 742 |
+
m_screen_layout = 0;
|
| 743 |
+
}
|
| 744 |
+
|
| 745 |
+
void blktiger_mcu_state::machine_start()
|
| 746 |
+
{
|
| 747 |
+
save_item(NAME(m_z80_latch));
|
| 748 |
+
save_item(NAME(m_i8751_latch));
|
| 749 |
+
|
| 750 |
+
blktiger_state::machine_start();
|
| 751 |
+
}
|
| 752 |
+
|
| 753 |
+
void blktiger_mcu_state::machine_reset()
|
| 754 |
+
{
|
| 755 |
+
m_z80_latch = 0;
|
| 756 |
+
m_i8751_latch = 0;
|
| 757 |
+
|
| 758 |
+
blktiger_state::machine_reset();
|
| 759 |
+
}
|
| 760 |
+
|
| 761 |
+
void blktiger_state::nomcu(machine_config &config)
|
| 762 |
+
{
|
| 763 |
+
// basic machine hardware
|
| 764 |
+
Z80(config, m_maincpu, XTAL(24'000'000) / 4); // verified on PCB
|
| 765 |
+
m_maincpu->set_addrmap(AS_PROGRAM, &blktiger_state::main_prg_map);
|
| 766 |
+
m_maincpu->set_addrmap(AS_IO, &blktiger_state::nomcu_main_io_map);
|
| 767 |
+
m_maincpu->set_vblank_int("screen", FUNC(blktiger_state::irq0_line_hold));
|
| 768 |
+
|
| 769 |
+
Z80(config, m_audiocpu, XTAL(3'579'545)); // verified on PCB
|
| 770 |
+
m_audiocpu->set_addrmap(AS_PROGRAM, &blktiger_state::sound_map);
|
| 771 |
+
|
| 772 |
+
WATCHDOG_TIMER(config, "watchdog");
|
| 773 |
+
|
| 774 |
+
// video hardware
|
| 775 |
+
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
|
| 776 |
+
screen.set_raw(24_MHz_XTAL / 4, 384, 128, 0, 262, 22, 246); // hsync is 50..77, vsync is 257..259
|
| 777 |
+
screen.set_screen_update(FUNC(blktiger_state::screen_update));
|
| 778 |
+
screen.screen_vblank().set("spriteram", FUNC(buffered_spriteram8_device::vblank_copy_rising));
|
| 779 |
+
screen.set_palette(m_palette);
|
| 780 |
+
|
| 781 |
+
GFXDECODE(config, m_gfxdecode, m_palette, gfx_blktiger);
|
| 782 |
+
|
| 783 |
+
PALETTE(config, m_palette).set_format(palette_device::xBRG_444, 1024);
|
| 784 |
+
|
| 785 |
+
BUFFERED_SPRITERAM8(config, m_spriteram);
|
| 786 |
+
|
| 787 |
+
// sound hardware
|
| 788 |
+
SPEAKER(config, "mono").front_center();
|
| 789 |
+
|
| 790 |
+
GENERIC_LATCH_8(config, "soundlatch");
|
| 791 |
+
|
| 792 |
+
ym2203_device &ym1(YM2203(config, "ym1", XTAL(3'579'545))); // verified on PCB
|
| 793 |
+
ym1.irq_handler().set_inputline(m_audiocpu, 0);
|
| 794 |
+
ym1.add_route(ALL_OUTPUTS, "mono", 0.15);
|
| 795 |
+
|
| 796 |
+
ym2203_device &ym2(YM2203(config, "ym2", XTAL(3'579'545))); // verified on PCB
|
| 797 |
+
ym2.add_route(ALL_OUTPUTS, "mono", 0.15);
|
| 798 |
+
}
|
| 799 |
+
|
| 800 |
+
void blktiger_mcu_state::mcu(machine_config &config)
|
| 801 |
+
{
|
| 802 |
+
nomcu(config);
|
| 803 |
+
subdevice<cpu_device>("maincpu")->set_addrmap(AS_IO, &blktiger_mcu_state::mcu_main_io_map);
|
| 804 |
+
|
| 805 |
+
I8751(config, m_mcu, XTAL(24'000'000) / 3); // verified on PCB
|
| 806 |
+
m_mcu->port_in_cb<0>().set(FUNC(blktiger_mcu_state::from_main_r));
|
| 807 |
+
m_mcu->port_out_cb<0>().set(FUNC(blktiger_mcu_state::to_main_w));
|
| 808 |
+
// other ports unknown
|
| 809 |
+
//m_mcu->set_vblank_int("screen", FUNC(blktiger_mcu_state::irq0_line_hold));
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
/***************************************************************************
|
| 813 |
+
|
| 814 |
+
Game driver(s)
|
| 815 |
+
|
| 816 |
+
***************************************************************************/
|
| 817 |
+
|
| 818 |
+
ROM_START( blktiger )
|
| 819 |
+
ROM_REGION( 0x50000, "maincpu", 0 ) // 64k for code + banked ROMs images
|
| 820 |
+
ROM_LOAD( "bdu-01a.5e", 0x00000, 0x08000, CRC(a8f98f22) SHA1(f77c0d0ebf3e52a21d2c0c5004350a408b8e6d24) ) // CODE
|
| 821 |
+
ROM_LOAD( "bdu-02a.6e", 0x10000, 0x10000, CRC(7bef96e8) SHA1(6d05a73d8400dead78c561b904bf6ef8311e7b91) ) // 0+1
|
| 822 |
+
ROM_LOAD( "bdu-03a.8e", 0x20000, 0x10000, CRC(4089e157) SHA1(7972b1c745057802d4fd66d88b0101eb3c03e701) ) // 2+3
|
| 823 |
+
ROM_LOAD( "bd-04.9e", 0x30000, 0x10000, CRC(ed6af6ec) SHA1(bed303c51bcddf233ad0701306d557a60ce9f5a5) ) // 4+5
|
| 824 |
+
ROM_LOAD( "bd-05.10e", 0x40000, 0x10000, CRC(ae59b72e) SHA1(6e72214b71f2f337af236c8be891a18570cb6fbb) ) // 6+7
|
| 825 |
+
|
| 826 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 827 |
+
ROM_LOAD( "bd-06.1l", 0x0000, 0x8000, CRC(2cf54274) SHA1(87df100c65999ba1e9d358ffd0fe4bba23ae0efb) )
|
| 828 |
+
|
| 829 |
+
ROM_REGION( 0x1000, "mcu", 0 )
|
| 830 |
+
ROM_LOAD( "bd.6k", 0x0000, 0x1000, CRC(ac7d14f1) SHA1(46fd6b43f10312e3e8d3c9e0c0fd616af98fdbad) )
|
| 831 |
+
|
| 832 |
+
ROM_REGION( 0x08000, "chars", 0 )
|
| 833 |
+
ROM_LOAD( "bd-15.2n", 0x00000, 0x08000, CRC(70175d78) SHA1(2f02be2785d1824002145ea20db79821d0393929) )
|
| 834 |
+
|
| 835 |
+
ROM_REGION( 0x40000, "tiles", 0 )
|
| 836 |
+
ROM_LOAD( "bd-12.5b", 0x00000, 0x10000, CRC(c4524993) SHA1(9aa6c58004ca1117e5ac44ba8fc51e9128b921b8) )
|
| 837 |
+
ROM_LOAD( "bd-11.4b", 0x10000, 0x10000, CRC(7932c86f) SHA1(b3b1bc1e2b0db5c2eb8772f8a2c35129cc80d511) )
|
| 838 |
+
ROM_LOAD( "bd-14.9b", 0x20000, 0x10000, CRC(dc49593a) SHA1(e4ef42ba9f238fd43c8217657c92896f31d3912c) )
|
| 839 |
+
ROM_LOAD( "bd-13.8b", 0x30000, 0x10000, CRC(7ed7a122) SHA1(3acc6d4c9731db0609c2e26e3bd255847149ca33) )
|
| 840 |
+
|
| 841 |
+
ROM_REGION( 0x40000, "sprites", 0 )
|
| 842 |
+
ROM_LOAD( "bd-08.5a", 0x00000, 0x10000, CRC(e2f17438) SHA1(3e5fdae07d40febedc59c7c7c4d9c6f0d72b58b5) )
|
| 843 |
+
ROM_LOAD( "bd-07.4a", 0x10000, 0x10000, CRC(5fccbd27) SHA1(33c55aa9c12b3121ca5c3b4c39a9b152b6946461) )
|
| 844 |
+
ROM_LOAD( "bd-10.9a", 0x20000, 0x10000, CRC(fc33ccc6) SHA1(d492626a88565c2626f98ecb1d74535f1ad68e4c) )
|
| 845 |
+
ROM_LOAD( "bd-09.8a", 0x30000, 0x10000, CRC(f449de01) SHA1(f6b40e9eb2471b89c42ab84f4214295d284db0c3) )
|
| 846 |
+
|
| 847 |
+
ROM_REGION( 0x0400, "proms", 0 ) // PROMs (see hw info on top)
|
| 848 |
+
ROM_LOAD( "bd01.8j", 0x0000, 0x0100, CRC(29b459e5) SHA1(0034734a533df3dea16b7b48e072485d7f26f850) )
|
| 849 |
+
ROM_LOAD( "bd02.9j", 0x0100, 0x0100, CRC(8b741e66) SHA1(6c1fda59936a7217b05949f5c54b1f91f4b49dbe) )
|
| 850 |
+
ROM_LOAD( "bd03.11k", 0x0200, 0x0100, CRC(27201c75) SHA1(c54d87f06bfe0b0908389c005014d97156e272c2) )
|
| 851 |
+
ROM_LOAD( "bd04.11l", 0x0300, 0x0100, CRC(e5490b68) SHA1(40f9f92efe7dd97b49144aec02eb509834056915) )
|
| 852 |
+
ROM_END
|
| 853 |
+
|
| 854 |
+
ROM_START( blktigera )
|
| 855 |
+
ROM_REGION( 0x50000, "maincpu", 0 ) // 64k for code + banked ROMs images
|
| 856 |
+
ROM_LOAD( "bdu-01.5e", 0x00000, 0x08000, CRC(47b13922) SHA1(a722048d48171b68119b7ef1af6e06953c238ad6) ) // CODE
|
| 857 |
+
ROM_LOAD( "bdu-02.6e", 0x10000, 0x10000, CRC(2e0daf1b) SHA1(dbcaf2bb1b2c9cd4b2ca1d52b81d6e33b5c7eee9) ) // 0+1
|
| 858 |
+
ROM_LOAD( "bdu-03.8e", 0x20000, 0x10000, CRC(3b67dfec) SHA1(f9d83f2bb1fbf05d80f6870d91411e9b7bbea917) ) // 2+3
|
| 859 |
+
ROM_LOAD( "bd-04.9e", 0x30000, 0x10000, CRC(ed6af6ec) SHA1(bed303c51bcddf233ad0701306d557a60ce9f5a5) ) // 4+5
|
| 860 |
+
ROM_LOAD( "bd-05.10e", 0x40000, 0x10000, CRC(ae59b72e) SHA1(6e72214b71f2f337af236c8be891a18570cb6fbb) ) // 6+7
|
| 861 |
+
|
| 862 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 863 |
+
ROM_LOAD( "bd-06.1l", 0x0000, 0x8000, CRC(2cf54274) SHA1(87df100c65999ba1e9d358ffd0fe4bba23ae0efb) )
|
| 864 |
+
|
| 865 |
+
ROM_REGION( 0x1000, "mcu", 0 )
|
| 866 |
+
ROM_LOAD( "bd.6k", 0x0000, 0x1000, CRC(ac7d14f1) SHA1(46fd6b43f10312e3e8d3c9e0c0fd616af98fdbad) )
|
| 867 |
+
|
| 868 |
+
ROM_REGION( 0x08000, "chars", 0 )
|
| 869 |
+
ROM_LOAD( "bd-15.2n", 0x00000, 0x08000, CRC(70175d78) SHA1(2f02be2785d1824002145ea20db79821d0393929) )
|
| 870 |
+
|
| 871 |
+
ROM_REGION( 0x40000, "tiles", 0 )
|
| 872 |
+
ROM_LOAD( "bd-12.5b", 0x00000, 0x10000, CRC(c4524993) SHA1(9aa6c58004ca1117e5ac44ba8fc51e9128b921b8) )
|
| 873 |
+
ROM_LOAD( "bd-11.4b", 0x10000, 0x10000, CRC(7932c86f) SHA1(b3b1bc1e2b0db5c2eb8772f8a2c35129cc80d511) )
|
| 874 |
+
ROM_LOAD( "bd-14.9b", 0x20000, 0x10000, CRC(dc49593a) SHA1(e4ef42ba9f238fd43c8217657c92896f31d3912c) )
|
| 875 |
+
ROM_LOAD( "bd-13.8b", 0x30000, 0x10000, CRC(7ed7a122) SHA1(3acc6d4c9731db0609c2e26e3bd255847149ca33) )
|
| 876 |
+
|
| 877 |
+
ROM_REGION( 0x40000, "sprites", 0 )
|
| 878 |
+
ROM_LOAD( "bd-08.5a", 0x00000, 0x10000, CRC(e2f17438) SHA1(3e5fdae07d40febedc59c7c7c4d9c6f0d72b58b5) )
|
| 879 |
+
ROM_LOAD( "bd-07.4a", 0x10000, 0x10000, CRC(5fccbd27) SHA1(33c55aa9c12b3121ca5c3b4c39a9b152b6946461) )
|
| 880 |
+
ROM_LOAD( "bd-10.9a", 0x20000, 0x10000, CRC(fc33ccc6) SHA1(d492626a88565c2626f98ecb1d74535f1ad68e4c) )
|
| 881 |
+
ROM_LOAD( "bd-09.8a", 0x30000, 0x10000, CRC(f449de01) SHA1(f6b40e9eb2471b89c42ab84f4214295d284db0c3) )
|
| 882 |
+
|
| 883 |
+
ROM_REGION( 0x0400, "proms", 0 ) // PROMs (see hw info on top)
|
| 884 |
+
ROM_LOAD( "bd01.8j", 0x0000, 0x0100, CRC(29b459e5) SHA1(0034734a533df3dea16b7b48e072485d7f26f850) )
|
| 885 |
+
ROM_LOAD( "bd02.9j", 0x0100, 0x0100, CRC(8b741e66) SHA1(6c1fda59936a7217b05949f5c54b1f91f4b49dbe) )
|
| 886 |
+
ROM_LOAD( "bd03.11k", 0x0200, 0x0100, CRC(27201c75) SHA1(c54d87f06bfe0b0908389c005014d97156e272c2) )
|
| 887 |
+
ROM_LOAD( "bd04.11l", 0x0300, 0x0100, CRC(e5490b68) SHA1(40f9f92efe7dd97b49144aec02eb509834056915) )
|
| 888 |
+
ROM_END
|
| 889 |
+
|
| 890 |
+
ROM_START( blktigerb1 )
|
| 891 |
+
ROM_REGION( 0x50000, "maincpu", 0 ) // 64k for code + banked ROMs images
|
| 892 |
+
ROM_LOAD( "btiger1.f6", 0x00000, 0x08000, CRC(9d8464e8) SHA1(c847ee9a22b8b636e85427214747e6bd779023e8) ) // CODE
|
| 893 |
+
ROM_LOAD( "bdu-02a.6e", 0x10000, 0x10000, CRC(7bef96e8) SHA1(6d05a73d8400dead78c561b904bf6ef8311e7b91) ) // 0+1
|
| 894 |
+
ROM_LOAD( "btiger3.j6", 0x20000, 0x10000, CRC(52c56ed1) SHA1(b6ea61869dcfcedb8cfc14c613440e3f4649866f) ) // 2+3
|
| 895 |
+
ROM_LOAD( "bd-04.9e", 0x30000, 0x10000, CRC(ed6af6ec) SHA1(bed303c51bcddf233ad0701306d557a60ce9f5a5) ) // 4+5
|
| 896 |
+
ROM_LOAD( "bd-05.10e", 0x40000, 0x10000, CRC(ae59b72e) SHA1(6e72214b71f2f337af236c8be891a18570cb6fbb) ) // 6+7
|
| 897 |
+
|
| 898 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 899 |
+
ROM_LOAD( "bd-06.1l", 0x0000, 0x8000, CRC(2cf54274) SHA1(87df100c65999ba1e9d358ffd0fe4bba23ae0efb) )
|
| 900 |
+
|
| 901 |
+
ROM_REGION( 0x08000, "chars", 0 )
|
| 902 |
+
ROM_LOAD( "bd-15.2n", 0x00000, 0x08000, CRC(70175d78) SHA1(2f02be2785d1824002145ea20db79821d0393929) )
|
| 903 |
+
|
| 904 |
+
ROM_REGION( 0x40000, "tiles", 0 )
|
| 905 |
+
ROM_LOAD( "bd-12.5b", 0x00000, 0x10000, CRC(c4524993) SHA1(9aa6c58004ca1117e5ac44ba8fc51e9128b921b8) )
|
| 906 |
+
ROM_LOAD( "bd-11.4b", 0x10000, 0x10000, CRC(7932c86f) SHA1(b3b1bc1e2b0db5c2eb8772f8a2c35129cc80d511) )
|
| 907 |
+
ROM_LOAD( "bd-14.9b", 0x20000, 0x10000, CRC(dc49593a) SHA1(e4ef42ba9f238fd43c8217657c92896f31d3912c) )
|
| 908 |
+
ROM_LOAD( "bd-13.8b", 0x30000, 0x10000, CRC(7ed7a122) SHA1(3acc6d4c9731db0609c2e26e3bd255847149ca33) )
|
| 909 |
+
|
| 910 |
+
ROM_REGION( 0x40000, "sprites", 0 )
|
| 911 |
+
ROM_LOAD( "bd-08.5a", 0x00000, 0x10000, CRC(e2f17438) SHA1(3e5fdae07d40febedc59c7c7c4d9c6f0d72b58b5) )
|
| 912 |
+
ROM_LOAD( "bd-07.4a", 0x10000, 0x10000, CRC(5fccbd27) SHA1(33c55aa9c12b3121ca5c3b4c39a9b152b6946461) )
|
| 913 |
+
ROM_LOAD( "bd-10.9a", 0x20000, 0x10000, CRC(fc33ccc6) SHA1(d492626a88565c2626f98ecb1d74535f1ad68e4c) )
|
| 914 |
+
ROM_LOAD( "bd-09.8a", 0x30000, 0x10000, CRC(f449de01) SHA1(f6b40e9eb2471b89c42ab84f4214295d284db0c3) )
|
| 915 |
+
|
| 916 |
+
ROM_REGION( 0x0400, "proms", 0 ) // PROMs (see hw info on top)
|
| 917 |
+
ROM_LOAD( "bd01.8j", 0x0000, 0x0100, CRC(29b459e5) SHA1(0034734a533df3dea16b7b48e072485d7f26f850) )
|
| 918 |
+
ROM_LOAD( "bd02.9j", 0x0100, 0x0100, CRC(8b741e66) SHA1(6c1fda59936a7217b05949f5c54b1f91f4b49dbe) )
|
| 919 |
+
ROM_LOAD( "bd03.11k", 0x0200, 0x0100, CRC(27201c75) SHA1(c54d87f06bfe0b0908389c005014d97156e272c2) )
|
| 920 |
+
ROM_LOAD( "bd04.11l", 0x0300, 0x0100, CRC(e5490b68) SHA1(40f9f92efe7dd97b49144aec02eb509834056915) )
|
| 921 |
+
ROM_END
|
| 922 |
+
|
| 923 |
+
ROM_START( blktigerb2 )
|
| 924 |
+
ROM_REGION( 0x50000, "maincpu", 0 ) // 64k for code + banked ROMs images
|
| 925 |
+
ROM_LOAD( "1.bin", 0x00000, 0x08000, CRC(47e2b21e) SHA1(3f03543ace435239978a95f569ac89f6762253c0) ) // CODE
|
| 926 |
+
ROM_LOAD( "bdu-02a.6e", 0x10000, 0x10000, CRC(7bef96e8) SHA1(6d05a73d8400dead78c561b904bf6ef8311e7b91) ) // 0+1
|
| 927 |
+
ROM_LOAD( "3.bin", 0x20000, 0x10000, CRC(52c56ed1) SHA1(b6ea61869dcfcedb8cfc14c613440e3f4649866f) ) // 2+3 : same crc of btiger3.j6 from bktigerb
|
| 928 |
+
ROM_LOAD( "bd-04.9e", 0x30000, 0x10000, CRC(ed6af6ec) SHA1(bed303c51bcddf233ad0701306d557a60ce9f5a5) ) // 4+5
|
| 929 |
+
ROM_LOAD( "bd-05.10e", 0x40000, 0x10000, CRC(ae59b72e) SHA1(6e72214b71f2f337af236c8be891a18570cb6fbb) ) // 6+7
|
| 930 |
+
|
| 931 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 932 |
+
ROM_LOAD( "bd-06.1l", 0x0000, 0x8000, CRC(2cf54274) SHA1(87df100c65999ba1e9d358ffd0fe4bba23ae0efb) )
|
| 933 |
+
|
| 934 |
+
ROM_REGION( 0x08000, "chars", 0 )
|
| 935 |
+
ROM_LOAD( "bd-15.2n", 0x00000, 0x08000, CRC(70175d78) SHA1(2f02be2785d1824002145ea20db79821d0393929) )
|
| 936 |
+
|
| 937 |
+
ROM_REGION( 0x40000, "tiles", 0 )
|
| 938 |
+
ROM_LOAD( "bd-12.5b", 0x00000, 0x10000, CRC(c4524993) SHA1(9aa6c58004ca1117e5ac44ba8fc51e9128b921b8) )
|
| 939 |
+
ROM_LOAD( "bd-11.4b", 0x10000, 0x10000, CRC(7932c86f) SHA1(b3b1bc1e2b0db5c2eb8772f8a2c35129cc80d511) )
|
| 940 |
+
ROM_LOAD( "bd-14.9b", 0x20000, 0x10000, CRC(dc49593a) SHA1(e4ef42ba9f238fd43c8217657c92896f31d3912c) )
|
| 941 |
+
ROM_LOAD( "bd-13.8b", 0x30000, 0x10000, CRC(7ed7a122) SHA1(3acc6d4c9731db0609c2e26e3bd255847149ca33) )
|
| 942 |
+
|
| 943 |
+
ROM_REGION( 0x40000, "sprites", 0 )
|
| 944 |
+
ROM_LOAD( "bd-08.5a", 0x00000, 0x10000, CRC(e2f17438) SHA1(3e5fdae07d40febedc59c7c7c4d9c6f0d72b58b5) )
|
| 945 |
+
ROM_LOAD( "bd-07.4a", 0x10000, 0x10000, CRC(5fccbd27) SHA1(33c55aa9c12b3121ca5c3b4c39a9b152b6946461) )
|
| 946 |
+
ROM_LOAD( "bd-10.9a", 0x20000, 0x10000, CRC(fc33ccc6) SHA1(d492626a88565c2626f98ecb1d74535f1ad68e4c) )
|
| 947 |
+
ROM_LOAD( "bd-09.8a", 0x30000, 0x10000, CRC(f449de01) SHA1(f6b40e9eb2471b89c42ab84f4214295d284db0c3) )
|
| 948 |
+
|
| 949 |
+
ROM_REGION( 0x0400, "proms", 0 ) // PROMs (see hw info on top)
|
| 950 |
+
ROM_LOAD( "bd01.8j", 0x0000, 0x0100, CRC(29b459e5) SHA1(0034734a533df3dea16b7b48e072485d7f26f850) )
|
| 951 |
+
ROM_LOAD( "bd02.9j", 0x0100, 0x0100, CRC(8b741e66) SHA1(6c1fda59936a7217b05949f5c54b1f91f4b49dbe) )
|
| 952 |
+
ROM_LOAD( "bd03.11k", 0x0200, 0x0100, CRC(27201c75) SHA1(c54d87f06bfe0b0908389c005014d97156e272c2) )
|
| 953 |
+
ROM_LOAD( "bd04.11l", 0x0300, 0x0100, CRC(e5490b68) SHA1(40f9f92efe7dd97b49144aec02eb509834056915) )
|
| 954 |
+
ROM_END
|
| 955 |
+
|
| 956 |
+
ROM_START( blkdrgon )
|
| 957 |
+
ROM_REGION( 0x50000, "maincpu", 0 ) // 64k for code + banked ROMs images
|
| 958 |
+
ROM_LOAD( "bd_01.5e", 0x00000, 0x08000, CRC(27ccdfbc) SHA1(3caafe00735ba9b24d870ee61ad2cae541551024) ) // CODE
|
| 959 |
+
ROM_LOAD( "bd_02.6e", 0x10000, 0x10000, CRC(7d39c26f) SHA1(562a3f578e109ae020f65e341c876ad7e510a311) ) // 0+1
|
| 960 |
+
ROM_LOAD( "bd_03.8e", 0x20000, 0x10000, CRC(d1bf3757) SHA1(b19f8b986406bde65ac7f0d55d54f87b37f5e42f) ) // 2+3
|
| 961 |
+
ROM_LOAD( "bd_04.9e", 0x30000, 0x10000, CRC(4d1d6680) SHA1(e137624c59392de6aaffeded99b024938360bd25) ) // 4+5
|
| 962 |
+
ROM_LOAD( "bd_05.10e", 0x40000, 0x10000, CRC(c8d0c45e) SHA1(66c2e5a74c5875a2c8e28740fe944bd943246ce5) ) // 6+7
|
| 963 |
+
|
| 964 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 965 |
+
ROM_LOAD( "bd_06.1l", 0x0000, 0x8000, CRC(2cf54274) SHA1(87df100c65999ba1e9d358ffd0fe4bba23ae0efb) )
|
| 966 |
+
|
| 967 |
+
ROM_REGION( 0x1000, "mcu", 0 )
|
| 968 |
+
ROM_LOAD( "bd.6k", 0x0000, 0x1000, CRC(ac7d14f1) SHA1(46fd6b43f10312e3e8d3c9e0c0fd616af98fdbad) )
|
| 969 |
+
|
| 970 |
+
ROM_REGION( 0x08000, "chars", 0 )
|
| 971 |
+
ROM_LOAD( "bd_15.2n", 0x00000, 0x08000, CRC(3821ab29) SHA1(576f1839f63b0cad6b851d6e6a3e9dec21ac811d) )
|
| 972 |
+
|
| 973 |
+
ROM_REGION( 0x40000, "tiles", 0 )
|
| 974 |
+
ROM_LOAD( "bd_12.5b", 0x00000, 0x10000, CRC(22d0a4b0) SHA1(f9402ea9ffedcb280497a63c5eb352de9d4ca3fd) )
|
| 975 |
+
ROM_LOAD( "bd_11.4b", 0x10000, 0x10000, CRC(c8b5fc52) SHA1(621e899285ce6302e5b25d133d9cd52c09b7b202) )
|
| 976 |
+
ROM_LOAD( "bd_14.9b", 0x20000, 0x10000, CRC(9498c378) SHA1(841934ddef724faf04162c4be4aea1684d8d8e0f) )
|
| 977 |
+
ROM_LOAD( "bd_13.8b", 0x30000, 0x10000, CRC(5b0df8ce) SHA1(57d10b48bd61b0224ce21b36bde8d2479e8e5df4) )
|
| 978 |
+
|
| 979 |
+
ROM_REGION( 0x40000, "sprites", 0 )
|
| 980 |
+
ROM_LOAD( "bd_08.5a", 0x00000, 0x10000, CRC(e2f17438) SHA1(3e5fdae07d40febedc59c7c7c4d9c6f0d72b58b5) )
|
| 981 |
+
ROM_LOAD( "bd_07.4a", 0x10000, 0x10000, CRC(5fccbd27) SHA1(33c55aa9c12b3121ca5c3b4c39a9b152b6946461) )
|
| 982 |
+
ROM_LOAD( "bd_10.9a", 0x20000, 0x10000, CRC(fc33ccc6) SHA1(d492626a88565c2626f98ecb1d74535f1ad68e4c) )
|
| 983 |
+
ROM_LOAD( "bd_09.8a", 0x30000, 0x10000, CRC(f449de01) SHA1(f6b40e9eb2471b89c42ab84f4214295d284db0c3) )
|
| 984 |
+
|
| 985 |
+
ROM_REGION( 0x0400, "proms", 0 ) // PROMs (see hw info on top)
|
| 986 |
+
ROM_LOAD( "bd01.8j", 0x0000, 0x0100, CRC(29b459e5) SHA1(0034734a533df3dea16b7b48e072485d7f26f850) )
|
| 987 |
+
ROM_LOAD( "bd02.9j", 0x0100, 0x0100, CRC(8b741e66) SHA1(6c1fda59936a7217b05949f5c54b1f91f4b49dbe) )
|
| 988 |
+
ROM_LOAD( "bd03.11k", 0x0200, 0x0100, CRC(27201c75) SHA1(c54d87f06bfe0b0908389c005014d97156e272c2) )
|
| 989 |
+
ROM_LOAD( "bd04.11l", 0x0300, 0x0100, CRC(e5490b68) SHA1(40f9f92efe7dd97b49144aec02eb509834056915) )
|
| 990 |
+
ROM_END
|
| 991 |
+
|
| 992 |
+
|
| 993 |
+
ROM_START( blkdrgonb )
|
| 994 |
+
ROM_REGION( 0x50000, "maincpu", 0 ) // 64k for code + banked ROMs images
|
| 995 |
+
ROM_LOAD( "a1", 0x00000, 0x08000, CRC(7caf2ba0) SHA1(57b17caff67d36b24075f5865d433bfc8bcc9bc2) ) // CODE
|
| 996 |
+
ROM_LOAD( "blkdrgon.6e", 0x10000, 0x10000, CRC(7d39c26f) SHA1(562a3f578e109ae020f65e341c876ad7e510a311) ) // 0+1
|
| 997 |
+
ROM_LOAD( "a3", 0x20000, 0x10000, CRC(f4cd0f39) SHA1(9efc5161c861c7ec8ae72509e71c6d7b71b22fc6) ) // 2+3
|
| 998 |
+
ROM_LOAD( "blkdrgon.9e", 0x30000, 0x10000, CRC(4d1d6680) SHA1(e137624c59392de6aaffeded99b024938360bd25) ) // 4+5
|
| 999 |
+
ROM_LOAD( "blkdrgon.10e", 0x40000, 0x10000, CRC(c8d0c45e) SHA1(66c2e5a74c5875a2c8e28740fe944bd943246ce5) ) // 6+7
|
| 1000 |
+
|
| 1001 |
+
ROM_REGION( 0x10000, "audiocpu", 0 )
|
| 1002 |
+
ROM_LOAD( "bd-06.1l", 0x0000, 0x8000, CRC(2cf54274) SHA1(87df100c65999ba1e9d358ffd0fe4bba23ae0efb) )
|
| 1003 |
+
|
| 1004 |
+
ROM_REGION( 0x08000, "chars", 0 )
|
| 1005 |
+
ROM_LOAD( "b5", 0x00000, 0x08000, CRC(852ad2b7) SHA1(9f30c0d7e1127589b03d8f45ea50e0f907181a4b) )
|
| 1006 |
+
|
| 1007 |
+
ROM_REGION( 0x40000, "tiles", 0 )
|
| 1008 |
+
ROM_LOAD( "blkdrgon.5b", 0x00000, 0x10000, CRC(22d0a4b0) SHA1(f9402ea9ffedcb280497a63c5eb352de9d4ca3fd) )
|
| 1009 |
+
ROM_LOAD( "b1", 0x10000, 0x10000, CRC(053ab15c) SHA1(f0ddc71009ab5dd69ae463c3636ec2332c0556f8) )
|
| 1010 |
+
ROM_LOAD( "blkdrgon.9b", 0x20000, 0x10000, CRC(9498c378) SHA1(841934ddef724faf04162c4be4aea1684d8d8e0f) )
|
| 1011 |
+
ROM_LOAD( "b3", 0x30000, 0x10000, CRC(9dc6e943) SHA1(0818c1fb2cc8ff403a479457b268bba6ec0730bc) )
|
| 1012 |
+
|
| 1013 |
+
ROM_REGION( 0x40000, "sprites", 0 )
|
| 1014 |
+
ROM_LOAD( "bd-08.5a", 0x00000, 0x10000, CRC(e2f17438) SHA1(3e5fdae07d40febedc59c7c7c4d9c6f0d72b58b5) )
|
| 1015 |
+
ROM_LOAD( "bd-07.4a", 0x10000, 0x10000, CRC(5fccbd27) SHA1(33c55aa9c12b3121ca5c3b4c39a9b152b6946461) )
|
| 1016 |
+
ROM_LOAD( "bd-10.9a", 0x20000, 0x10000, CRC(fc33ccc6) SHA1(d492626a88565c2626f98ecb1d74535f1ad68e4c) )
|
| 1017 |
+
ROM_LOAD( "bd-09.8a", 0x30000, 0x10000, CRC(f449de01) SHA1(f6b40e9eb2471b89c42ab84f4214295d284db0c3) )
|
| 1018 |
+
|
| 1019 |
+
ROM_REGION( 0x0400, "proms", 0 ) // PROMs (see hw info on top)
|
| 1020 |
+
ROM_LOAD( "bd01.8j", 0x0000, 0x0100, CRC(29b459e5) SHA1(0034734a533df3dea16b7b48e072485d7f26f850) )
|
| 1021 |
+
ROM_LOAD( "bd02.9j", 0x0100, 0x0100, CRC(8b741e66) SHA1(6c1fda59936a7217b05949f5c54b1f91f4b49dbe) )
|
| 1022 |
+
ROM_LOAD( "bd03.11k", 0x0200, 0x0100, CRC(27201c75) SHA1(c54d87f06bfe0b0908389c005014d97156e272c2) )
|
| 1023 |
+
ROM_LOAD( "bd04.11l", 0x0300, 0x0100, CRC(e5490b68) SHA1(40f9f92efe7dd97b49144aec02eb509834056915) )
|
| 1024 |
+
ROM_END
|
| 1025 |
+
|
| 1026 |
+
|
| 1027 |
+
ROM_START( blktigerb3 )
|
| 1028 |
+
ROM_REGION( 0x50000, "maincpu", 0 ) // 64k for code + banked ROMs images // == same as blktigerb2 maincpu
|
| 1029 |
+
ROM_LOAD( "1.5e", 0x00000, 0x08000, CRC(47e2b21e) SHA1(3f03543ace435239978a95f569ac89f6762253c0) ) // CODE
|
| 1030 |
+
ROM_LOAD( "2.6e", 0x10000, 0x10000, CRC(7bef96e8) SHA1(6d05a73d8400dead78c561b904bf6ef8311e7b91) ) // 0+1
|
| 1031 |
+
ROM_LOAD( "3.8e", 0x20000, 0x10000, CRC(52c56ed1) SHA1(b6ea61869dcfcedb8cfc14c613440e3f4649866f) ) // 2+3
|
| 1032 |
+
ROM_LOAD( "4.9e", 0x30000, 0x10000, CRC(ed6af6ec) SHA1(bed303c51bcddf233ad0701306d557a60ce9f5a5) ) // 4+5
|
| 1033 |
+
ROM_LOAD( "5.10e", 0x40000, 0x10000, CRC(ae59b72e) SHA1(6e72214b71f2f337af236c8be891a18570cb6fbb) ) // 6+7
|
| 1034 |
+
|
| 1035 |
+
ROM_REGION( 0x10000, "audiocpu", 0 ) // == same as other sets but with an address swap
|
| 1036 |
+
ROM_LOAD( "6.1l", 0x0000, 0x8000, CRC(6dfab115) SHA1(05f10bdfa4dff50ccc7707a7dbd8eab1680e09b9) )
|
| 1037 |
+
|
| 1038 |
+
ROM_REGION( 0x08000, "chars", 0 ) // == same as blkdrgon
|
| 1039 |
+
ROM_LOAD( "15.2n", 0x00000, 0x08000, CRC(3821ab29) SHA1(576f1839f63b0cad6b851d6e6a3e9dec21ac811d) )
|
| 1040 |
+
|
| 1041 |
+
ROM_REGION( 0x40000, "tiles", 0 ) // == same as other sets
|
| 1042 |
+
ROM_LOAD( "12.5b", 0x00000, 0x10000, CRC(c4524993) SHA1(9aa6c58004ca1117e5ac44ba8fc51e9128b921b8) )
|
| 1043 |
+
ROM_LOAD( "11.4b", 0x10000, 0x10000, CRC(7932c86f) SHA1(b3b1bc1e2b0db5c2eb8772f8a2c35129cc80d511) )
|
| 1044 |
+
ROM_LOAD( "14.9b", 0x20000, 0x10000, CRC(dc49593a) SHA1(e4ef42ba9f238fd43c8217657c92896f31d3912c) )
|
| 1045 |
+
ROM_LOAD( "13.8b", 0x30000, 0x10000, CRC(7ed7a122) SHA1(3acc6d4c9731db0609c2e26e3bd255847149ca33) )
|
| 1046 |
+
|
| 1047 |
+
ROM_REGION( 0x40000, "sprites", 0 ) // == same as other sets
|
| 1048 |
+
ROM_LOAD( "8.5a", 0x00000, 0x10000, CRC(e2f17438) SHA1(3e5fdae07d40febedc59c7c7c4d9c6f0d72b58b5) )
|
| 1049 |
+
ROM_LOAD( "7.4a", 0x10000, 0x10000, CRC(5fccbd27) SHA1(33c55aa9c12b3121ca5c3b4c39a9b152b6946461) )
|
| 1050 |
+
ROM_LOAD( "10.9a", 0x20000, 0x10000, CRC(fc33ccc6) SHA1(d492626a88565c2626f98ecb1d74535f1ad68e4c) )
|
| 1051 |
+
ROM_LOAD( "9.8a", 0x30000, 0x10000, CRC(f449de01) SHA1(f6b40e9eb2471b89c42ab84f4214295d284db0c3) )
|
| 1052 |
+
|
| 1053 |
+
ROM_REGION( 0x0400, "proms", 0 ) // PROMs (see hw info on top), missing in this dump
|
| 1054 |
+
ROM_LOAD( "bd01.8j", 0x0000, 0x0100, CRC(29b459e5) SHA1(0034734a533df3dea16b7b48e072485d7f26f850) )
|
| 1055 |
+
ROM_LOAD( "bd02.9j", 0x0100, 0x0100, CRC(8b741e66) SHA1(6c1fda59936a7217b05949f5c54b1f91f4b49dbe) )
|
| 1056 |
+
ROM_LOAD( "bd03.11k", 0x0200, 0x0100, CRC(27201c75) SHA1(c54d87f06bfe0b0908389c005014d97156e272c2) )
|
| 1057 |
+
ROM_LOAD( "bd04.11l", 0x0300, 0x0100, CRC(e5490b68) SHA1(40f9f92efe7dd97b49144aec02eb509834056915) )
|
| 1058 |
+
ROM_END
|
| 1059 |
+
|
| 1060 |
+
void blktiger_state::init_blktigerb3()
|
| 1061 |
+
{
|
| 1062 |
+
uint8_t *src = memregion("audiocpu")->base();
|
| 1063 |
+
int len = 0x8000;
|
| 1064 |
+
std::vector<uint8_t> buffer(len);
|
| 1065 |
+
|
| 1066 |
+
for (int i = 0; i < len; i++)
|
| 1067 |
+
{
|
| 1068 |
+
int addr = bitswap<16>(i, 15, 14, 13, 12, 11, 10, 9, 8, 3, 4, 5, 6, 7, 2, 1, 0);
|
| 1069 |
+
buffer[i] = src[addr];
|
| 1070 |
+
|
| 1071 |
+
}
|
| 1072 |
+
|
| 1073 |
+
memcpy(src, &buffer[0], len);
|
| 1074 |
+
}
|
| 1075 |
+
|
| 1076 |
+
} // anonymous namespace
|
| 1077 |
+
|
| 1078 |
+
|
| 1079 |
+
GAME( 1987, blktiger, 0, mcu, blktiger, blktiger_mcu_state, empty_init, ROT0, "Capcom", "Black Tiger", MACHINE_SUPPORTS_SAVE )
|
| 1080 |
+
GAME( 1987, blktigera, blktiger, mcu, blktiger, blktiger_mcu_state, empty_init, ROT0, "Capcom", "Black Tiger (older)", MACHINE_SUPPORTS_SAVE )
|
| 1081 |
+
GAME( 1987, blktigerb1, blktiger, nomcu, blktiger, blktiger_state, empty_init, ROT0, "bootleg", "Black Tiger (bootleg set 1)", MACHINE_SUPPORTS_SAVE )
|
| 1082 |
+
GAME( 1987, blktigerb2, blktiger, nomcu, blktiger, blktiger_state, empty_init, ROT0, "bootleg", "Black Tiger (bootleg set 2)", MACHINE_SUPPORTS_SAVE )
|
| 1083 |
+
GAME( 1987, blkdrgon, blktiger, mcu, blktiger, blktiger_mcu_state, empty_init, ROT0, "Capcom", "Black Dragon (Japan)", MACHINE_SUPPORTS_SAVE )
|
| 1084 |
+
GAME( 1987, blkdrgonb, blktiger, nomcu, blktiger, blktiger_state, empty_init, ROT0, "bootleg", "Black Dragon (bootleg)", MACHINE_SUPPORTS_SAVE )
|
| 1085 |
+
// this board has Capcom markings (boards 87118-A-X1 / 87118-B-X1, but no MCU, a mix of bootleg Black Tiger and Black Dragon ROMs, and an address swapped sound ROM? is the latter an alternative security measure?
|
| 1086 |
+
GAME( 1987, blktigerb3, blktiger, nomcu, blktiger, blktiger_state, init_blktigerb3, ROT0, "bootleg", "Black Tiger / Black Dragon (mixed bootleg?)", MACHINE_SUPPORTS_SAVE )
|
snapshots/jotego_jtcores_pr1100/cores/btiger/doc/blktiger_ms.cpp
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// license:BSD-3-Clause
|
| 2 |
+
// copyright-holders:
|
| 3 |
+
|
| 4 |
+
/*
|
| 5 |
+
Black Tiger (Modular System)
|
| 6 |
+
|
| 7 |
+
As with most of the 'Modular System' setups, the hardware is heavily modified from the original
|
| 8 |
+
and consists of a multi-board stack in a cage, hence different driver.
|
| 9 |
+
|
| 10 |
+
The Modular System cage contains 6 main boards for this game.
|
| 11 |
+
|
| 12 |
+
MOD3-4 - Z80 board (CPU + 5 ROMs + RAM + 24MHz XTAL).
|
| 13 |
+
MOD21/1 - RAM board? 20 MHz XTAL.
|
| 14 |
+
MOD1/5 - Sound board (Z80, 2xYM2203C). 2 8-dips banks.
|
| 15 |
+
MOD51/1 - Sprite board, has logic + 4 sprite ROMs.
|
| 16 |
+
MOD 4/3 - Tilemap board, has logic + 2 tilemap ROMs, long thin sub-board (CAR-0484/1 SOLD) with no chips, just routing along one edge.
|
| 17 |
+
MOD 4/3 - Tilemap board, has logic + 4 tilemap ROMs, long thin sub-board (CAR-0484/1 SOLD) with no chips, just routing along one edge.
|
| 18 |
+
|
| 19 |
+
TODO: practically everything:
|
| 20 |
+
- derive from blktiger_state? (eventually, if differences aren't too much)
|
| 21 |
+
- chars and sprites related functions are copied from blktiger.cpp. Verify differences
|
| 22 |
+
- correct GFX decoding
|
| 23 |
+
- tiles
|
| 24 |
+
- palette
|
| 25 |
+
- banking: seems to work by accident, tweaking the ROM loading. Pretty sure it's wrong.
|
| 26 |
+
- where are the sound latch and the other functions that the original has mapped in the io space?
|
| 27 |
+
- lots of other stuff
|
| 28 |
+
*/
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
#include "emu.h"
|
| 32 |
+
#include "cpu/z80/z80.h"
|
| 33 |
+
#include "machine/gen_latch.h"
|
| 34 |
+
#include "sound/ymopn.h"
|
| 35 |
+
#include "emupal.h"
|
| 36 |
+
#include "screen.h"
|
| 37 |
+
#include "speaker.h"
|
| 38 |
+
#include "tilemap.h"
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
namespace {
|
| 42 |
+
|
| 43 |
+
class blktiger_ms_state : public driver_device
|
| 44 |
+
{
|
| 45 |
+
public:
|
| 46 |
+
blktiger_ms_state(const machine_config &mconfig, device_type type, const char *tag) :
|
| 47 |
+
driver_device(mconfig, type, tag),
|
| 48 |
+
m_maincpu(*this, "maincpu"),
|
| 49 |
+
m_screen(*this, "screen"),
|
| 50 |
+
m_gfxdecode(*this, "gfxdecode"),
|
| 51 |
+
m_txvideoram(*this, "txvideoram"),
|
| 52 |
+
m_spriteram(*this, "spriteram")
|
| 53 |
+
{ }
|
| 54 |
+
|
| 55 |
+
void blktigerm(machine_config &config);
|
| 56 |
+
|
| 57 |
+
void init_blktigerm();
|
| 58 |
+
|
| 59 |
+
protected:
|
| 60 |
+
virtual void machine_start() override;
|
| 61 |
+
virtual void video_start() override;
|
| 62 |
+
|
| 63 |
+
private:
|
| 64 |
+
required_device<cpu_device> m_maincpu;
|
| 65 |
+
required_device<screen_device> m_screen;
|
| 66 |
+
required_device<gfxdecode_device> m_gfxdecode;
|
| 67 |
+
|
| 68 |
+
required_shared_ptr<uint8_t> m_txvideoram;
|
| 69 |
+
required_shared_ptr<uint8_t> m_spriteram;
|
| 70 |
+
|
| 71 |
+
TILE_GET_INFO_MEMBER(get_tx_tile_info);
|
| 72 |
+
void txvideoram_w(offs_t offset, uint8_t data);
|
| 73 |
+
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
| 74 |
+
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
| 75 |
+
|
| 76 |
+
void main_map(address_map &map);
|
| 77 |
+
void sound_map(address_map &map);
|
| 78 |
+
|
| 79 |
+
tilemap_t *m_tx_tilemap = nullptr;
|
| 80 |
+
};
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
void blktiger_ms_state::main_map(address_map &map)
|
| 84 |
+
{
|
| 85 |
+
map(0x0000, 0x7fff).rom().region("maincpu", 0);
|
| 86 |
+
map(0x8000, 0xbfff).bankr("mainbank");
|
| 87 |
+
map(0xc000, 0xcfff).ram();
|
| 88 |
+
map(0xc000, 0xc000).portr("IN0");
|
| 89 |
+
map(0xc001, 0xc001).portr("IN1");
|
| 90 |
+
map(0xc002, 0xc002).portr("IN2");
|
| 91 |
+
map(0xc003, 0xc003).portr("DSW0");
|
| 92 |
+
map(0xc004, 0xc004).portr("DSW1");
|
| 93 |
+
map(0xd000, 0xd7ff).ram().w(FUNC(blktiger_ms_state::txvideoram_w)).share(m_txvideoram);
|
| 94 |
+
map(0xd800, 0xd800).lw8(NAME([this] (u8 data) { membank("mainbank")->set_entry(data & 0x0f); })); // very probably wrong
|
| 95 |
+
map(0xe000, 0xfdff).ram();
|
| 96 |
+
map(0xfe00, 0xffff).ram().share(m_spriteram);
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
void blktiger_ms_state::sound_map(address_map &map) // seems similar to toki_ms.cpp and raiden_ms.cpp
|
| 100 |
+
{
|
| 101 |
+
map(0x0000, 0x7fff).rom().region("audiocpu", 0);
|
| 102 |
+
map(0xc000, 0xc7ff).ram();
|
| 103 |
+
map(0xc900, 0xc900).noprw(); // what lives here?
|
| 104 |
+
map(0xdff8, 0xdff8).r("soundlatch", FUNC(generic_latch_8_device::read));
|
| 105 |
+
map(0xdff0, 0xdfff).nopw(); // what lives here?
|
| 106 |
+
map(0xe000, 0xe001).w("ym1", FUNC(ym2203_device::write));
|
| 107 |
+
map(0xe002, 0xe003).w("ym2", FUNC(ym2203_device::write));
|
| 108 |
+
map(0xe008, 0xe009).r("ym1", FUNC(ym2203_device::read));
|
| 109 |
+
map(0xe00a, 0xe00b).r("ym2", FUNC(ym2203_device::read));
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
void blktiger_ms_state::machine_start()
|
| 113 |
+
{
|
| 114 |
+
membank("mainbank")->configure_entries(0, 16, memregion("maincpu")->base() + 0x10000, 0x4000);
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
void blktiger_ms_state::video_start()
|
| 118 |
+
{
|
| 119 |
+
m_tx_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(blktiger_ms_state::get_tx_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32);
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
void blktiger_ms_state::txvideoram_w(offs_t offset, uint8_t data)
|
| 123 |
+
{
|
| 124 |
+
m_txvideoram[offset] = data;
|
| 125 |
+
m_tx_tilemap->mark_tile_dirty(offset & 0x3ff);
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
void blktiger_ms_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
|
| 129 |
+
{
|
| 130 |
+
for (int offs = m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
|
| 131 |
+
{
|
| 132 |
+
int attr = m_spriteram[offs + 1];
|
| 133 |
+
int sx = m_spriteram[offs + 3] - ((attr & 0x10) << 4);
|
| 134 |
+
int sy = m_spriteram[offs + 2];
|
| 135 |
+
int code = m_spriteram[offs] | ((attr & 0xe0) << 3);
|
| 136 |
+
int color = attr & 0x07;
|
| 137 |
+
int flipx = attr & 0x08;
|
| 138 |
+
|
| 139 |
+
if (flip_screen())
|
| 140 |
+
{
|
| 141 |
+
sx = 240 - sx;
|
| 142 |
+
sy = 240 - sy;
|
| 143 |
+
flipx = !flipx;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
m_gfxdecode->gfx(1)->transpen(bitmap, cliprect,
|
| 147 |
+
code,
|
| 148 |
+
color,
|
| 149 |
+
flipx, flip_screen(),
|
| 150 |
+
sx, sy, 15);
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
uint32_t blktiger_ms_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
|
| 155 |
+
{
|
| 156 |
+
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
| 157 |
+
|
| 158 |
+
draw_sprites(bitmap, cliprect);
|
| 159 |
+
|
| 160 |
+
return 0;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
TILE_GET_INFO_MEMBER(blktiger_ms_state::get_tx_tile_info)
|
| 164 |
+
{
|
| 165 |
+
uint8_t attr = m_txvideoram[tile_index + 0x400];
|
| 166 |
+
tileinfo.set(0,
|
| 167 |
+
m_txvideoram[tile_index] + ((attr & 0xe0) << 3),
|
| 168 |
+
attr & 0x1f,
|
| 169 |
+
0);
|
| 170 |
+
}
|
| 171 |
+
|
| 172 |
+
static INPUT_PORTS_START( blktigerm )
|
| 173 |
+
PORT_START("IN0")
|
| 174 |
+
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
|
| 175 |
+
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
|
| 176 |
+
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
| 177 |
+
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
| 178 |
+
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
| 179 |
+
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 )
|
| 180 |
+
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 )
|
| 181 |
+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN2 )
|
| 182 |
+
|
| 183 |
+
PORT_START("IN1")
|
| 184 |
+
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
|
| 185 |
+
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
|
| 186 |
+
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
|
| 187 |
+
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
|
| 188 |
+
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
|
| 189 |
+
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
|
| 190 |
+
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
| 191 |
+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
| 192 |
+
|
| 193 |
+
PORT_START("IN2")
|
| 194 |
+
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
|
| 195 |
+
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
|
| 196 |
+
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
|
| 197 |
+
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
|
| 198 |
+
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
|
| 199 |
+
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL
|
| 200 |
+
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
| 201 |
+
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
| 202 |
+
|
| 203 |
+
PORT_START("DSW0")
|
| 204 |
+
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_A ) ) PORT_DIPLOCATION( "SW1:1,2,3" )
|
| 205 |
+
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
| 206 |
+
PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) )
|
| 207 |
+
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
|
| 208 |
+
PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) )
|
| 209 |
+
PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) )
|
| 210 |
+
PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) )
|
| 211 |
+
PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) )
|
| 212 |
+
PORT_DIPSETTING( 0x03, DEF_STR( 1C_5C ) )
|
| 213 |
+
PORT_DIPNAME( 0x38, 0x38, DEF_STR( Coin_B ) ) PORT_DIPLOCATION( "SW1:4,5,6" )
|
| 214 |
+
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
|
| 215 |
+
PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) )
|
| 216 |
+
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
|
| 217 |
+
PORT_DIPSETTING( 0x38, DEF_STR( 1C_1C ) )
|
| 218 |
+
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
|
| 219 |
+
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
|
| 220 |
+
PORT_DIPSETTING( 0x20, DEF_STR( 1C_4C ) )
|
| 221 |
+
PORT_DIPSETTING( 0x18, DEF_STR( 1C_5C ) )
|
| 222 |
+
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION( "SW1:7" )
|
| 223 |
+
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
|
| 224 |
+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
| 225 |
+
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Test ) ) PORT_DIPLOCATION( "SW1:8" )
|
| 226 |
+
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
|
| 227 |
+
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
|
| 228 |
+
|
| 229 |
+
PORT_START("DSW1")
|
| 230 |
+
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW2:1,2" )
|
| 231 |
+
PORT_DIPSETTING( 0x02, "2" )
|
| 232 |
+
PORT_DIPSETTING( 0x03, "3" )
|
| 233 |
+
PORT_DIPSETTING( 0x01, "5" )
|
| 234 |
+
PORT_DIPSETTING( 0x00, "7")
|
| 235 |
+
PORT_DIPNAME( 0x1c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION( "SW2:3,4,5" )
|
| 236 |
+
PORT_DIPSETTING( 0x1c, "1 (Easiest)")
|
| 237 |
+
PORT_DIPSETTING( 0x18, "2" )
|
| 238 |
+
PORT_DIPSETTING( 0x14, "3" )
|
| 239 |
+
PORT_DIPSETTING( 0x10, "4" )
|
| 240 |
+
PORT_DIPSETTING( 0x0c, "5 (Normal)" )
|
| 241 |
+
PORT_DIPSETTING( 0x08, "6" )
|
| 242 |
+
PORT_DIPSETTING( 0x04, "7" )
|
| 243 |
+
PORT_DIPSETTING( 0x00, "8 (Hardest)" )
|
| 244 |
+
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW2:6" )
|
| 245 |
+
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
|
| 246 |
+
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
|
| 247 |
+
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION( "SW2:7" )
|
| 248 |
+
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
|
| 249 |
+
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
|
| 250 |
+
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION( "SW2:8" )
|
| 251 |
+
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
|
| 252 |
+
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
|
| 253 |
+
INPUT_PORTS_END
|
| 254 |
+
|
| 255 |
+
static const gfx_layout charlayout =
|
| 256 |
+
{
|
| 257 |
+
8,8,
|
| 258 |
+
RGN_FRAC(1,4),
|
| 259 |
+
4,
|
| 260 |
+
{ RGN_FRAC(0,4), RGN_FRAC(1,4), RGN_FRAC(2,4), RGN_FRAC(3,4) },
|
| 261 |
+
{ 0, 1, 2, 3, 4, 5, 6, 7 },
|
| 262 |
+
{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
|
| 263 |
+
8*8
|
| 264 |
+
};
|
| 265 |
+
|
| 266 |
+
static const gfx_layout tiles16x16x4_layout =
|
| 267 |
+
{
|
| 268 |
+
16,16,
|
| 269 |
+
RGN_FRAC(1,1),
|
| 270 |
+
4,
|
| 271 |
+
{ 0,8,16,24 },
|
| 272 |
+
{ 0,1,2,3,4,5,6,7, 512,513,514,515,516,517,518,519 },
|
| 273 |
+
{ STEP16(0,32) },
|
| 274 |
+
16 * 16 * 4
|
| 275 |
+
};
|
| 276 |
+
|
| 277 |
+
static GFXDECODE_START( gfx_blktiger_ms )
|
| 278 |
+
GFXDECODE_ENTRY( "chars", 0, charlayout, 0x300, 32 )
|
| 279 |
+
GFXDECODE_ENTRY( "sprites", 0, tiles16x16x4_layout, 0x100, 32 )
|
| 280 |
+
GFXDECODE_END
|
| 281 |
+
|
| 282 |
+
void blktiger_ms_state::blktigerm(machine_config &config)
|
| 283 |
+
{
|
| 284 |
+
// basic machine hardware
|
| 285 |
+
Z80(config, m_maincpu, 24_MHz_XTAL / 4); // divisor unknown
|
| 286 |
+
m_maincpu->set_addrmap(AS_PROGRAM, &blktiger_ms_state::main_map);
|
| 287 |
+
m_maincpu->set_vblank_int("screen", FUNC(blktiger_ms_state::irq0_line_hold));
|
| 288 |
+
|
| 289 |
+
z80_device &audiocpu(Z80(config, "audiocpu", 24_MHz_XTAL / 8)); // divisor unknown, no XTAL on the PCB, might also use the 20 MHz one
|
| 290 |
+
audiocpu.set_addrmap(AS_PROGRAM, &blktiger_ms_state::sound_map);
|
| 291 |
+
|
| 292 |
+
// video hardware
|
| 293 |
+
SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // all wrong
|
| 294 |
+
m_screen->set_refresh_hz(60);
|
| 295 |
+
m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0));
|
| 296 |
+
m_screen->set_size(32*8, 32*8);
|
| 297 |
+
m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1);
|
| 298 |
+
m_screen->set_screen_update(FUNC(blktiger_ms_state::screen_update));
|
| 299 |
+
m_screen->set_palette("palette");
|
| 300 |
+
|
| 301 |
+
PALETTE(config, "palette").set_format(palette_device::xBRG_444, 1024);
|
| 302 |
+
|
| 303 |
+
GFXDECODE(config, "gfxdecode", "palette", gfx_blktiger_ms);
|
| 304 |
+
|
| 305 |
+
// sound hardware
|
| 306 |
+
SPEAKER(config, "mono").front_center();
|
| 307 |
+
|
| 308 |
+
GENERIC_LATCH_8(config, "soundlatch");
|
| 309 |
+
|
| 310 |
+
YM2203(config, "ym1", 24_MHz_XTAL / 8).add_route(ALL_OUTPUTS, "mono", 0.15); // divisor unknown, no XTAL on the PCB, might also use the 20 MHz one
|
| 311 |
+
|
| 312 |
+
YM2203(config, "ym2", 24_MHz_XTAL / 8).add_route(ALL_OUTPUTS, "mono", 0.15); // divisor unknown, no XTAL on the PCB, might also use the 20 MHz one
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
ROM_START( blktigerm )
|
| 316 |
+
ROM_REGION( 0x50000, "maincpu", 0 ) // on MOD 3/4 board
|
| 317 |
+
ROM_LOAD( "3_bl_301.ic14", 0x00000, 0x08000, CRC(b4525312) SHA1(958ce9a7f41422f3011412e4a16dd3ad65019733) )
|
| 318 |
+
ROM_LOAD( "3_bl_304.ic18", 0x10000, 0x10000, CRC(36f669c6) SHA1(e91fd222919904d4d4b3ef70a22ab599a7cfa263) )
|
| 319 |
+
ROM_LOAD( "3_bl_305.ic19", 0x20000, 0x10000, CRC(b30a99af) SHA1(19d6dbe11ffeb9a21dbfe75eb39ce9ceaef5eb31) )
|
| 320 |
+
ROM_LOAD( "3_bl_302_c.ic13", 0x30000, 0x10000, CRC(c943415f) SHA1(08e82d2557de01c979a0a58b5433e9bdcdb118cb) )
|
| 321 |
+
ROM_LOAD( "3_bl_303_b.ic12", 0x40000, 0x10000, CRC(72114f6b) SHA1(049e747431cd95db2e7414467754424f68a8d757) )
|
| 322 |
+
|
| 323 |
+
ROM_REGION( 0x8000, "audiocpu", 0 )
|
| 324 |
+
ROM_LOAD( "1_bl_101.ic12", 0x0000, 0x8000, CRC(14028686) SHA1(64dc219d906f1bdd0c2bc05aff5aa73e001a6901) )
|
| 325 |
+
|
| 326 |
+
ROM_REGION( 0x10000, "chars", ROMREGION_INVERT ) // on one of the MOD 4/3 boards, both ROMs 0xxxxxxxxxxxxxx = 0xFF
|
| 327 |
+
ROM_LOAD( "4_bl_401.ic17", 0x0000, 0x8000, CRC(ab1afb3d) SHA1(555332ccfb69e65b776f94ffac9a4a051fb6f09e) )
|
| 328 |
+
ROM_LOAD( "4_bl_402.ic16", 0x8000, 0x8000, CRC(89445b11) SHA1(7d9ab6e88d7de3a0e31b3b8a5e57dd39afd7940d) )
|
| 329 |
+
|
| 330 |
+
ROM_REGION( 0x40000, "tiles", 0 ) // on the other MOD 4/3 board
|
| 331 |
+
ROM_LOAD32_BYTE( "4_a_bl_4a01.ic17", 0x00003, 0x10000, CRC(fc00fd6c) SHA1(066714421fa782c6cfad9f695f05e6e3551ffdc7) )
|
| 332 |
+
ROM_LOAD32_BYTE( "4_a_bl_4a02.ic16", 0x00002, 0x10000, CRC(49cd8afa) SHA1(147b65dad4f05b940d1f7a4028f5748ba1b7daa5) )
|
| 333 |
+
ROM_LOAD32_BYTE( "4_a_bl_4a03.ic15", 0x00001, 0x10000, CRC(50207dd4) SHA1(bee343fbefc817fa14b8b303f013bf5b89e911f8) )
|
| 334 |
+
ROM_LOAD32_BYTE( "4_a_bl_4a04.ic14", 0x00000, 0x10000, CRC(4bb0c1ba) SHA1(9433c78f0de7cb1f92b22612b9f3c51d813b025a) )
|
| 335 |
+
|
| 336 |
+
ROM_REGION( 0x40000, "sprites", ROMREGION_INVERT ) // on MOD 51/1 board
|
| 337 |
+
ROM_LOAD32_BYTE( "51_bl_501.ic43", 0x00003, 0x10000, CRC(ace32b94) SHA1(4a09e8dc73bd16f7d378aefbe5d433dd1396f97d) )
|
| 338 |
+
ROM_LOAD32_BYTE( "51_bl_502.ic42", 0x00002, 0x10000, CRC(f6c4cc0b) SHA1(678fd71e90237f8e19eae78fe150a4c5d3494c6c) )
|
| 339 |
+
ROM_LOAD32_BYTE( "51_bl_503.ic41", 0x00001, 0x10000, CRC(61e3ae0b) SHA1(cbb83827f027acd6b905f4210476810bcd4b03a9) )
|
| 340 |
+
ROM_LOAD32_BYTE( "51_bl_504.ic40", 0x00000, 0x10000, CRC(2cb45034) SHA1(b2fd3b7b7b9d68b6ff1985166b106e65b17dbb23) )
|
| 341 |
+
|
| 342 |
+
ROM_REGION( 0x0700, "proms", 0 ) // PROMs (function unknown)
|
| 343 |
+
ROM_LOAD( "1_p0101_82s123.ic20", 0x0000, 0x0020, CRC(3fd60d3a) SHA1(8100fa7453638ac40193b5d92404f41b101ed2cc) )
|
| 344 |
+
ROM_LOAD( "21_p0201_82s129.ic4", 0x0100, 0x0100, CRC(2697da58) SHA1(e62516b886ff6e204b718e5f0c6ce2712e4b7fc5) )
|
| 345 |
+
ROM_LOAD( "21_p0202_82s129.ic12", 0x0200, 0x0100, CRC(e434128a) SHA1(ef0f6d8daef8b25211095577a182cdf120a272c1) )
|
| 346 |
+
ROM_LOAD( "3_subcpu_p0322_82s147.bin", 0x0300, 0x0200, CRC(6d427336) SHA1(6ce1ef41df2b450fafe11c3021991618bdb771ed) )
|
| 347 |
+
ROM_LOAD( "4_a_bl_82s123.ic13", 0x0500, 0x0020, CRC(671f1183) SHA1(dbc21c3922c5e69340daa9008e1200f1304b3e8f) )
|
| 348 |
+
ROM_LOAD( "51_p0502_82s129.ic10", 0x0600, 0x0100, CRC(15085e44) SHA1(646e7100fcb112594023cf02be036bd3d42cc13c) )
|
| 349 |
+
|
| 350 |
+
ROM_REGION( 0x1000, "plds", ROMREGION_ERASEFF )
|
| 351 |
+
ROM_LOAD( "4_p0403_pal16r8a-2cn.ic29", 0x000, 0x104, CRC(506156cc) SHA1(5560671fc2c9872ed28620491af5dc486909fc6e) )
|
| 352 |
+
ROM_LOAD( "4_a_p0403_pal16r8a-2cn.ic29", 0x000, 0x104, CRC(506156cc) SHA1(5560671fc2c9872ed28620491af5dc486909fc6e) ) // identical to the above one (same PCB type)
|
| 353 |
+
ROM_LOAD( "51_p0503_pal16r8a.ic56", 0x000, 0x104, CRC(07eb86d2) SHA1(482eb325df5bc60353bac85412cf45429cd03c6d) )
|
| 354 |
+
ROM_END
|
| 355 |
+
|
| 356 |
+
void blktiger_ms_state::init_blktigerm()
|
| 357 |
+
{
|
| 358 |
+
uint8_t *const src = memregion("maincpu")->base();
|
| 359 |
+
int const len = 0x50000;
|
| 360 |
+
|
| 361 |
+
// bitswap data
|
| 362 |
+
for (int i = 0; i < len; i++)
|
| 363 |
+
src[i] = bitswap<8>(src[i], 5, 3, 7, 2, 0, 1, 4, 6);
|
| 364 |
+
|
| 365 |
+
// descramble address
|
| 366 |
+
std::vector<uint8_t> buffer(len);
|
| 367 |
+
memcpy(&buffer[0], src, len);
|
| 368 |
+
|
| 369 |
+
for (int i = 0; i < len; i++)
|
| 370 |
+
src[i] = buffer[bitswap<24>(i, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 10, 8, 6, 4, 0, 2, 7, 3, 1, 9, 11, 5)];
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
} // Anonymous namespace
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
GAME( 1991, blktigerm, blktiger, blktigerm, blktigerm, blktiger_ms_state, init_blktigerm, ROT0, "bootleg (Gaelco / Ervisa)", "Black Tiger (Modular System)", MACHINE_IS_SKELETON )
|
snapshots/jotego_jtcores_pr1100/cores/btiger/doc/scan.cc
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <iostream>
|
| 2 |
+
#include <iomanip>
|
| 3 |
+
|
| 4 |
+
using namespace std;
|
| 5 |
+
|
| 6 |
+
int bg8x4_scan(int col, int row ) {
|
| 7 |
+
return (col & 0x0f) + ((row & 0x0f) << 4) + ((col & 0x70) << 4) + ((row & 0x30) << 7);
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
int bg4x8_scan(int col, int row ) {
|
| 11 |
+
return (col & 0x0f) + ((row & 0x0f) << 4) + ((col & 0x30) << 4) + ((row & 0x70) << 6);
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
void all_8x4() {
|
| 15 |
+
for( int row=0; row<64; row++ ) {
|
| 16 |
+
for( int col=0; col<128; col++ ) {
|
| 17 |
+
cout << hex << row << '\t' << hex << col << '\t'
|
| 18 |
+
<< hex << bg8x4_scan(row,col) << '\n';
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
void all_4x8() {
|
| 24 |
+
for( int row=0; row<128; row++ ) {
|
| 25 |
+
for( int col=0; col<64; col++ ) {
|
| 26 |
+
cout << hex << row << '\t' << hex << col << '\t'
|
| 27 |
+
<< hex << bg4x8_scan(row,col) << '\n';
|
| 28 |
+
}
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
int main() {
|
| 33 |
+
//all_4x8();
|
| 34 |
+
all_8x4();
|
| 35 |
+
}
|
snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_colmix.v
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 20-11-2019 */
|
| 18 |
+
|
| 19 |
+
// bd02.9j is probably the priority PROM. It isn't really worth using
|
| 20 |
+
// as the content is quite plain
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
module jtbtiger_colmix(
|
| 24 |
+
input rst,
|
| 25 |
+
input clk,
|
| 26 |
+
input cen12,
|
| 27 |
+
input cen6 /* synthesis direct_enable = 1 */,
|
| 28 |
+
|
| 29 |
+
// pixel input from generator modules
|
| 30 |
+
input [6:0] char_pxl, // character color code
|
| 31 |
+
input [7:0] scr_pxl,
|
| 32 |
+
input [6:0] obj_pxl,
|
| 33 |
+
input preLVBL,
|
| 34 |
+
input preLHBL,
|
| 35 |
+
output LHBL,
|
| 36 |
+
output LVBL,
|
| 37 |
+
|
| 38 |
+
// CPU inteface
|
| 39 |
+
input [9:0] AB,
|
| 40 |
+
input blue_cs,
|
| 41 |
+
input redgreen_cs,
|
| 42 |
+
input [7:0] DB,
|
| 43 |
+
|
| 44 |
+
output [3:0] red,
|
| 45 |
+
output [3:0] green,
|
| 46 |
+
output [3:0] blue,
|
| 47 |
+
// Priority PROMs bd01.8j
|
| 48 |
+
input [7:0] prog_addr,
|
| 49 |
+
input prom_prior_we,
|
| 50 |
+
input [3:0] prom_din
|
| 51 |
+
);
|
| 52 |
+
|
| 53 |
+
reg [9:0] pixel_mux;
|
| 54 |
+
|
| 55 |
+
wire char_blank = &char_pxl[1:0];
|
| 56 |
+
wire obj_blank = &obj_pxl [3:0];
|
| 57 |
+
|
| 58 |
+
reg [2:0] obj_sel; // signals whether an object pixel is selected
|
| 59 |
+
|
| 60 |
+
reg [7:0] seladdr;
|
| 61 |
+
wire [3:0] selbus;
|
| 62 |
+
|
| 63 |
+
reg [7:0] scr0;
|
| 64 |
+
reg [6:0] char0, obj0;
|
| 65 |
+
|
| 66 |
+
wire [1:0] scr_prio = scr_pxl[6:5] + 2'b01;
|
| 67 |
+
|
| 68 |
+
always @(posedge clk) if(cen6) begin
|
| 69 |
+
seladdr <= { ~char_blank, ~obj_blank,
|
| 70 |
+
scr_pxl[7] ? 2'b00 : {scr_prio}, scr_pxl[3:0] };
|
| 71 |
+
scr0 <= scr_pxl;
|
| 72 |
+
char0 <= char_pxl;
|
| 73 |
+
obj0 <= obj_pxl;
|
| 74 |
+
|
| 75 |
+
obj_sel[2] <= obj_sel[1];
|
| 76 |
+
obj_sel[1] <= obj_sel[0];
|
| 77 |
+
obj_sel[0] <= 1'b0;
|
| 78 |
+
|
| 79 |
+
pixel_mux[9:8] <= selbus[3:2];
|
| 80 |
+
case( selbus[1:0] )
|
| 81 |
+
2'b11: pixel_mux[7:0] <= { 1'b0, char0 };
|
| 82 |
+
2'b10: pixel_mux[7:0] <= scr0;
|
| 83 |
+
2'b01: begin
|
| 84 |
+
pixel_mux[7:0] <= { 1'b0, obj0 };
|
| 85 |
+
obj_sel[0] <= 1'b1;
|
| 86 |
+
end
|
| 87 |
+
2'b00: pixel_mux[7:0] <= 8'd0; // this value is a guess
|
| 88 |
+
endcase
|
| 89 |
+
end
|
| 90 |
+
|
| 91 |
+
wire [3:0] pal_red, pal_green, pal_blue;
|
| 92 |
+
|
| 93 |
+
// Palette is in RAM
|
| 94 |
+
wire we_rg = /* !LVBL && */ redgreen_cs;
|
| 95 |
+
wire we_b = /* !LVBL && */ blue_cs;
|
| 96 |
+
|
| 97 |
+
jtgng_dual_ram #(.AW(10),.SIMFILE("rg_ram.bin")) u_redgreen(
|
| 98 |
+
.clk ( clk ),
|
| 99 |
+
.clk_en ( cen6 ), // clock enable only applies to write operation
|
| 100 |
+
.data ( DB ),
|
| 101 |
+
.rd_addr ( pixel_mux ),
|
| 102 |
+
.wr_addr ( AB ),
|
| 103 |
+
.we ( we_rg ),
|
| 104 |
+
.q ( {pal_red, pal_green} )
|
| 105 |
+
);
|
| 106 |
+
|
| 107 |
+
jtgng_dual_ram #(.AW(10),.DW(4),.SIMFILE("b_ram.bin")) u_blue(
|
| 108 |
+
.clk ( clk ),
|
| 109 |
+
.clk_en ( cen6 ), // clock enable only applies to write operation
|
| 110 |
+
.data ( DB[3:0] ),
|
| 111 |
+
.rd_addr ( pixel_mux ),
|
| 112 |
+
.wr_addr ( AB ),
|
| 113 |
+
.we ( we_b ),
|
| 114 |
+
.q ( pal_blue )
|
| 115 |
+
);
|
| 116 |
+
|
| 117 |
+
// Clock must be faster than 6MHz so selbus is ready for the next
|
| 118 |
+
// 6MHz clock cycle:
|
| 119 |
+
jtframe_prom #(.AW(8),.DW(4),.SIMFILE("../../../rom/btiger/bd01.8j")) u_selbus(
|
| 120 |
+
.clk ( clk ),
|
| 121 |
+
.cen ( cen12 ),
|
| 122 |
+
.data ( prom_din ),
|
| 123 |
+
.rd_addr( seladdr ),
|
| 124 |
+
.wr_addr( prog_addr ),
|
| 125 |
+
.we ( prom_prior_we ),
|
| 126 |
+
.q ( selbus )
|
| 127 |
+
);
|
| 128 |
+
|
| 129 |
+
jtframe_blank #(.DLY(8),.DW(12)) u_dly(
|
| 130 |
+
.clk ( clk ),
|
| 131 |
+
.pxl_cen ( cen6 ),
|
| 132 |
+
.preLHBL ( preLHBL ),
|
| 133 |
+
.preLVBL ( preLVBL ),
|
| 134 |
+
.LHBL ( LHBL ),
|
| 135 |
+
.LVBL ( LVBL ),
|
| 136 |
+
.rgb_in ( {pal_red, pal_green, pal_blue} ),
|
| 137 |
+
.preLBL ( ),
|
| 138 |
+
.rgb_out ( {red, green, blue } )
|
| 139 |
+
);
|
| 140 |
+
|
| 141 |
+
endmodule // jtgng_colmix
|
snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_game.v
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 18-11-2019 */
|
| 18 |
+
|
| 19 |
+
module jtbtiger_game(
|
| 20 |
+
`include "jtframe_game_ports.inc" // see $JTFRAME/hdl/inc/jtframe_game_ports.inc
|
| 21 |
+
);
|
| 22 |
+
|
| 23 |
+
localparam [25:0] OBJ_START = `JTFRAME_BA3_START,
|
| 24 |
+
PROM_START = `JTFRAME_PROM_START,
|
| 25 |
+
MCUOVER = PROM_START+26'h1000;
|
| 26 |
+
|
| 27 |
+
wire [12:0] cpu_AB;
|
| 28 |
+
wire [10:0] scr_hpos, scr_vpos;
|
| 29 |
+
wire [ 8:0] obj_AB, V, H;
|
| 30 |
+
wire [ 7:0] mcu_din, mcu_dout, cpu_dout, char_dout, scr_dout, snd_latch, main_ram;
|
| 31 |
+
wire [ 4:0] prom;
|
| 32 |
+
wire [ 1:0] scr_bank;
|
| 33 |
+
wire mcu_wr, mcu_rd, preLHBL, preLVBL, sres_b,
|
| 34 |
+
cen12, cen6, cen3, cen1p5, cenfm,
|
| 35 |
+
cen8, RnW, blue_cs, redgreen_cs, CHRON, SCRON, OBJON,
|
| 36 |
+
OKOUT, blcnten, bus_req, bus_ack, LHBL_obj, LVBL_obj,
|
| 37 |
+
rd, cpu_cen, char_busy, scr_busy, mcuover,
|
| 38 |
+
scr_layout, HINIT, char_cs, flip, scr_cs;
|
| 39 |
+
reg pause;
|
| 40 |
+
wire prom_prior_we = prom[0];
|
| 41 |
+
wire prom_mcu = prom[4];
|
| 42 |
+
|
| 43 |
+
assign debug_view = { 5'd0, OBJON, SCRON, CHRON };
|
| 44 |
+
assign dip_flip = ~dipsw[6];
|
| 45 |
+
assign pxl2_cen = cen12;
|
| 46 |
+
assign pxl_cen = cen6;
|
| 47 |
+
assign mcuover = ioctl_addr>=MCUOVER;
|
| 48 |
+
assign prom[0] = prom_we && mcuover && ioctl_addr[10:8]==0;
|
| 49 |
+
assign prom[1] = prom_we && mcuover && ioctl_addr[10:8]==1;
|
| 50 |
+
assign prom[2] = prom_we && mcuover && ioctl_addr[10:8]==2;
|
| 51 |
+
assign prom[3] = prom_we && mcuover && ioctl_addr[10:8]==3;
|
| 52 |
+
assign prom[4] = prom_we && !mcuover;
|
| 53 |
+
/* verilator tracing_off */
|
| 54 |
+
always @(posedge clk) pause <= ~dip_pause;
|
| 55 |
+
|
| 56 |
+
always @* begin
|
| 57 |
+
post_addr = prog_addr;
|
| 58 |
+
if( ioctl_addr >= OBJ_START ) begin
|
| 59 |
+
post_addr[5:1] = {prog_addr[4:1],prog_addr[5]};
|
| 60 |
+
end
|
| 61 |
+
end
|
| 62 |
+
/* verilator lint_off PINMISSING */
|
| 63 |
+
jtframe_cen48 u_cen(
|
| 64 |
+
.clk ( clk ),
|
| 65 |
+
.cen12 ( cen12 ),
|
| 66 |
+
.cen12b ( ),
|
| 67 |
+
.cen8 ( cen8 ),
|
| 68 |
+
.cen6 ( cen6 ),
|
| 69 |
+
.cen6b ( ),
|
| 70 |
+
.cen3 ( cen3 ),
|
| 71 |
+
.cen1p5 ( cen1p5 )
|
| 72 |
+
);
|
| 73 |
+
|
| 74 |
+
jtframe_cen3p57 u_cen3p57(
|
| 75 |
+
.clk ( clk ),
|
| 76 |
+
.cen_3p57 ( cenfm ),
|
| 77 |
+
.cen_1p78 ( ) // unused
|
| 78 |
+
);/* verilator lint_on PINMISSING */
|
| 79 |
+
|
| 80 |
+
jtgng_timer u_timer(
|
| 81 |
+
.clk ( clk ),
|
| 82 |
+
.cen6 ( cen6 ),
|
| 83 |
+
.V ( V ),
|
| 84 |
+
.H ( H ),
|
| 85 |
+
.Hinit ( HINIT ),
|
| 86 |
+
.LHBL ( preLHBL ),
|
| 87 |
+
.LVBL ( preLVBL ),
|
| 88 |
+
.LHBL_obj ( LHBL_obj ),
|
| 89 |
+
.LVBL_obj ( LVBL_obj ),
|
| 90 |
+
.HS ( HS ),
|
| 91 |
+
.VS ( VS ),
|
| 92 |
+
.Vinit ( )
|
| 93 |
+
);
|
| 94 |
+
|
| 95 |
+
`ifndef NOMAIN
|
| 96 |
+
jtbtiger_main u_main(
|
| 97 |
+
.rst ( rst ),
|
| 98 |
+
.clk ( clk ),
|
| 99 |
+
.cen6 ( cen6 ),
|
| 100 |
+
.cen3 ( cen3 ),
|
| 101 |
+
.cpu_cen ( cpu_cen ),
|
| 102 |
+
// Timing
|
| 103 |
+
.flip ( flip ),
|
| 104 |
+
.V ( V ),
|
| 105 |
+
.LHBL ( LHBL ),
|
| 106 |
+
.LVBL ( LVBL ),
|
| 107 |
+
.H1 ( H[0] ),
|
| 108 |
+
// Palette
|
| 109 |
+
.blue_cs ( blue_cs ),
|
| 110 |
+
.redgreen_cs( redgreen_cs ),
|
| 111 |
+
// sound
|
| 112 |
+
.sres_b ( sres_b ),
|
| 113 |
+
.snd_latch ( snd_latch ),
|
| 114 |
+
// security
|
| 115 |
+
.mcu_din ( mcu_din ),
|
| 116 |
+
.mcu_dout ( mcu_dout ),
|
| 117 |
+
.mcu_wr ( mcu_wr ),
|
| 118 |
+
.mcu_rd ( mcu_rd ),
|
| 119 |
+
// CHAR
|
| 120 |
+
.char_dout ( char_dout ),
|
| 121 |
+
.cpu_dout ( cpu_dout ),
|
| 122 |
+
.char_cs ( char_cs ),
|
| 123 |
+
.char_busy ( char_busy ),
|
| 124 |
+
.CHRON ( CHRON ),
|
| 125 |
+
// SCROLL
|
| 126 |
+
.scr_dout ( scr_dout ),
|
| 127 |
+
.scr_cs ( scr_cs ),
|
| 128 |
+
.scr_busy ( scr_busy ),
|
| 129 |
+
.scr_hpos ( scr_hpos ),
|
| 130 |
+
.scr_vpos ( scr_vpos ),
|
| 131 |
+
.SCRON ( SCRON ),
|
| 132 |
+
.scr_bank ( scr_bank ),
|
| 133 |
+
.scr_layout ( scr_layout ),
|
| 134 |
+
// OBJ - bus sharing
|
| 135 |
+
.obj_AB ( obj_AB ),
|
| 136 |
+
.cpu_AB ( cpu_AB ),
|
| 137 |
+
.ram_dout ( main_ram ),
|
| 138 |
+
.OKOUT ( OKOUT ),
|
| 139 |
+
.blcnten ( blcnten ),
|
| 140 |
+
.bus_req ( bus_req ),
|
| 141 |
+
.bus_ack ( bus_ack ),
|
| 142 |
+
.OBJON ( OBJON ),
|
| 143 |
+
// ROM
|
| 144 |
+
.rom_cs ( main_cs ),
|
| 145 |
+
.rom_addr ( main_addr ),
|
| 146 |
+
.rom_data ( main_data ),
|
| 147 |
+
.rom_ok ( main_ok ),
|
| 148 |
+
// Cabinet input
|
| 149 |
+
.cab_1p ( cab_1p[1:0] ),
|
| 150 |
+
.coin ( coin[1:0] ),
|
| 151 |
+
.service ( service ),
|
| 152 |
+
.joystick1 ( joystick1[5:0]),
|
| 153 |
+
.joystick2 ( joystick2[5:0]),
|
| 154 |
+
|
| 155 |
+
.RnW ( RnW ),
|
| 156 |
+
// DIP switches
|
| 157 |
+
.dip_pause ( dip_pause ),
|
| 158 |
+
.dipsw_a ( dipsw[15:8] ),
|
| 159 |
+
.dipsw_b ( dipsw[ 7:0] )
|
| 160 |
+
);
|
| 161 |
+
`else
|
| 162 |
+
assign main_addr = 19'd0;
|
| 163 |
+
assign char_cs = 1'b0;
|
| 164 |
+
assign scr_cs = 1'b0;
|
| 165 |
+
assign bus_ack = 1'b0;
|
| 166 |
+
assign flip = 1'b0;
|
| 167 |
+
assign RnW = 1'b1;
|
| 168 |
+
assign scr_hpos = 9'd0;
|
| 169 |
+
assign scr_vpos = 9'd0;
|
| 170 |
+
assign cpu_cen = cen3;
|
| 171 |
+
assign scr_layout = 1'b0;
|
| 172 |
+
assign scr_bank = 2'b0;
|
| 173 |
+
`endif
|
| 174 |
+
|
| 175 |
+
`ifndef NOMCU
|
| 176 |
+
jtbtiger_mcu u_mcu(
|
| 177 |
+
.rst ( rst24 ),
|
| 178 |
+
.clk ( clk24 ),
|
| 179 |
+
.clk_rom ( clk ),
|
| 180 |
+
.LVBL ( LVBL ),
|
| 181 |
+
.mcu_dout ( mcu_dout ),
|
| 182 |
+
.mcu_din ( mcu_din ),
|
| 183 |
+
.mcu_wr ( mcu_wr ),
|
| 184 |
+
.mcu_rd ( mcu_rd ),
|
| 185 |
+
.prog_addr ( prog_addr[11:0] ),
|
| 186 |
+
.prom_din ( prog_data ),
|
| 187 |
+
.prom_we ( prom_mcu )
|
| 188 |
+
);
|
| 189 |
+
`else
|
| 190 |
+
assign mcu_dout = 8'hff;
|
| 191 |
+
`endif
|
| 192 |
+
|
| 193 |
+
jtgng_sound #(.LAYOUT(4)) u_sound (
|
| 194 |
+
.rst ( rst ),
|
| 195 |
+
.clk ( clk ),
|
| 196 |
+
.cen3 ( cenfm ),
|
| 197 |
+
.cen1p5 ( cenfm ),
|
| 198 |
+
// Interface with main CPU
|
| 199 |
+
.sres_b ( sres_b ),
|
| 200 |
+
.snd_latch ( snd_latch ),
|
| 201 |
+
.snd_int ( 1'b0 ),
|
| 202 |
+
// ROM
|
| 203 |
+
.rom_addr ( snd_addr ),
|
| 204 |
+
.rom_data ( snd_data ),
|
| 205 |
+
.rom_cs ( snd_cs ),
|
| 206 |
+
.rom_ok ( snd_ok ),
|
| 207 |
+
// sound output
|
| 208 |
+
.fm0 ( fm0 ),
|
| 209 |
+
.fm1 ( fm1 ),
|
| 210 |
+
.psg0 ( psg0 ),
|
| 211 |
+
.psg1 ( psg1 ),
|
| 212 |
+
// Unused
|
| 213 |
+
.mcu_sdin ( 8'd0 ),
|
| 214 |
+
.mcu_srd ( ),
|
| 215 |
+
.snd2_latch ( ),
|
| 216 |
+
.debug_view ( ),
|
| 217 |
+
.debug_bus ( debug_bus )
|
| 218 |
+
);
|
| 219 |
+
|
| 220 |
+
jtbtiger_video u_video(
|
| 221 |
+
.rst ( rst ),
|
| 222 |
+
.clk ( clk ),
|
| 223 |
+
.cen12 ( cen12 ),
|
| 224 |
+
.cen8 ( cen8 ),
|
| 225 |
+
.cen6 ( cen6 ),
|
| 226 |
+
.cen3 ( cen3 ),
|
| 227 |
+
.cpu_cen ( cpu_cen ),
|
| 228 |
+
.cpu_AB ( cpu_AB[11:0] ),
|
| 229 |
+
.V ( V[7:0] ),
|
| 230 |
+
.H ( H ),
|
| 231 |
+
.RnW ( RnW ),
|
| 232 |
+
.flip ( flip ),
|
| 233 |
+
.cpu_dout ( cpu_dout ),
|
| 234 |
+
.pause ( pause ),
|
| 235 |
+
// CHAR
|
| 236 |
+
.char_cs ( char_cs ),
|
| 237 |
+
.char_dout ( char_dout ),
|
| 238 |
+
.char_addr ( char_addr ),
|
| 239 |
+
.char_data ( char_data ),
|
| 240 |
+
.char_busy ( char_busy ),
|
| 241 |
+
.char_ok ( char_ok ),
|
| 242 |
+
.CHRON ( CHRON ),
|
| 243 |
+
// SCROLL - ROM
|
| 244 |
+
.scr_cs ( scr_cs ),
|
| 245 |
+
.scr_dout ( scr_dout ),
|
| 246 |
+
.scr_addr ( scr_addr ),
|
| 247 |
+
.scr_data ( scr_data ),
|
| 248 |
+
.scr_busy ( scr_busy ),
|
| 249 |
+
.scr_hpos ( scr_hpos ),
|
| 250 |
+
.scr_vpos ( scr_vpos ),
|
| 251 |
+
.scr_ok ( scr_ok ),
|
| 252 |
+
.scr_bank ( scr_bank ),
|
| 253 |
+
.scr_layout ( scr_layout ),
|
| 254 |
+
.SCRON ( SCRON ),
|
| 255 |
+
// OBJ
|
| 256 |
+
.HINIT ( HINIT ),
|
| 257 |
+
.obj_AB ( obj_AB ),
|
| 258 |
+
.main_ram ( main_ram ),
|
| 259 |
+
.obj_addr ( obj_addr ),
|
| 260 |
+
.obj_data ( obj_data ),
|
| 261 |
+
.obj_ok ( obj_ok ),
|
| 262 |
+
.OKOUT ( OKOUT ),
|
| 263 |
+
.bus_req ( bus_req ), // Request bus
|
| 264 |
+
.bus_ack ( bus_ack ), // bus acknowledge
|
| 265 |
+
.blcnten ( blcnten ), // bus line counter enable
|
| 266 |
+
.OBJON ( OBJON ),
|
| 267 |
+
// PROMs
|
| 268 |
+
.prog_addr ( prog_addr[7:0]),
|
| 269 |
+
.prom_prior_we( prom_prior_we ),
|
| 270 |
+
.prom_din ( prog_data[3:0]),
|
| 271 |
+
// Palette RAM
|
| 272 |
+
.blue_cs ( blue_cs ),
|
| 273 |
+
.redgreen_cs( redgreen_cs ),
|
| 274 |
+
// Color Mix
|
| 275 |
+
.preLHBL ( preLHBL ),
|
| 276 |
+
.preLVBL ( preLVBL ),
|
| 277 |
+
.LHBL_obj ( LHBL_obj ),
|
| 278 |
+
.LVBL_obj ( LVBL_obj ),
|
| 279 |
+
.LHBL ( LHBL ),
|
| 280 |
+
.LVBL ( LVBL ),
|
| 281 |
+
.gfx_en ( gfx_en ),
|
| 282 |
+
// Pixel Output
|
| 283 |
+
.red ( red ),
|
| 284 |
+
.green ( green ),
|
| 285 |
+
.blue ( blue )
|
| 286 |
+
);
|
| 287 |
+
|
| 288 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_main.v
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 18-11-2019 */
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
module jtbtiger_main(
|
| 21 |
+
input rst,
|
| 22 |
+
input clk,
|
| 23 |
+
input cen6, // 6MHz
|
| 24 |
+
input cen3 /* synthesis direct_enable = 1 */, // 3MHz
|
| 25 |
+
output cpu_cen,
|
| 26 |
+
// Timing
|
| 27 |
+
output reg flip,
|
| 28 |
+
output reg blue_cs,
|
| 29 |
+
output reg redgreen_cs,
|
| 30 |
+
input [8:0] V,
|
| 31 |
+
input LHBL,
|
| 32 |
+
input LVBL,
|
| 33 |
+
input H1,
|
| 34 |
+
// Sound
|
| 35 |
+
output reg sres_b, // sound reset
|
| 36 |
+
output reg [7:0] snd_latch,
|
| 37 |
+
// Characters
|
| 38 |
+
input [7:0] char_dout,
|
| 39 |
+
output [7:0] cpu_dout,
|
| 40 |
+
output reg char_cs,
|
| 41 |
+
input char_busy,
|
| 42 |
+
// scroll
|
| 43 |
+
input [7:0] scr_dout,
|
| 44 |
+
output reg scr_cs,
|
| 45 |
+
input scr_busy,
|
| 46 |
+
output reg [10:0] scr_hpos,
|
| 47 |
+
output reg [10:0] scr_vpos,
|
| 48 |
+
output reg [1:0] scr_bank,
|
| 49 |
+
output reg scr_layout,
|
| 50 |
+
output reg CHRON,
|
| 51 |
+
output reg SCRON,
|
| 52 |
+
output reg OBJON,
|
| 53 |
+
// Security
|
| 54 |
+
input [7:0] mcu_dout,
|
| 55 |
+
output reg [7:0] mcu_din,
|
| 56 |
+
output reg mcu_wr,
|
| 57 |
+
output reg mcu_rd,
|
| 58 |
+
// cabinet I/O
|
| 59 |
+
input [5:0] joystick1,
|
| 60 |
+
input [5:0] joystick2,
|
| 61 |
+
input [1:0] cab_1p,
|
| 62 |
+
input [1:0] coin,
|
| 63 |
+
// BUS sharing
|
| 64 |
+
output [12:0] cpu_AB,
|
| 65 |
+
output [ 7:0] ram_dout,
|
| 66 |
+
input [ 8:0] obj_AB,
|
| 67 |
+
output RnW,
|
| 68 |
+
output reg OKOUT,
|
| 69 |
+
input bus_req, // Request bus
|
| 70 |
+
output bus_ack, // bus acknowledge
|
| 71 |
+
input blcnten, // bus line counter enable
|
| 72 |
+
// ROM access
|
| 73 |
+
output reg rom_cs,
|
| 74 |
+
output reg [18:0] rom_addr,
|
| 75 |
+
input [ 7:0] rom_data,
|
| 76 |
+
input rom_ok,
|
| 77 |
+
// DIP switches
|
| 78 |
+
input service,
|
| 79 |
+
input dip_pause,
|
| 80 |
+
input [7:0] dipsw_a,
|
| 81 |
+
input [7:0] dipsw_b
|
| 82 |
+
);
|
| 83 |
+
|
| 84 |
+
wire [15:0] A;
|
| 85 |
+
wire t80_rst_n;
|
| 86 |
+
reg in_cs, ram_cs, bank_cs, scrpos_cs, snd_latch_cs;
|
| 87 |
+
wire rd_n, wr_n;
|
| 88 |
+
|
| 89 |
+
assign RnW = wr_n;
|
| 90 |
+
|
| 91 |
+
wire mreq_n, rfsh_n, busak_n;
|
| 92 |
+
assign cpu_cen = cen6;
|
| 93 |
+
assign bus_ack = ~busak_n;
|
| 94 |
+
|
| 95 |
+
reg [7:0] cpu_din;
|
| 96 |
+
wire iorq_n, m1_n;
|
| 97 |
+
wire irq_ack = !iorq_n && !m1_n;
|
| 98 |
+
|
| 99 |
+
// Memory map
|
| 100 |
+
always @(*) begin
|
| 101 |
+
rom_cs = 1'b0;
|
| 102 |
+
ram_cs = 1'b0;
|
| 103 |
+
char_cs = 1'b0;
|
| 104 |
+
scr_cs = 1'b0;
|
| 105 |
+
blue_cs = 1'b0;
|
| 106 |
+
redgreen_cs = 1'b0;
|
| 107 |
+
if( rfsh_n && !mreq_n ) casez(A[15:13])
|
| 108 |
+
3'b0??: rom_cs = 1'b1;
|
| 109 |
+
3'b10?: rom_cs = 1'b1; // banked ROM
|
| 110 |
+
3'b110: // CXXX, DXXX
|
| 111 |
+
casez(A[12:11])
|
| 112 |
+
2'b0?: // C0
|
| 113 |
+
scr_cs = 1'b1;
|
| 114 |
+
2'b10: // D0
|
| 115 |
+
char_cs = 1'b1; // D0CS
|
| 116 |
+
2'b11: // D8
|
| 117 |
+
if( A[10] )
|
| 118 |
+
blue_cs = 1'b1;
|
| 119 |
+
else
|
| 120 |
+
redgreen_cs = 1'b1;
|
| 121 |
+
default:;
|
| 122 |
+
endcase
|
| 123 |
+
3'b111: ram_cs = 1'b1; // EXXX, FXXX
|
| 124 |
+
endcase
|
| 125 |
+
end
|
| 126 |
+
|
| 127 |
+
// Port map
|
| 128 |
+
reg en_cs, scr_bank_cs, mcu_cs, video_cs, layout_cs;
|
| 129 |
+
|
| 130 |
+
always @(*) begin
|
| 131 |
+
snd_latch_cs = 1'b0;
|
| 132 |
+
bank_cs = 1'b0;
|
| 133 |
+
in_cs = 1'b0;
|
| 134 |
+
scrpos_cs = 1'b0;
|
| 135 |
+
en_cs = 1'b0;
|
| 136 |
+
OKOUT = 1'b0;
|
| 137 |
+
scr_bank_cs = 1'b0;
|
| 138 |
+
mcu_cs = 1'b0;
|
| 139 |
+
video_cs = 1'b0;
|
| 140 |
+
layout_cs = 1'b0;
|
| 141 |
+
if( rfsh_n && !iorq_n ) begin
|
| 142 |
+
in_cs = A[3:0] <= 4'd5 && RnW;
|
| 143 |
+
mcu_cs = A[3:0] == 4'd7;
|
| 144 |
+
if( !RnW ) casez(A[3:0])
|
| 145 |
+
4'd0: snd_latch_cs = 1'b1;
|
| 146 |
+
4'd1: bank_cs = 1'b1;
|
| 147 |
+
4'd4: video_cs = 1'b1;
|
| 148 |
+
4'd6: OKOUT = 1'b1;
|
| 149 |
+
4'd8, 4'd9, 4'd10, 4'd11: scrpos_cs = 1'b1;
|
| 150 |
+
4'd12: en_cs = 1'b1; // video enable
|
| 151 |
+
4'd13: scr_bank_cs = 1'b1; // BG bank
|
| 152 |
+
4'd14: layout_cs = 1'b1; // screen alyout
|
| 153 |
+
default:;
|
| 154 |
+
endcase
|
| 155 |
+
end
|
| 156 |
+
end
|
| 157 |
+
|
| 158 |
+
// SCROLL H/V POSITION
|
| 159 |
+
always @(posedge clk, negedge t80_rst_n) begin
|
| 160 |
+
if( !t80_rst_n ) begin
|
| 161 |
+
scr_hpos <= 11'd0;
|
| 162 |
+
scr_vpos <= 11'd0;
|
| 163 |
+
end else if(cpu_cen) begin
|
| 164 |
+
if( scrpos_cs )
|
| 165 |
+
case(A[1:0])
|
| 166 |
+
2'd0: scr_hpos[ 7:0] <= cpu_dout;
|
| 167 |
+
2'd1: scr_hpos[10:8] <= cpu_dout[2:0];
|
| 168 |
+
2'd2: scr_vpos[ 7:0] <= cpu_dout;
|
| 169 |
+
2'd3: scr_vpos[10:8] <= cpu_dout[2:0];
|
| 170 |
+
endcase
|
| 171 |
+
end
|
| 172 |
+
end
|
| 173 |
+
|
| 174 |
+
// special registers
|
| 175 |
+
reg [3:0] bank;
|
| 176 |
+
|
| 177 |
+
always @(posedge clk)
|
| 178 |
+
if( rst ) begin
|
| 179 |
+
flip <= 1'b0;
|
| 180 |
+
sres_b <= 1'b1;
|
| 181 |
+
bank <= 4'd0;
|
| 182 |
+
CHRON <= 1'b1;
|
| 183 |
+
SCRON <= 1'b1;
|
| 184 |
+
OBJON <= 1'b1;
|
| 185 |
+
scr_bank <= 2'b0;
|
| 186 |
+
mcu_wr <= 1'b0;
|
| 187 |
+
mcu_rd <= 0;
|
| 188 |
+
scr_layout<= 1'b0;
|
| 189 |
+
end
|
| 190 |
+
else if(cpu_cen) begin
|
| 191 |
+
mcu_wr <= 1'b0;
|
| 192 |
+
mcu_rd <= 0;
|
| 193 |
+
if( bank_cs ) bank <= cpu_dout[3:0];
|
| 194 |
+
if( mcu_cs ) begin
|
| 195 |
+
mcu_din <= cpu_dout;
|
| 196 |
+
mcu_wr <= !wr_n;
|
| 197 |
+
mcu_rd <= wr_n;
|
| 198 |
+
end
|
| 199 |
+
if( video_cs ) begin
|
| 200 |
+
// bits 0,1 coin counters
|
| 201 |
+
CHRON <= ~cpu_dout[7];
|
| 202 |
+
flip <= cpu_dout[6];
|
| 203 |
+
sres_b <= ~cpu_dout[5]; // inverted through NPN
|
| 204 |
+
end
|
| 205 |
+
if( en_cs ) begin
|
| 206 |
+
SCRON <= ~cpu_dout[1];
|
| 207 |
+
OBJON <= ~cpu_dout[2];
|
| 208 |
+
end
|
| 209 |
+
if( scr_bank_cs ) scr_bank <= cpu_dout[1:0];
|
| 210 |
+
if( snd_latch_cs ) snd_latch <= cpu_dout;
|
| 211 |
+
if( layout_cs ) scr_layout <= cpu_dout[0];
|
| 212 |
+
end
|
| 213 |
+
|
| 214 |
+
jt12_rst u_rst(
|
| 215 |
+
.rst ( rst ),
|
| 216 |
+
.clk ( clk ),
|
| 217 |
+
.rst_n ( t80_rst_n )
|
| 218 |
+
);
|
| 219 |
+
|
| 220 |
+
reg [7:0] cabinet_input;
|
| 221 |
+
|
| 222 |
+
always @(*)
|
| 223 |
+
case( A[2:0] )
|
| 224 |
+
3'd0: cabinet_input = { coin, // COINS IN0
|
| 225 |
+
service, // undocumented. D5 & D4 what are those?
|
| 226 |
+
1'b1, // tilt?
|
| 227 |
+
1'b1,
|
| 228 |
+
1'b1,
|
| 229 |
+
cab_1p }; // START
|
| 230 |
+
3'd1: cabinet_input = { 2'b11, joystick1 }; // IN1
|
| 231 |
+
3'd2: cabinet_input = { 2'b11, joystick2 }; // IN2
|
| 232 |
+
3'd3: cabinet_input = dipsw_b;
|
| 233 |
+
3'd4: cabinet_input = dipsw_a;
|
| 234 |
+
3'd5: cabinet_input = 8'hff; //dip_pause, LVBL?;
|
| 235 |
+
default: cabinet_input = 8'hff;
|
| 236 |
+
endcase
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
// RAM, 16kB
|
| 240 |
+
wire cpu_ram_we = ram_cs && !wr_n;
|
| 241 |
+
assign cpu_AB = A[12:0];
|
| 242 |
+
|
| 243 |
+
wire [12:0] RAM_addr = blcnten ? {4'b1111, obj_AB} : cpu_AB;
|
| 244 |
+
wire RAM_we = blcnten ? 1'b0 : cpu_ram_we;
|
| 245 |
+
|
| 246 |
+
jtframe_ram #(.AW(13),.CEN_RD(0)) RAM(
|
| 247 |
+
.clk ( clk ),
|
| 248 |
+
.cen ( cpu_cen ),
|
| 249 |
+
.addr ( RAM_addr ),
|
| 250 |
+
.data ( cpu_dout ),
|
| 251 |
+
.we ( RAM_we ),
|
| 252 |
+
.q ( ram_dout )
|
| 253 |
+
);
|
| 254 |
+
|
| 255 |
+
|
| 256 |
+
always @(*) begin
|
| 257 |
+
cpu_din = 8'hff;
|
| 258 |
+
case( 1'b1 )
|
| 259 |
+
// ram_cs : cpu_din = A==16'hf3a1 && ram_dout==8'd0 ? 8'd4 : ram_dout; // cheat to start on level 5
|
| 260 |
+
ram_cs : cpu_din = ram_dout;
|
| 261 |
+
char_cs: cpu_din = char_dout;
|
| 262 |
+
scr_cs : cpu_din = scr_dout;
|
| 263 |
+
rom_cs : cpu_din = rom_data;
|
| 264 |
+
in_cs : cpu_din = cabinet_input;
|
| 265 |
+
mcu_cs : cpu_din = mcu_dout;
|
| 266 |
+
default:;
|
| 267 |
+
endcase
|
| 268 |
+
end
|
| 269 |
+
|
| 270 |
+
always @(A,bank) begin
|
| 271 |
+
rom_addr[13:0] = A[13:0];
|
| 272 |
+
rom_addr[18:14] = A[15] ? { 1'b0, bank } : {3'h4, A[15:14] };
|
| 273 |
+
end
|
| 274 |
+
|
| 275 |
+
/////////////////////////////////////////////////////////////////
|
| 276 |
+
// wait_n generation
|
| 277 |
+
wire cpu_cenw;
|
| 278 |
+
|
| 279 |
+
jtframe_z80wait #(2) u_wait(
|
| 280 |
+
.rst_n ( t80_rst_n ),
|
| 281 |
+
.clk ( clk ),
|
| 282 |
+
.cen_in ( cpu_cen ),
|
| 283 |
+
.cen_out ( cpu_cenw ),
|
| 284 |
+
// manage access to shared memory
|
| 285 |
+
.dev_busy ( { scr_busy, char_busy } ),
|
| 286 |
+
// manage access to ROM data from SDRAM
|
| 287 |
+
.rom_cs ( rom_cs ),
|
| 288 |
+
.rom_ok ( rom_ok ),
|
| 289 |
+
// unused
|
| 290 |
+
.busak_n ( busak_n ),
|
| 291 |
+
.iorq_n ( iorq_n ),
|
| 292 |
+
.mreq_n ( mreq_n ),
|
| 293 |
+
.gate ( )
|
| 294 |
+
);
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
///////////////////////////////////////////////////////////////////
|
| 298 |
+
// interrupt generation.
|
| 299 |
+
reg int_n, int_rqb, int_rqb_last;
|
| 300 |
+
wire int_rqb_negedge = !int_rqb && int_rqb_last;
|
| 301 |
+
|
| 302 |
+
always @(posedge clk, posedge rst)
|
| 303 |
+
if(rst) begin
|
| 304 |
+
int_n <= 1'b1;
|
| 305 |
+
end else if(cpu_cen) begin
|
| 306 |
+
int_rqb_last <= int_rqb;
|
| 307 |
+
int_rqb <= LVBL;
|
| 308 |
+
if( irq_ack )
|
| 309 |
+
int_n <= 1'b1;
|
| 310 |
+
else
|
| 311 |
+
if ( int_rqb_negedge && dip_pause ) int_n <= 1'b0;
|
| 312 |
+
end
|
| 313 |
+
|
| 314 |
+
jtframe_z80 u_cpu(
|
| 315 |
+
.rst_n ( t80_rst_n ),
|
| 316 |
+
.clk ( clk ),
|
| 317 |
+
.cen ( cpu_cenw ),
|
| 318 |
+
.wait_n ( 1'b1 ),
|
| 319 |
+
.int_n ( int_n ),
|
| 320 |
+
.nmi_n ( 1'b1 ),
|
| 321 |
+
.busrq_n ( ~bus_req ),
|
| 322 |
+
.m1_n ( m1_n ),
|
| 323 |
+
.mreq_n ( mreq_n ),
|
| 324 |
+
.iorq_n ( iorq_n ),
|
| 325 |
+
.rd_n ( rd_n ),
|
| 326 |
+
.wr_n ( wr_n ),
|
| 327 |
+
.rfsh_n ( rfsh_n ),
|
| 328 |
+
.halt_n ( ),
|
| 329 |
+
.busak_n ( busak_n ),
|
| 330 |
+
.A ( A ),
|
| 331 |
+
.din ( cpu_din ),
|
| 332 |
+
.dout ( cpu_dout )
|
| 333 |
+
);
|
| 334 |
+
|
| 335 |
+
//`ifdef SIMULATION
|
| 336 |
+
//reg [15:0] Acode;
|
| 337 |
+
//always @(posedge rom_ok)
|
| 338 |
+
// Acode <= A;
|
| 339 |
+
// //if( rom_cs ) $display("%1X,%4X (%5X) -> %2X", bank, A, rom_addr, rom_data );
|
| 340 |
+
//`endif
|
| 341 |
+
|
| 342 |
+
endmodule // jtgng_main
|
snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_mcu.v
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 19-11-2019 */
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
// based on 1943 schematics
|
| 21 |
+
|
| 22 |
+
module jtbtiger_mcu(
|
| 23 |
+
input rst,
|
| 24 |
+
input clk, // 24 MHz
|
| 25 |
+
input clk_rom,
|
| 26 |
+
input LVBL,
|
| 27 |
+
// Main CPU interface
|
| 28 |
+
output [ 7:0] mcu_dout,
|
| 29 |
+
input [ 7:0] mcu_din,
|
| 30 |
+
input mcu_wr,
|
| 31 |
+
input mcu_rd,
|
| 32 |
+
// ROM programming
|
| 33 |
+
input [11:0] prog_addr,
|
| 34 |
+
input [ 7:0] prom_din,
|
| 35 |
+
input prom_we
|
| 36 |
+
);
|
| 37 |
+
|
| 38 |
+
wire [ 7:0] p1_o, p2_o, p3_o;
|
| 39 |
+
|
| 40 |
+
reg mcu_int1;
|
| 41 |
+
reg last_mcu_wr;
|
| 42 |
+
wire nc, cen;
|
| 43 |
+
|
| 44 |
+
jtframe_frac_cen u_cen(
|
| 45 |
+
.clk ( clk ),
|
| 46 |
+
.n ( 10'd1 ),
|
| 47 |
+
.m ( 10'd24 ),
|
| 48 |
+
.cen ( {nc, cen} ), // cen = 1MHz
|
| 49 |
+
.cenb ( )
|
| 50 |
+
);
|
| 51 |
+
|
| 52 |
+
// Port 3. All bits active low
|
| 53 |
+
// 4 output enable of from-CPU latch
|
| 54 |
+
// 5 clock pin of to-CPU latch
|
| 55 |
+
// 1 clear interrupt
|
| 56 |
+
// only bit 1 is needed in FPGA implementation
|
| 57 |
+
// Note that MAME clears the interrupt in a different way
|
| 58 |
+
// as it does it when the main CPU reads from the MCU
|
| 59 |
+
|
| 60 |
+
always @(posedge clk) begin
|
| 61 |
+
last_mcu_wr <= mcu_wr;
|
| 62 |
+
if( mcu_wr && !last_mcu_wr ) mcu_int1 <= 1'b0;
|
| 63 |
+
if( !p3_o[1] || mcu_rd ) mcu_int1 <= 1'b1;
|
| 64 |
+
end
|
| 65 |
+
|
| 66 |
+
jtframe_8751mcu u_mcu(
|
| 67 |
+
.rst ( rst ),
|
| 68 |
+
.clk ( clk ),
|
| 69 |
+
.cen ( cen ),
|
| 70 |
+
|
| 71 |
+
.int0n ( 1'b1 ),
|
| 72 |
+
.int1n ( mcu_int1 ),
|
| 73 |
+
|
| 74 |
+
.p0_i ( mcu_din ),
|
| 75 |
+
.p0_o ( mcu_dout ),
|
| 76 |
+
|
| 77 |
+
.p1_i ( 8'd0 ),
|
| 78 |
+
.p1_o ( p1_o ),
|
| 79 |
+
|
| 80 |
+
.p2_i ( p2_o ),
|
| 81 |
+
.p2_o ( p2_o ),
|
| 82 |
+
|
| 83 |
+
.p3_i ( {p3_o[7:5], LVBL, p3_o[3:0] } ),
|
| 84 |
+
.p3_o ( p3_o ),
|
| 85 |
+
|
| 86 |
+
// external memory
|
| 87 |
+
.x_din ( ),
|
| 88 |
+
.x_dout ( ),
|
| 89 |
+
.x_addr ( ),
|
| 90 |
+
.x_wr ( ),
|
| 91 |
+
.x_acc ( ),
|
| 92 |
+
|
| 93 |
+
// ROM programming
|
| 94 |
+
.clk_rom ( clk_rom ),
|
| 95 |
+
.prog_addr ( prog_addr ),
|
| 96 |
+
.prom_din ( prom_din ),
|
| 97 |
+
.prom_we ( prom_we )
|
| 98 |
+
);
|
| 99 |
+
|
| 100 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_scroll.v
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 19-11-2017 */
|
| 18 |
+
|
| 19 |
+
module jtbtiger_scroll #(parameter
|
| 20 |
+
HOFFSET = 9'd0
|
| 21 |
+
) (
|
| 22 |
+
input clk,
|
| 23 |
+
input pxl_cen,
|
| 24 |
+
input cpu_cen,
|
| 25 |
+
input scr_en,
|
| 26 |
+
input [11:0] AB,
|
| 27 |
+
input [7:0] V, // V128-V1
|
| 28 |
+
input [8:0] H, // H256-H1
|
| 29 |
+
input Hinit,
|
| 30 |
+
input [10:0] hpos,
|
| 31 |
+
input [10:0] vpos,
|
| 32 |
+
input scr_cs,
|
| 33 |
+
input layout,
|
| 34 |
+
input [1:0] bank,
|
| 35 |
+
input flip,
|
| 36 |
+
input [7:0] din,
|
| 37 |
+
output [7:0] dout,
|
| 38 |
+
input wr_n,
|
| 39 |
+
output busy,
|
| 40 |
+
|
| 41 |
+
// ROM
|
| 42 |
+
output [16:0] scr_addr,
|
| 43 |
+
input [15:0] rom_data,
|
| 44 |
+
input rom_ok,
|
| 45 |
+
output [7:0] scr_pxl
|
| 46 |
+
);
|
| 47 |
+
|
| 48 |
+
localparam POSW = 11; // Scroll offset width
|
| 49 |
+
|
| 50 |
+
wire [8:0] Hfix = H + HOFFSET[8:0]; // Corrects pixel output offset
|
| 51 |
+
reg [POSW-1:0] HS, VS;
|
| 52 |
+
wire [ 7:0] VF = {8{flip}}^V;
|
| 53 |
+
wire [ 7:0] HF = {8{flip}}^Hfix[7:0];
|
| 54 |
+
|
| 55 |
+
wire H7 = (~Hfix[8] & (~flip ^ HF[6])) ^HF[7];
|
| 56 |
+
|
| 57 |
+
reg [2:0] HSaux;
|
| 58 |
+
reg layout2;
|
| 59 |
+
|
| 60 |
+
wire [7:0] dout_low, dout_high;
|
| 61 |
+
|
| 62 |
+
localparam DATAREAD = 3'd1;
|
| 63 |
+
|
| 64 |
+
wire [POSW-2:0] Vtilemap = VS[POSW-1:1];
|
| 65 |
+
wire [POSW-2:0] Htilemap = HS[POSW-1:1];
|
| 66 |
+
|
| 67 |
+
wire [12:0] tile_addr = { bank, AB[11:1] };
|
| 68 |
+
|
| 69 |
+
assign busy = (HS[2:0]<2) && scr_cs;
|
| 70 |
+
|
| 71 |
+
always @(posedge clk) if(pxl_cen) begin
|
| 72 |
+
VS = vpos + { {POSW-8{1'b0}}, VF};
|
| 73 |
+
{ HS[POSW-1:3], HSaux } = hpos + { {POSW-8{~Hfix[8]}}, H7, HF[6:0]};
|
| 74 |
+
HS[2:0] = HSaux ^ {3{flip}};
|
| 75 |
+
|
| 76 |
+
if( Hinit ) layout2 <= layout; // latching layout changes prevent
|
| 77 |
+
// wrong lines at the top of the screen
|
| 78 |
+
// I wonder if the original PCB was gating writes to this register
|
| 79 |
+
// instead of latching at the beginning of the line
|
| 80 |
+
end
|
| 81 |
+
|
| 82 |
+
jtgng_tilemap #(
|
| 83 |
+
.INVERT_SCAN( 1 ),
|
| 84 |
+
.DATAREAD ( DATAREAD ),
|
| 85 |
+
.SCANW ( 13 ),
|
| 86 |
+
.VW ( POSW-1 ),
|
| 87 |
+
.HW ( POSW-1 ),
|
| 88 |
+
.SIMID ( 1 )
|
| 89 |
+
) u_tilemap(
|
| 90 |
+
.clk ( clk ),
|
| 91 |
+
.pxl_cen ( pxl_cen ),
|
| 92 |
+
.Asel ( AB[0] ),
|
| 93 |
+
.AB ( tile_addr ),
|
| 94 |
+
.V ( Vtilemap ),
|
| 95 |
+
.H ( Htilemap ),
|
| 96 |
+
.flip ( 1'b0 ), // Flip is already done on HS and VS
|
| 97 |
+
.din ( din ),
|
| 98 |
+
.dout ( dout ),
|
| 99 |
+
.layout ( layout2 ),
|
| 100 |
+
// Bus arbitrion
|
| 101 |
+
.cs ( scr_cs ),
|
| 102 |
+
.wr_n ( wr_n ),
|
| 103 |
+
// Current tile
|
| 104 |
+
.dout_low ( dout_low ),
|
| 105 |
+
.dout_high ( dout_high ),
|
| 106 |
+
// unused:
|
| 107 |
+
.dseln ( )
|
| 108 |
+
);
|
| 109 |
+
|
| 110 |
+
jtgng_tile4 #(
|
| 111 |
+
.PALETTE( 0 ),
|
| 112 |
+
.ROM_AW ( 17 ),
|
| 113 |
+
.LAYOUT ( 4 ))
|
| 114 |
+
u_tile4 (
|
| 115 |
+
.clk ( clk ),
|
| 116 |
+
.cen6 ( pxl_cen ),
|
| 117 |
+
.HS ( HS[4:0] ),
|
| 118 |
+
.SV ( VS[4:0] ),
|
| 119 |
+
.attr ( dout_high ),
|
| 120 |
+
.id ( dout_low ),
|
| 121 |
+
.SCxON ( scr_en ),
|
| 122 |
+
.flip ( flip ),
|
| 123 |
+
// Palette PROMs
|
| 124 |
+
.prog_addr ( 8'd0 ),
|
| 125 |
+
.prom_hi_we ( 1'b0 ),
|
| 126 |
+
.prom_lo_we ( 1'b0 ),
|
| 127 |
+
.prom_din ( 4'd0 ),
|
| 128 |
+
// Gfx ROM
|
| 129 |
+
.scr_addr ( scr_addr ),
|
| 130 |
+
.rom_data ( rom_data ),
|
| 131 |
+
.scr_pxl ( scr_pxl )
|
| 132 |
+
);
|
| 133 |
+
|
| 134 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/btiger/hdl/jtbtiger_video.v
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* This file is part of JTCORES.
|
| 2 |
+
JTCORES program is free software: you can redistribute it and/or modify
|
| 3 |
+
it under the terms of the GNU General Public License as published by
|
| 4 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 5 |
+
(at your option) any later version.
|
| 6 |
+
|
| 7 |
+
JTCORES program is distributed in the hope that it will be useful,
|
| 8 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 9 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 10 |
+
GNU General Public License for more details.
|
| 11 |
+
|
| 12 |
+
You should have received a copy of the GNU General Public License
|
| 13 |
+
along with JTCORES. If not, see <http://www.gnu.org/licenses/>.
|
| 14 |
+
|
| 15 |
+
Author: Jose Tejada Gomez. Twitter: @topapate
|
| 16 |
+
Version: 1.0
|
| 17 |
+
Date: 19-11-2018 */
|
| 18 |
+
|
| 19 |
+
module jtbtiger_video(
|
| 20 |
+
input rst,
|
| 21 |
+
input clk,
|
| 22 |
+
input cen12,
|
| 23 |
+
input cen8,
|
| 24 |
+
input cen6,
|
| 25 |
+
input cen3,
|
| 26 |
+
input cpu_cen,
|
| 27 |
+
input [11:0] cpu_AB,
|
| 28 |
+
input [ 7:0] V,
|
| 29 |
+
input [ 8:0] H,
|
| 30 |
+
input RnW,
|
| 31 |
+
input flip,
|
| 32 |
+
input [ 7:0] cpu_dout,
|
| 33 |
+
input pause,
|
| 34 |
+
// CHAR
|
| 35 |
+
input char_cs,
|
| 36 |
+
output [ 7:0] char_dout,
|
| 37 |
+
input char_ok,
|
| 38 |
+
output char_busy,
|
| 39 |
+
output [13:0] char_addr,
|
| 40 |
+
input [15:0] char_data,
|
| 41 |
+
input CHRON,
|
| 42 |
+
// SCROLL - ROM
|
| 43 |
+
input scr_cs,
|
| 44 |
+
output [ 7:0] scr_dout,
|
| 45 |
+
output [16:0] scr_addr,
|
| 46 |
+
input [15:0] scr_data,
|
| 47 |
+
input scr_ok,
|
| 48 |
+
output scr_busy,
|
| 49 |
+
input [10:0] scr_hpos,
|
| 50 |
+
input [10:0] scr_vpos,
|
| 51 |
+
input [ 1:0] scr_bank,
|
| 52 |
+
input scr_layout,
|
| 53 |
+
input SCRON,
|
| 54 |
+
// OBJ
|
| 55 |
+
input HINIT,
|
| 56 |
+
output [ 8:0] obj_AB,
|
| 57 |
+
input [ 7:0] main_ram,
|
| 58 |
+
input OKOUT,
|
| 59 |
+
output bus_req, // Request bus
|
| 60 |
+
input bus_ack, // bus acknowledge
|
| 61 |
+
output blcnten, // bus line counter enable
|
| 62 |
+
output [16:0] obj_addr,
|
| 63 |
+
input [15:0] obj_data,
|
| 64 |
+
input obj_ok,
|
| 65 |
+
input OBJON,
|
| 66 |
+
// Color Mix
|
| 67 |
+
input preLHBL,
|
| 68 |
+
input preLVBL,
|
| 69 |
+
input LVBL_obj,
|
| 70 |
+
input LHBL_obj,
|
| 71 |
+
output LHBL,
|
| 72 |
+
output LVBL,
|
| 73 |
+
// Palette PROMs
|
| 74 |
+
input [7:0] prog_addr,
|
| 75 |
+
input prom_prior_we,
|
| 76 |
+
input [3:0] prom_din,
|
| 77 |
+
// Palette RAM
|
| 78 |
+
input blue_cs,
|
| 79 |
+
input redgreen_cs,
|
| 80 |
+
input [3:0] gfx_en,
|
| 81 |
+
// Pixel output
|
| 82 |
+
output [3:0] red,
|
| 83 |
+
output [3:0] green,
|
| 84 |
+
output [3:0] blue
|
| 85 |
+
);
|
| 86 |
+
|
| 87 |
+
localparam OBJMAX = 10'h200, // DMA buffer 512 bytes = 4*128
|
| 88 |
+
OBJMAX_LINE = 6'd32;
|
| 89 |
+
|
| 90 |
+
wire [6:0] char_pxl;
|
| 91 |
+
wire [6:0] obj_pxl;
|
| 92 |
+
wire [7:0] scr_pxl;
|
| 93 |
+
wire [3:0] cc;
|
| 94 |
+
wire char_en = CHRON & gfx_en[0],
|
| 95 |
+
scr_en = SCRON & gfx_en[1],
|
| 96 |
+
obj_en = SCRON & gfx_en[3];
|
| 97 |
+
|
| 98 |
+
jtgng_char #(
|
| 99 |
+
.HOFFSET ( 0),
|
| 100 |
+
.ROM_AW (14),
|
| 101 |
+
.PALW ( 5),
|
| 102 |
+
.VFLIP_EN( 0),
|
| 103 |
+
.HFLIP_EN( 0),
|
| 104 |
+
.IDMSB0 ( 5)
|
| 105 |
+
) u_char (
|
| 106 |
+
.clk ( clk ),
|
| 107 |
+
.pxl_cen ( cen6 ),
|
| 108 |
+
.AB ( cpu_AB[10:0] ),
|
| 109 |
+
.V ( V ),
|
| 110 |
+
.H ( H[7:0] ),
|
| 111 |
+
.flip ( flip ),
|
| 112 |
+
.din ( cpu_dout ),
|
| 113 |
+
.dout ( char_dout ),
|
| 114 |
+
// Bus arbitrion
|
| 115 |
+
.char_cs ( char_cs ),
|
| 116 |
+
.wr_n ( RnW ),
|
| 117 |
+
.busy ( char_busy ),
|
| 118 |
+
// ROM
|
| 119 |
+
.char_addr ( char_addr ),
|
| 120 |
+
.rom_data ( char_data ),
|
| 121 |
+
.rom_ok ( char_ok ),
|
| 122 |
+
// Pixel output
|
| 123 |
+
.char_on ( char_en ),
|
| 124 |
+
.char_pxl ( char_pxl ),
|
| 125 |
+
// unused
|
| 126 |
+
.dseln ( ),
|
| 127 |
+
.prog_addr ( ),
|
| 128 |
+
.prog_din ( ),
|
| 129 |
+
.prom_we ( )
|
| 130 |
+
);
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
`ifndef NOSCR
|
| 134 |
+
wire [7:0] scr_pre;
|
| 135 |
+
|
| 136 |
+
jtframe_sh #(.W(8),.L(5)) u_hb_dly(
|
| 137 |
+
.clk ( clk ),
|
| 138 |
+
.clk_en ( cen6 ),
|
| 139 |
+
.din ( scr_pre ),
|
| 140 |
+
.drop ( scr_pxl )
|
| 141 |
+
);
|
| 142 |
+
|
| 143 |
+
jtbtiger_scroll #(.HOFFSET(0)) u_scroll (
|
| 144 |
+
.clk ( clk ),
|
| 145 |
+
.pxl_cen ( cen6 ),
|
| 146 |
+
.cpu_cen ( cpu_cen ),
|
| 147 |
+
.scr_en ( scr_en ),
|
| 148 |
+
// screen position
|
| 149 |
+
.H ( H ),
|
| 150 |
+
.V ( V[7:0] ),
|
| 151 |
+
.Hinit ( HINIT ),
|
| 152 |
+
.hpos ( scr_hpos ),
|
| 153 |
+
.vpos ( scr_vpos ),
|
| 154 |
+
.flip ( flip ),
|
| 155 |
+
.layout ( scr_layout ),
|
| 156 |
+
.bank ( scr_bank ),
|
| 157 |
+
// bus arbitrion
|
| 158 |
+
.AB ( cpu_AB[11:0] ),
|
| 159 |
+
.scr_cs ( scr_cs ),
|
| 160 |
+
.din ( cpu_dout ),
|
| 161 |
+
.dout ( scr_dout ),
|
| 162 |
+
.wr_n ( RnW ),
|
| 163 |
+
.busy ( scr_busy ),
|
| 164 |
+
// ROM
|
| 165 |
+
.scr_addr ( scr_addr ),
|
| 166 |
+
.rom_data ( scr_data ),
|
| 167 |
+
.rom_ok ( scr_ok ),
|
| 168 |
+
// pixel output
|
| 169 |
+
.scr_pxl ( scr_pre )
|
| 170 |
+
);
|
| 171 |
+
`else
|
| 172 |
+
assign scr_busy = 1'b0;
|
| 173 |
+
assign scr_pxl = 8'hff;
|
| 174 |
+
assign scr_addr = 17'd0;
|
| 175 |
+
assign scr_dout = 8'd0;
|
| 176 |
+
`endif
|
| 177 |
+
|
| 178 |
+
`ifndef NOOBJ
|
| 179 |
+
jtgng_obj #(
|
| 180 |
+
.OBJMAX ( OBJMAX ),
|
| 181 |
+
.OBJMAX_LINE ( OBJMAX_LINE ),
|
| 182 |
+
.ROM_AW ( 17 ),
|
| 183 |
+
.PALW ( 3 ),
|
| 184 |
+
.PXL_DLY ( 8 ),
|
| 185 |
+
.LAYOUT ( 4 ))
|
| 186 |
+
u_obj (
|
| 187 |
+
.rst ( rst ),
|
| 188 |
+
.clk ( clk ),
|
| 189 |
+
.draw_cen ( cen12 ),
|
| 190 |
+
.dma_cen ( cen8 ),
|
| 191 |
+
.pxl_cen ( cen6 ),
|
| 192 |
+
.AB ( obj_AB ),
|
| 193 |
+
.DB ( main_ram ),
|
| 194 |
+
.OKOUT ( OKOUT ),
|
| 195 |
+
.bus_req ( bus_req ),
|
| 196 |
+
.bus_ack ( bus_ack ),
|
| 197 |
+
.blen ( blcnten ),
|
| 198 |
+
.LHBL ( LHBL_obj ),
|
| 199 |
+
.LVBL ( LVBL ),
|
| 200 |
+
.LVBL_obj ( LVBL_obj ),
|
| 201 |
+
.HINIT ( HINIT ),
|
| 202 |
+
.flip ( flip ),
|
| 203 |
+
.alt ( 1'b0 ),
|
| 204 |
+
.V ( V[7:0] ),
|
| 205 |
+
.H ( H ),
|
| 206 |
+
// SDRAM interface
|
| 207 |
+
.obj_addr ( obj_addr ),
|
| 208 |
+
.obj_data ( obj_data ),
|
| 209 |
+
.rom_ok ( obj_ok ),
|
| 210 |
+
// pixel data
|
| 211 |
+
.obj_pxl ( obj_pxl ),
|
| 212 |
+
// unused
|
| 213 |
+
.prog_addr ( ),
|
| 214 |
+
.prog_din ( ),
|
| 215 |
+
.prom_hi_we ( 1'b0 ),
|
| 216 |
+
.prom_lo_we ( 1'b0 ),
|
| 217 |
+
.OBJON ( obj_en )
|
| 218 |
+
);
|
| 219 |
+
`else
|
| 220 |
+
assign blcnten = 1'b0;
|
| 221 |
+
assign bus_req = 1'b0;
|
| 222 |
+
assign obj_pxl = ~6'd0;
|
| 223 |
+
`endif
|
| 224 |
+
|
| 225 |
+
`ifndef NOCOLMIX
|
| 226 |
+
jtbtiger_colmix u_colmix (
|
| 227 |
+
.rst ( rst ),
|
| 228 |
+
.clk ( clk ),
|
| 229 |
+
.cen12 ( cen12 ),
|
| 230 |
+
.cen6 ( cen6 ),
|
| 231 |
+
|
| 232 |
+
.char_pxl ( char_pxl ),
|
| 233 |
+
.scr_pxl ( scr_pxl ),
|
| 234 |
+
.obj_pxl ( obj_pxl ),
|
| 235 |
+
.preLHBL ( preLHBL ),
|
| 236 |
+
.preLVBL ( preLVBL ),
|
| 237 |
+
.LVBL ( LVBL ),
|
| 238 |
+
.LHBL ( LHBL ),
|
| 239 |
+
|
| 240 |
+
// Priority PROM
|
| 241 |
+
.prog_addr ( prog_addr ),
|
| 242 |
+
.prom_prior_we( prom_prior_we ),
|
| 243 |
+
.prom_din ( prom_din ),
|
| 244 |
+
|
| 245 |
+
// CPU interface
|
| 246 |
+
.AB ( cpu_AB[9:0] ),
|
| 247 |
+
.blue_cs ( blue_cs ),
|
| 248 |
+
.redgreen_cs ( redgreen_cs ),
|
| 249 |
+
.DB ( cpu_dout ),
|
| 250 |
+
|
| 251 |
+
// colour output
|
| 252 |
+
.red ( red ),
|
| 253 |
+
.green ( green ),
|
| 254 |
+
.blue ( blue )
|
| 255 |
+
);
|
| 256 |
+
`else
|
| 257 |
+
assign red = 4'd0;
|
| 258 |
+
assign blue = 4'd0;
|
| 259 |
+
assign green= 4'd0;
|
| 260 |
+
`endif
|
| 261 |
+
|
| 262 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/game/pal.cc
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <iostream>
|
| 2 |
+
#include <fstream>
|
| 3 |
+
|
| 4 |
+
using namespace std;
|
| 5 |
+
|
| 6 |
+
int main() {
|
| 7 |
+
ofstream ob("b_ram.bin", ios_base::binary);
|
| 8 |
+
ofstream org("rg_ram.bin", ios_base::binary);
|
| 9 |
+
for( int k=0; k<256; k++ ) {
|
| 10 |
+
char buf[4] = { 0xff, 0x88, 0x44, 0 };
|
| 11 |
+
ob.write(buf, 4 );
|
| 12 |
+
org.write(buf, 4 );
|
| 13 |
+
}
|
| 14 |
+
return 0;
|
| 15 |
+
}
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/game/scr.sh
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
go.sh -d NOMAIN -d NOSOUND -d NOMCU -d NOCHAR \
|
| 5 |
+
-d JTCHAR_LOWER_SIMFILE=',.simfile("scr0.bin")' \
|
| 6 |
+
-d JTCHAR_UPPER_SIMFILE=',.simfile("scr1.bin")' \
|
| 7 |
+
-video 2 -w
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/game/sim.sh
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
jtsim $*
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/prom_we/go.sh
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
ROM=$JTGNG/rom/JTBTIGER.rom
|
| 4 |
+
GAME_ROM_LEN=$(stat -c%s $ROM)
|
| 5 |
+
|
| 6 |
+
if which ncverilog > /dev/null; then
|
| 7 |
+
ncverilog test.v ../../hdl/jtbtiger_prom_we.v \
|
| 8 |
+
+access+r \
|
| 9 |
+
+define+ROM_LEN=$GAME_ROM_LEN +define+PROM_W=1 +define+SIMULATION \
|
| 10 |
+
+define+ROM_PATH=\""$ROM"\"
|
| 11 |
+
else
|
| 12 |
+
iverilog test.v ../../hdl/jtbtiger_prom_we.v \
|
| 13 |
+
-D ROM_LEN=$GAME_ROM_LEN -D PROM_W=1 -D SIMULATION \
|
| 14 |
+
-D ROM_PATH=\""$ROM"\" \
|
| 15 |
+
-o sim \
|
| 16 |
+
&& sim -lxt
|
| 17 |
+
fi
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/prom_we/test.v
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
`timescale 1ns/1ps
|
| 2 |
+
|
| 3 |
+
module test;
|
| 4 |
+
|
| 5 |
+
localparam MAIN0_ADDR = 22'h00000;
|
| 6 |
+
localparam MAIN1_ADDR = 22'h20000;
|
| 7 |
+
localparam SND_ADDR = 22'h40000;
|
| 8 |
+
localparam SND2_ADDR = 22'h48000;
|
| 9 |
+
localparam CHAR_ADDR = 22'h58000;
|
| 10 |
+
localparam MAP_ADDR = 22'h60000;
|
| 11 |
+
// Scroll
|
| 12 |
+
localparam SCRZW_ADDR = 22'h70000;
|
| 13 |
+
localparam SCRXY_ADDR = 22'hF0000;
|
| 14 |
+
// even words
|
| 15 |
+
localparam OBJWZ_ADDR0 = 22'h170000;
|
| 16 |
+
localparam OBJXY_ADDR0 = 22'h190000;
|
| 17 |
+
// odd words
|
| 18 |
+
localparam OBJWZ_ADDR1 = 22'h1B0000;
|
| 19 |
+
localparam OBJXY_ADDR1 = 22'h1D0000;
|
| 20 |
+
// FPGA BRAM:
|
| 21 |
+
localparam PROM_ADDR = 22'h1F0000;
|
| 22 |
+
// ROM length 1F0100
|
| 23 |
+
|
| 24 |
+
reg rst;
|
| 25 |
+
reg clk, downloading=1'b1;
|
| 26 |
+
reg [21:0] ioctl_addr= 22'd0;
|
| 27 |
+
reg [ 7:0] ioctl_dout= 8'd0;
|
| 28 |
+
reg ioctl_wr;
|
| 29 |
+
|
| 30 |
+
wire [21:0] prog_addr;
|
| 31 |
+
wire [ 7:0] prog_data;
|
| 32 |
+
wire [ 1:0] prog_mask;
|
| 33 |
+
wire prog_we, jap;
|
| 34 |
+
wire [`PROM_W-1:0] prom_we;
|
| 35 |
+
|
| 36 |
+
jtbtiger_prom_we
|
| 37 |
+
u_uut(
|
| 38 |
+
.clk ( clk ),
|
| 39 |
+
.downloading ( downloading ),
|
| 40 |
+
.ioctl_addr ( ioctl_addr ),
|
| 41 |
+
.ioctl_dout ( ioctl_dout ),
|
| 42 |
+
.ioctl_wr ( ioctl_wr ),
|
| 43 |
+
.prog_addr ( prog_addr ),
|
| 44 |
+
.prog_data ( prog_data ),
|
| 45 |
+
.prog_mask ( prog_mask ),
|
| 46 |
+
.prog_we ( prog_we ),
|
| 47 |
+
.prom_we ( prom_we )
|
| 48 |
+
);
|
| 49 |
+
|
| 50 |
+
wire [21:0] obj_addr;
|
| 51 |
+
wire [ 7:0] obj_data;
|
| 52 |
+
wire [ 4:0] obj_mask;
|
| 53 |
+
wire obj_we;
|
| 54 |
+
|
| 55 |
+
wire [15:0] sdram_dout = 16'habcd;
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
initial begin
|
| 59 |
+
clk = 1'b0;
|
| 60 |
+
forever #10 clk = ~clk;
|
| 61 |
+
end
|
| 62 |
+
|
| 63 |
+
initial begin
|
| 64 |
+
rst = 1'b0;
|
| 65 |
+
#7 rst = 1'b1;
|
| 66 |
+
#7 rst = 1'b0;
|
| 67 |
+
end
|
| 68 |
+
|
| 69 |
+
reg [1:0] cnt=2'b0;
|
| 70 |
+
reg [7:0] romfile[0:`ROM_LEN-1];
|
| 71 |
+
integer f;
|
| 72 |
+
|
| 73 |
+
initial begin
|
| 74 |
+
f=$fopen(`ROM_PATH,"rb");
|
| 75 |
+
if( f==0 ) begin
|
| 76 |
+
$display("ERROR: cannot open file %s",`ROM_PATH);
|
| 77 |
+
$finish;
|
| 78 |
+
end
|
| 79 |
+
cnt=$fread(romfile,f);
|
| 80 |
+
$display("INFO: %s ROM lentgh 0x%h",`ROM_PATH,cnt);
|
| 81 |
+
$fclose(f);
|
| 82 |
+
end
|
| 83 |
+
|
| 84 |
+
reg [15:0] sdram[0:2**22-1];
|
| 85 |
+
integer cnt2;
|
| 86 |
+
reg tx_done = 1'b0;
|
| 87 |
+
|
| 88 |
+
always @(posedge clk) begin
|
| 89 |
+
cnt <= cnt+2'd1;
|
| 90 |
+
ioctl_wr <= 1'b0;
|
| 91 |
+
if( ioctl_addr < `ROM_LEN && cnt==2'b10 ) begin
|
| 92 |
+
ioctl_dout <= romfile[ioctl_addr];
|
| 93 |
+
ioctl_wr <= 1'b1;
|
| 94 |
+
end else if(cnt==2'b11) begin
|
| 95 |
+
ioctl_addr <= ioctl_addr + 22'd1;
|
| 96 |
+
end else if( ioctl_addr >= `ROM_LEN && !tx_done) begin
|
| 97 |
+
downloading <= 1'b0;
|
| 98 |
+
f=$fopen("sdram.hex");
|
| 99 |
+
for( cnt2=0; cnt2<(2**22-1); cnt2=cnt2+1) begin
|
| 100 |
+
$fdisplay(f,"%04X",sdram[cnt2]);
|
| 101 |
+
end
|
| 102 |
+
$fclose(f);
|
| 103 |
+
$display("INFO: SDRAM download done");
|
| 104 |
+
tx_done <= 1'b1;
|
| 105 |
+
$finish;
|
| 106 |
+
end
|
| 107 |
+
end
|
| 108 |
+
|
| 109 |
+
always @(negedge prog_we) begin
|
| 110 |
+
if(!prog_mask[1]) sdram[ prog_addr ][15:8] <= prog_data;
|
| 111 |
+
if(!prog_mask[0]) sdram[ prog_addr ][ 7:0] <= prog_data;
|
| 112 |
+
end
|
| 113 |
+
|
| 114 |
+
initial begin
|
| 115 |
+
$dumpfile("test.lxt");
|
| 116 |
+
$dumpvars(0,test);
|
| 117 |
+
$dumpon;
|
| 118 |
+
end
|
| 119 |
+
|
| 120 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/regrun/blkdrgon.sha
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
9f019b19097ac870a736ef132c0c2c37cd63943a frame_0.jpg
|
| 2 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_1.jpg
|
| 3 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_164.jpg
|
| 4 |
+
69b5ef6698d4148126db6ad76d1d0d6ed9e98014 frame_166.jpg
|
| 5 |
+
ebcd625c1f170b55ae3ba1424efd7e6b046bdd0b frame_167.jpg
|
| 6 |
+
047c00e9edda1fb8ca958e121b53faace4d170dd frame_168.jpg
|
| 7 |
+
6d43c16a3e1ed1ba750b4875189d159f6751fd57 frame_169.jpg
|
| 8 |
+
3e0a9c587fc1b7261fd5c63dbaeff6da0aaa3e79 frame_170.jpg
|
| 9 |
+
8465cc36d9f3b85c450a94f8f730d970b5402e24 frame_23.jpg
|
| 10 |
+
815ab854cc77dc0689cd8e934d4e7fc698e4026a frame_27.jpg
|
| 11 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_38.jpg
|
| 12 |
+
3aa6ca29a5b6d8fc223137c98a466dc6dfa9c12c frame_44.jpg
|
| 13 |
+
34ad9093c50b7e3486bdc05f241da3ce8dfde768 frame_590.jpg
|
| 14 |
+
d300105078103636455f3e7a785074137f08e285 frame_591.jpg
|
| 15 |
+
34ad9093c50b7e3486bdc05f241da3ce8dfde768 frame_633.jpg
|
| 16 |
+
d300105078103636455f3e7a785074137f08e285 frame_663.jpg
|
| 17 |
+
34ad9093c50b7e3486bdc05f241da3ce8dfde768 frame_705.jpg
|
| 18 |
+
d300105078103636455f3e7a785074137f08e285 frame_735.jpg
|
| 19 |
+
34ad9093c50b7e3486bdc05f241da3ce8dfde768 frame_777.jpg
|
| 20 |
+
d300105078103636455f3e7a785074137f08e285 frame_807.jpg
|
| 21 |
+
34ad9093c50b7e3486bdc05f241da3ce8dfde768 frame_849.jpg
|
| 22 |
+
d300105078103636455f3e7a785074137f08e285 frame_879.jpg
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/regrun/blktiger.sha
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
9f019b19097ac870a736ef132c0c2c37cd63943a frame_0.jpg
|
| 2 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_1.jpg
|
| 3 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_164.jpg
|
| 4 |
+
c978fd4e8cae6f6952dfbfc8122b71eebe56f7a9 frame_166.jpg
|
| 5 |
+
7434a6751d4e8d109624b40fe499f4698630e289 frame_167.jpg
|
| 6 |
+
88c593db67c3c9f0c685de8b1eb4878aede62ad8 frame_168.jpg
|
| 7 |
+
7946c3c1625f6b689b80600b839be1512cfe1717 frame_169.jpg
|
| 8 |
+
fe721faa352d29376bb5200dd7c7bae2242e5237 frame_170.jpg
|
| 9 |
+
8465cc36d9f3b85c450a94f8f730d970b5402e24 frame_23.jpg
|
| 10 |
+
815ab854cc77dc0689cd8e934d4e7fc698e4026a frame_27.jpg
|
| 11 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_38.jpg
|
| 12 |
+
faf3bdaeb172922342f4df56d5659703d291a344 frame_44.jpg
|
| 13 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_590.jpg
|
| 14 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_591.jpg
|
| 15 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_633.jpg
|
| 16 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_663.jpg
|
| 17 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_705.jpg
|
| 18 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_735.jpg
|
| 19 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_777.jpg
|
| 20 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_807.jpg
|
| 21 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_849.jpg
|
| 22 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_879.jpg
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/regrun/blktigera.sha
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
9f019b19097ac870a736ef132c0c2c37cd63943a frame_0.jpg
|
| 2 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_1.jpg
|
| 3 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_164.jpg
|
| 4 |
+
c978fd4e8cae6f6952dfbfc8122b71eebe56f7a9 frame_166.jpg
|
| 5 |
+
7434a6751d4e8d109624b40fe499f4698630e289 frame_167.jpg
|
| 6 |
+
88c593db67c3c9f0c685de8b1eb4878aede62ad8 frame_168.jpg
|
| 7 |
+
7946c3c1625f6b689b80600b839be1512cfe1717 frame_169.jpg
|
| 8 |
+
fe721faa352d29376bb5200dd7c7bae2242e5237 frame_170.jpg
|
| 9 |
+
8465cc36d9f3b85c450a94f8f730d970b5402e24 frame_23.jpg
|
| 10 |
+
815ab854cc77dc0689cd8e934d4e7fc698e4026a frame_27.jpg
|
| 11 |
+
4c2cffe705b3e6f3e26cb4e36c62b3b52fbe9972 frame_38.jpg
|
| 12 |
+
faf3bdaeb172922342f4df56d5659703d291a344 frame_44.jpg
|
| 13 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_590.jpg
|
| 14 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_591.jpg
|
| 15 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_633.jpg
|
| 16 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_663.jpg
|
| 17 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_705.jpg
|
| 18 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_735.jpg
|
| 19 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_777.jpg
|
| 20 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_807.jpg
|
| 21 |
+
1fa2e7c33afa8ddfcce6e7546731e00ea2b8425e frame_849.jpg
|
| 22 |
+
d5fefc1e5d3a8bbc26c8d5d1e58aaa47957cbb90 frame_879.jpg
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/scroll/go.sh
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
iverilog test.v ../../hdl/jtbtiger_scroll.v \
|
| 4 |
+
$JTGNG/modules/jtgng_{cen,timer,tilemap,tile4}.v \
|
| 5 |
+
$JTGNG/modules/jtframe/hdl/ram/jtgng_ram.v \
|
| 6 |
+
-DJTCHAR_LOWER_SIMFILE=',.simfile("bg0.bin")' \
|
| 7 |
+
-DJTCHAR_UPPER_SIMFILE=',.simfile("bg1.bin")' \
|
| 8 |
+
-DSIMULATION \
|
| 9 |
+
-o sim && sim -lxt
|
snapshots/jotego_jtcores_pr1100/cores/btiger/ver/scroll/test.v
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
`timescale 1ns/1ps
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
module test;
|
| 5 |
+
|
| 6 |
+
reg clk; // 24 MHz
|
| 7 |
+
reg rst;
|
| 8 |
+
wire [11:0] AB = 12'd0;
|
| 9 |
+
wire [8:0] V; // V128-V1
|
| 10 |
+
wire [8:0] H; // H256-H1
|
| 11 |
+
wire [10:0] hpos=11'd0;
|
| 12 |
+
wire [10:0] vpos=11'h0;
|
| 13 |
+
wire scr_cs = 1'b0;
|
| 14 |
+
wire layout = 1'b0;
|
| 15 |
+
wire [1:0] bank = 2'b0;
|
| 16 |
+
wire flip = 1'b0;
|
| 17 |
+
reg [7:0] din = 8'd0;
|
| 18 |
+
wire [7:0] dout;
|
| 19 |
+
reg wr_n = 1'b1;
|
| 20 |
+
wire busy;
|
| 21 |
+
wire [16:0] scr_addr;
|
| 22 |
+
wire [15:0] rom_data = 16'hdead;
|
| 23 |
+
wire rom_ok = 1'b1;
|
| 24 |
+
wire [ 7:0] scr_pxl;
|
| 25 |
+
|
| 26 |
+
wire cen6;
|
| 27 |
+
|
| 28 |
+
initial begin
|
| 29 |
+
clk = 0;
|
| 30 |
+
forever #(1/10.416) clk = ~clk;
|
| 31 |
+
end
|
| 32 |
+
|
| 33 |
+
initial begin
|
| 34 |
+
rst=1;
|
| 35 |
+
#30 rst=0;
|
| 36 |
+
end
|
| 37 |
+
|
| 38 |
+
integer framecnt=0;
|
| 39 |
+
|
| 40 |
+
always @(posedge LVBL) begin
|
| 41 |
+
framecnt <= framecnt+1;
|
| 42 |
+
if (framecnt==1) $finish;
|
| 43 |
+
end
|
| 44 |
+
|
| 45 |
+
jtgng_cen #(.CLK_SPEED(48)) u_cen(
|
| 46 |
+
.clk ( clk ),
|
| 47 |
+
.cen12 ( ),
|
| 48 |
+
.cen12b ( ),
|
| 49 |
+
.cen8 ( ),
|
| 50 |
+
.cen6 ( cen6 ),
|
| 51 |
+
.cen6b ( ),
|
| 52 |
+
.cen3 ( ),
|
| 53 |
+
.cen1p5 ( )
|
| 54 |
+
);
|
| 55 |
+
|
| 56 |
+
jtgng_timer u_timer(
|
| 57 |
+
.clk ( clk ),
|
| 58 |
+
.cen6 ( cen6 ),
|
| 59 |
+
.V ( V ),
|
| 60 |
+
.H ( H ),
|
| 61 |
+
.Hinit ( ),
|
| 62 |
+
.LHBL ( LHBL ),
|
| 63 |
+
.LHBL_obj ( ),
|
| 64 |
+
.LVBL ( LVBL ),
|
| 65 |
+
.LVBL_obj ( ),
|
| 66 |
+
.HS ( ),
|
| 67 |
+
.VS ( ),
|
| 68 |
+
.Vinit ( )
|
| 69 |
+
);
|
| 70 |
+
|
| 71 |
+
jtbtiger_scroll uut(
|
| 72 |
+
.clk ( clk ),
|
| 73 |
+
.pxl_cen ( cen6 ),
|
| 74 |
+
.cpu_cen ( cen6 ),
|
| 75 |
+
.AB ( AB ),
|
| 76 |
+
.V ( V[7:0] ), // V128-V1
|
| 77 |
+
.H ( H ), // H256-H1
|
| 78 |
+
.hpos ( hpos ),
|
| 79 |
+
.vpos ( vpos ),
|
| 80 |
+
.scr_cs ( scr_cs ),
|
| 81 |
+
.layout ( layout ),
|
| 82 |
+
.bank ( bank ),
|
| 83 |
+
.flip ( flip ),
|
| 84 |
+
.din ( din ),
|
| 85 |
+
.dout ( dout ),
|
| 86 |
+
.wr_n ( wr_n ),
|
| 87 |
+
.busy ( busy ),
|
| 88 |
+
.scr_addr ( scr_addr ),
|
| 89 |
+
.rom_data ( rom_data ),
|
| 90 |
+
.rom_ok ( rom_ok ),
|
| 91 |
+
.scr_pxl ( scr_pxl )
|
| 92 |
+
);
|
| 93 |
+
|
| 94 |
+
initial begin
|
| 95 |
+
$dumpfile("test.lxt");
|
| 96 |
+
$dumpvars;
|
| 97 |
+
$dumpon;
|
| 98 |
+
end
|
| 99 |
+
|
| 100 |
+
endmodule
|
snapshots/jotego_jtcores_pr1100/cores/capbowl/sch/bowl.kicad_pcb
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(kicad_pcb (version 4) (host kicad "dummy file") )
|
snapshots/jotego_jtcores_pr1100/cores/capbowl/sch/bowl.kicad_prl
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"board": {
|
| 3 |
+
"active_layer": 0,
|
| 4 |
+
"active_layer_preset": "",
|
| 5 |
+
"auto_track_width": true,
|
| 6 |
+
"hidden_netclasses": [],
|
| 7 |
+
"hidden_nets": [],
|
| 8 |
+
"high_contrast_mode": 0,
|
| 9 |
+
"net_color_mode": 1,
|
| 10 |
+
"opacity": {
|
| 11 |
+
"images": 0.6,
|
| 12 |
+
"pads": 1.0,
|
| 13 |
+
"tracks": 1.0,
|
| 14 |
+
"vias": 1.0,
|
| 15 |
+
"zones": 0.6
|
| 16 |
+
},
|
| 17 |
+
"ratsnest_display_mode": 0,
|
| 18 |
+
"selection_filter": {
|
| 19 |
+
"dimensions": true,
|
| 20 |
+
"footprints": true,
|
| 21 |
+
"graphics": true,
|
| 22 |
+
"keepouts": true,
|
| 23 |
+
"lockedItems": true,
|
| 24 |
+
"otherItems": true,
|
| 25 |
+
"pads": true,
|
| 26 |
+
"text": true,
|
| 27 |
+
"tracks": true,
|
| 28 |
+
"vias": true,
|
| 29 |
+
"zones": true
|
| 30 |
+
},
|
| 31 |
+
"visible_items": [
|
| 32 |
+
0,
|
| 33 |
+
1,
|
| 34 |
+
2,
|
| 35 |
+
3,
|
| 36 |
+
4,
|
| 37 |
+
5,
|
| 38 |
+
8,
|
| 39 |
+
9,
|
| 40 |
+
10,
|
| 41 |
+
11,
|
| 42 |
+
12,
|
| 43 |
+
13,
|
| 44 |
+
14,
|
| 45 |
+
15,
|
| 46 |
+
16,
|
| 47 |
+
17,
|
| 48 |
+
18,
|
| 49 |
+
19,
|
| 50 |
+
20,
|
| 51 |
+
21,
|
| 52 |
+
22,
|
| 53 |
+
23,
|
| 54 |
+
24,
|
| 55 |
+
25,
|
| 56 |
+
26,
|
| 57 |
+
27,
|
| 58 |
+
28,
|
| 59 |
+
29,
|
| 60 |
+
30,
|
| 61 |
+
32,
|
| 62 |
+
33,
|
| 63 |
+
34,
|
| 64 |
+
35,
|
| 65 |
+
36
|
| 66 |
+
],
|
| 67 |
+
"visible_layers": "fffffff_ffffffff",
|
| 68 |
+
"zone_display_mode": 0
|
| 69 |
+
},
|
| 70 |
+
"meta": {
|
| 71 |
+
"filename": "bowl.kicad_prl",
|
| 72 |
+
"version": 3
|
| 73 |
+
},
|
| 74 |
+
"project": {
|
| 75 |
+
"files": [
|
| 76 |
+
{
|
| 77 |
+
"name": "bowl.kicad_sch",
|
| 78 |
+
"open": false,
|
| 79 |
+
"window": {
|
| 80 |
+
"display": 0,
|
| 81 |
+
"maximized": true,
|
| 82 |
+
"pos_x": 607,
|
| 83 |
+
"pos_y": 243,
|
| 84 |
+
"size_x": 842,
|
| 85 |
+
"size_y": 610
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
]
|
| 89 |
+
}
|
| 90 |
+
}
|
snapshots/jotego_jtcores_pr1100/cores/capbowl/sch/bowl.kicad_pro
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"board": {
|
| 3 |
+
"3dviewports": [],
|
| 4 |
+
"design_settings": {
|
| 5 |
+
"defaults": {
|
| 6 |
+
"board_outline_line_width": 0.1,
|
| 7 |
+
"copper_line_width": 0.2,
|
| 8 |
+
"copper_text_size_h": 1.5,
|
| 9 |
+
"copper_text_size_v": 1.5,
|
| 10 |
+
"copper_text_thickness": 0.3,
|
| 11 |
+
"other_line_width": 0.15,
|
| 12 |
+
"silk_line_width": 0.15,
|
| 13 |
+
"silk_text_size_h": 1.0,
|
| 14 |
+
"silk_text_size_v": 1.0,
|
| 15 |
+
"silk_text_thickness": 0.15
|
| 16 |
+
},
|
| 17 |
+
"diff_pair_dimensions": [],
|
| 18 |
+
"drc_exclusions": [],
|
| 19 |
+
"rules": {
|
| 20 |
+
"solder_mask_clearance": 0.0,
|
| 21 |
+
"solder_mask_min_width": 0.0
|
| 22 |
+
},
|
| 23 |
+
"track_widths": [],
|
| 24 |
+
"via_dimensions": []
|
| 25 |
+
},
|
| 26 |
+
"layer_presets": [],
|
| 27 |
+
"viewports": []
|
| 28 |
+
},
|
| 29 |
+
"boards": [],
|
| 30 |
+
"cvpcb": {
|
| 31 |
+
"equivalence_files": []
|
| 32 |
+
},
|
| 33 |
+
"erc": {
|
| 34 |
+
"erc_exclusions": [],
|
| 35 |
+
"meta": {
|
| 36 |
+
"version": 0
|
| 37 |
+
},
|
| 38 |
+
"pin_map": [
|
| 39 |
+
[
|
| 40 |
+
0,
|
| 41 |
+
0,
|
| 42 |
+
0,
|
| 43 |
+
0,
|
| 44 |
+
0,
|
| 45 |
+
0,
|
| 46 |
+
1,
|
| 47 |
+
0,
|
| 48 |
+
0,
|
| 49 |
+
0,
|
| 50 |
+
0,
|
| 51 |
+
2
|
| 52 |
+
],
|
| 53 |
+
[
|
| 54 |
+
0,
|
| 55 |
+
2,
|
| 56 |
+
0,
|
| 57 |
+
1,
|
| 58 |
+
0,
|
| 59 |
+
0,
|
| 60 |
+
1,
|
| 61 |
+
0,
|
| 62 |
+
2,
|
| 63 |
+
2,
|
| 64 |
+
2,
|
| 65 |
+
2
|
| 66 |
+
],
|
| 67 |
+
[
|
| 68 |
+
0,
|
| 69 |
+
0,
|
| 70 |
+
0,
|
| 71 |
+
0,
|
| 72 |
+
0,
|
| 73 |
+
0,
|
| 74 |
+
1,
|
| 75 |
+
0,
|
| 76 |
+
1,
|
| 77 |
+
0,
|
| 78 |
+
1,
|
| 79 |
+
2
|
| 80 |
+
],
|
| 81 |
+
[
|
| 82 |
+
0,
|
| 83 |
+
1,
|
| 84 |
+
0,
|
| 85 |
+
0,
|
| 86 |
+
0,
|
| 87 |
+
0,
|
| 88 |
+
1,
|
| 89 |
+
1,
|
| 90 |
+
2,
|
| 91 |
+
1,
|
| 92 |
+
1,
|
| 93 |
+
2
|
| 94 |
+
],
|
| 95 |
+
[
|
| 96 |
+
0,
|
| 97 |
+
0,
|
| 98 |
+
0,
|
| 99 |
+
0,
|
| 100 |
+
0,
|
| 101 |
+
0,
|
| 102 |
+
1,
|
| 103 |
+
0,
|
| 104 |
+
0,
|
| 105 |
+
0,
|
| 106 |
+
0,
|
| 107 |
+
2
|
| 108 |
+
],
|
| 109 |
+
[
|
| 110 |
+
0,
|
| 111 |
+
0,
|
| 112 |
+
0,
|
| 113 |
+
0,
|
| 114 |
+
0,
|
| 115 |
+
0,
|
| 116 |
+
0,
|
| 117 |
+
0,
|
| 118 |
+
0,
|
| 119 |
+
0,
|
| 120 |
+
0,
|
| 121 |
+
2
|
| 122 |
+
],
|
| 123 |
+
[
|
| 124 |
+
1,
|
| 125 |
+
1,
|
| 126 |
+
1,
|
| 127 |
+
1,
|
| 128 |
+
1,
|
| 129 |
+
0,
|
| 130 |
+
1,
|
| 131 |
+
1,
|
| 132 |
+
1,
|
| 133 |
+
1,
|
| 134 |
+
1,
|
| 135 |
+
2
|
| 136 |
+
],
|
| 137 |
+
[
|
| 138 |
+
0,
|
| 139 |
+
0,
|
| 140 |
+
0,
|
| 141 |
+
1,
|
| 142 |
+
0,
|
| 143 |
+
0,
|
| 144 |
+
1,
|
| 145 |
+
0,
|
| 146 |
+
0,
|
| 147 |
+
0,
|
| 148 |
+
0,
|
| 149 |
+
2
|
| 150 |
+
],
|
| 151 |
+
[
|
| 152 |
+
0,
|
| 153 |
+
2,
|
| 154 |
+
1,
|
| 155 |
+
2,
|
| 156 |
+
0,
|
| 157 |
+
0,
|
| 158 |
+
1,
|
| 159 |
+
0,
|
| 160 |
+
2,
|
| 161 |
+
2,
|
| 162 |
+
2,
|
| 163 |
+
2
|
| 164 |
+
],
|
| 165 |
+
[
|
| 166 |
+
0,
|
| 167 |
+
2,
|
| 168 |
+
0,
|
| 169 |
+
1,
|
| 170 |
+
0,
|
| 171 |
+
0,
|
| 172 |
+
1,
|
| 173 |
+
0,
|
| 174 |
+
2,
|
| 175 |
+
0,
|
| 176 |
+
0,
|
| 177 |
+
2
|
| 178 |
+
],
|
| 179 |
+
[
|
| 180 |
+
0,
|
| 181 |
+
2,
|
| 182 |
+
1,
|
| 183 |
+
1,
|
| 184 |
+
0,
|
| 185 |
+
0,
|
| 186 |
+
1,
|
| 187 |
+
0,
|
| 188 |
+
2,
|
| 189 |
+
0,
|
| 190 |
+
0,
|
| 191 |
+
2
|
| 192 |
+
],
|
| 193 |
+
[
|
| 194 |
+
2,
|
| 195 |
+
2,
|
| 196 |
+
2,
|
| 197 |
+
2,
|
| 198 |
+
2,
|
| 199 |
+
2,
|
| 200 |
+
2,
|
| 201 |
+
2,
|
| 202 |
+
2,
|
| 203 |
+
2,
|
| 204 |
+
2,
|
| 205 |
+
2
|
| 206 |
+
]
|
| 207 |
+
],
|
| 208 |
+
"rule_severities": {
|
| 209 |
+
"bus_definition_conflict": "error",
|
| 210 |
+
"bus_entry_needed": "error",
|
| 211 |
+
"bus_to_bus_conflict": "error",
|
| 212 |
+
"bus_to_net_conflict": "error",
|
| 213 |
+
"conflicting_netclasses": "error",
|
| 214 |
+
"different_unit_footprint": "error",
|
| 215 |
+
"different_unit_net": "error",
|
| 216 |
+
"duplicate_reference": "error",
|
| 217 |
+
"duplicate_sheet_names": "error",
|
| 218 |
+
"endpoint_off_grid": "warning",
|
| 219 |
+
"extra_units": "error",
|
| 220 |
+
"global_label_dangling": "warning",
|
| 221 |
+
"hier_label_mismatch": "error",
|
| 222 |
+
"label_dangling": "error",
|
| 223 |
+
"lib_symbol_issues": "warning",
|
| 224 |
+
"missing_bidi_pin": "warning",
|
| 225 |
+
"missing_input_pin": "warning",
|
| 226 |
+
"missing_power_pin": "error",
|
| 227 |
+
"missing_unit": "warning",
|
| 228 |
+
"multiple_net_names": "warning",
|
| 229 |
+
"net_not_bus_member": "warning",
|
| 230 |
+
"no_connect_connected": "warning",
|
| 231 |
+
"no_connect_dangling": "warning",
|
| 232 |
+
"pin_not_connected": "error",
|
| 233 |
+
"pin_not_driven": "error",
|
| 234 |
+
"pin_to_pin": "warning",
|
| 235 |
+
"power_pin_not_driven": "error",
|
| 236 |
+
"similar_labels": "warning",
|
| 237 |
+
"simulation_model_issue": "ignore",
|
| 238 |
+
"unannotated": "error",
|
| 239 |
+
"unit_value_mismatch": "error",
|
| 240 |
+
"unresolved_variable": "error",
|
| 241 |
+
"wire_dangling": "error"
|
| 242 |
+
}
|
| 243 |
+
},
|
| 244 |
+
"libraries": {
|
| 245 |
+
"pinned_footprint_libs": [],
|
| 246 |
+
"pinned_symbol_libs": []
|
| 247 |
+
},
|
| 248 |
+
"meta": {
|
| 249 |
+
"filename": "bowl.kicad_pro",
|
| 250 |
+
"version": 1
|
| 251 |
+
},
|
| 252 |
+
"net_settings": {
|
| 253 |
+
"classes": [
|
| 254 |
+
{
|
| 255 |
+
"bus_width": 12,
|
| 256 |
+
"clearance": 0.2,
|
| 257 |
+
"diff_pair_gap": 0.25,
|
| 258 |
+
"diff_pair_via_gap": 0.25,
|
| 259 |
+
"diff_pair_width": 0.2,
|
| 260 |
+
"line_style": 0,
|
| 261 |
+
"microvia_diameter": 0.3,
|
| 262 |
+
"microvia_drill": 0.1,
|
| 263 |
+
"name": "Default",
|
| 264 |
+
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
| 265 |
+
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
| 266 |
+
"track_width": 0.25,
|
| 267 |
+
"via_diameter": 0.8,
|
| 268 |
+
"via_drill": 0.4,
|
| 269 |
+
"wire_width": 6
|
| 270 |
+
}
|
| 271 |
+
],
|
| 272 |
+
"meta": {
|
| 273 |
+
"version": 3
|
| 274 |
+
},
|
| 275 |
+
"net_colors": null,
|
| 276 |
+
"netclass_assignments": null,
|
| 277 |
+
"netclass_patterns": []
|
| 278 |
+
},
|
| 279 |
+
"pcbnew": {
|
| 280 |
+
"last_paths": {
|
| 281 |
+
"gencad": "",
|
| 282 |
+
"idf": "",
|
| 283 |
+
"netlist": "",
|
| 284 |
+
"specctra_dsn": "",
|
| 285 |
+
"step": "",
|
| 286 |
+
"vrml": ""
|
| 287 |
+
},
|
| 288 |
+
"page_layout_descr_file": ""
|
| 289 |
+
},
|
| 290 |
+
"schematic": {
|
| 291 |
+
"annotate_start_num": 0,
|
| 292 |
+
"drawing": {
|
| 293 |
+
"dashed_lines_dash_length_ratio": 12.0,
|
| 294 |
+
"dashed_lines_gap_length_ratio": 3.0,
|
| 295 |
+
"default_line_thickness": 6.0,
|
| 296 |
+
"default_text_size": 50.0,
|
| 297 |
+
"field_names": [],
|
| 298 |
+
"intersheets_ref_own_page": false,
|
| 299 |
+
"intersheets_ref_prefix": "",
|
| 300 |
+
"intersheets_ref_short": false,
|
| 301 |
+
"intersheets_ref_show": false,
|
| 302 |
+
"intersheets_ref_suffix": "",
|
| 303 |
+
"junction_size_choice": 3,
|
| 304 |
+
"label_size_ratio": 0.25,
|
| 305 |
+
"pin_symbol_size": 0.0,
|
| 306 |
+
"text_offset_ratio": 0.08
|
| 307 |
+
},
|
| 308 |
+
"legacy_lib_dir": "",
|
| 309 |
+
"legacy_lib_list": [],
|
| 310 |
+
"meta": {
|
| 311 |
+
"version": 1
|
| 312 |
+
},
|
| 313 |
+
"net_format_name": "",
|
| 314 |
+
"ngspice": {
|
| 315 |
+
"fix_include_paths": true,
|
| 316 |
+
"fix_passive_vals": false,
|
| 317 |
+
"meta": {
|
| 318 |
+
"version": 0
|
| 319 |
+
},
|
| 320 |
+
"model_mode": 0,
|
| 321 |
+
"workbook_filename": ""
|
| 322 |
+
},
|
| 323 |
+
"page_layout_descr_file": "",
|
| 324 |
+
"plot_directory": "",
|
| 325 |
+
"spice_adjust_passive_values": false,
|
| 326 |
+
"spice_current_sheet_as_root": false,
|
| 327 |
+
"spice_external_command": "spice \"%I\"",
|
| 328 |
+
"spice_model_current_sheet_as_root": true,
|
| 329 |
+
"spice_save_all_currents": false,
|
| 330 |
+
"spice_save_all_voltages": false,
|
| 331 |
+
"subpart_first_id": 65,
|
| 332 |
+
"subpart_id_separator": 0
|
| 333 |
+
},
|
| 334 |
+
"sheets": [
|
| 335 |
+
[
|
| 336 |
+
"dcb9df15-5ccb-447e-9110-7b41ece5a36b",
|
| 337 |
+
""
|
| 338 |
+
],
|
| 339 |
+
[
|
| 340 |
+
"00000000-0000-0000-0000-00008e26b20d",
|
| 341 |
+
"video"
|
| 342 |
+
],
|
| 343 |
+
[
|
| 344 |
+
"00000000-0000-0000-0000-0000897e04ed",
|
| 345 |
+
"sound"
|
| 346 |
+
],
|
| 347 |
+
[
|
| 348 |
+
"00000000-0000-0000-0000-0000877d3301",
|
| 349 |
+
"main"
|
| 350 |
+
],
|
| 351 |
+
[
|
| 352 |
+
"00000000-0000-0000-0000-0000882724fa",
|
| 353 |
+
"memories"
|
| 354 |
+
]
|
| 355 |
+
],
|
| 356 |
+
"text_variables": {}
|
| 357 |
+
}
|