trunk/src/mame/drivers/dec8.c
| r19030 | r19031 | |
| 2079 | 2079 | deco_karnovsprites_device::set_gfx_region(*device, 1); |
| 2080 | 2080 | |
| 2081 | 2081 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2082 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2083 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */) |
| 2084 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2085 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2082 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2083 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */) |
| 2084 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2085 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2086 | 2086 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2087 | 2087 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_lastmisn) |
| 2088 | 2088 | |
| r19030 | r19031 | |
| 2118 | 2118 | MCFG_CPU_PROGRAM_MAP(ym3526_s_map) |
| 2119 | 2119 | /* NMIs are caused by the main CPU */ |
| 2120 | 2120 | |
| 2121 | | // MCFG_QUANTUM_TIME(attotime::from_hz(100000)) |
| 2121 | // MCFG_QUANTUM_TIME(attotime::from_hz(100000)) |
| 2122 | 2122 | MCFG_QUANTUM_PERFECT_CPU("maincpu") // needs heavy sync, otherwise one of the two CPUs will miss an irq and makes the game to hang |
| 2123 | 2123 | |
| 2124 | 2124 | /* video hardware */ |
| r19030 | r19031 | |
| 2128 | 2128 | deco_karnovsprites_device::set_gfx_region(*device, 1); |
| 2129 | 2129 | |
| 2130 | 2130 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2131 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2132 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */) |
| 2133 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2134 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2131 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2132 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */) |
| 2133 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2134 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2135 | 2135 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2136 | 2136 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_shackled) |
| 2137 | 2137 | |
| r19030 | r19031 | |
| 2176 | 2176 | deco_karnovsprites_device::set_gfx_region(*device, 1); |
| 2177 | 2177 | |
| 2178 | 2178 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2179 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2180 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2181 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2182 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2179 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2180 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2181 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2182 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2183 | 2183 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2184 | 2184 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_gondo) |
| 2185 | 2185 | MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8) |
| r19030 | r19031 | |
| 2225 | 2225 | deco_karnovsprites_device::set_gfx_region(*device, 1); |
| 2226 | 2226 | |
| 2227 | 2227 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2228 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2229 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2230 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2231 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2228 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2229 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2230 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2231 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2232 | 2232 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2233 | 2233 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_garyoret) |
| 2234 | 2234 | MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8) |
| r19030 | r19031 | |
| 2277 | 2277 | deco_karnovsprites_device::set_gfx_region(*device, 1); |
| 2278 | 2278 | |
| 2279 | 2279 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2280 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2281 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */) |
| 2282 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2283 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2280 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2281 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */) |
| 2282 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2283 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2284 | 2284 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2285 | 2285 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_ghostb) |
| 2286 | 2286 | MCFG_SCREEN_VBLANK_DRIVER(dec8_state, screen_eof_dec8) |
| r19030 | r19031 | |
| 2328 | 2328 | deco_karnovsprites_device::set_gfx_region(*device, 1); |
| 2329 | 2329 | |
| 2330 | 2330 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2331 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2332 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2333 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2334 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2331 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2332 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2333 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2334 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2335 | 2335 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2336 | 2336 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_lastmisn) |
| 2337 | 2337 | |
| r19030 | r19031 | |
| 2384 | 2384 | deco_mxc06_device::set_gfx_region(*device, 1); |
| 2385 | 2385 | |
| 2386 | 2386 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2387 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2388 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */) |
| 2389 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2390 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2387 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2388 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* 58Hz, 529ms Vblank duration */) |
| 2389 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2390 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2391 | 2391 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2392 | 2392 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_oscar) |
| 2393 | 2393 | |
| r19030 | r19031 | |
| 2426 | 2426 | MCFG_BUFFERED_SPRITERAM8_ADD("spriteram") |
| 2427 | 2427 | |
| 2428 | 2428 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2429 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2430 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2431 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2432 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2429 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2430 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2431 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2432 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2433 | 2433 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2434 | 2434 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_srdarwin) |
| 2435 | 2435 | |
| r19030 | r19031 | |
| 2477 | 2477 | |
| 2478 | 2478 | |
| 2479 | 2479 | MCFG_SCREEN_ADD("screen", RASTER) |
| 2480 | | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2481 | | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2482 | | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2483 | | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2480 | // MCFG_SCREEN_REFRESH_RATE(58) |
| 2481 | // MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(529) /* 58Hz, 529ms Vblank duration */) |
| 2482 | // MCFG_SCREEN_SIZE(32*8, 32*8) |
| 2483 | // MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 1*8, 31*8-1) |
| 2484 | 2484 | MCFG_SCREEN_RAW_PARAMS(DEC8_PIXEL_CLOCK, DEC8_HTOTAL, DEC8_HBEND, DEC8_HBSTART, DEC8_VTOTAL, DEC8_VBEND, DEC8_VBSTART) |
| 2485 | 2485 | MCFG_SCREEN_UPDATE_DRIVER(dec8_state, screen_update_cobracom) |
| 2486 | 2486 | |
trunk/src/mame/drivers/cps1.c
| r19030 | r19031 | |
| 1813 | 1813 | |
| 1814 | 1814 | /* To-Do sf2amf dipswitch SW(B):4 + SW(B):5 + SW(B):6 |
| 1815 | 1815 | static INPUT_PORTS_START( sf2amf ) |
| 1816 | | PORT_INCLUDE( ) |
| 1816 | PORT_INCLUDE( ) |
| 1817 | 1817 | |
| 1818 | | PORT_MODIFY("DSWB") |
| 1819 | | PORT_DIPNAME( 0x08, 0x00, "Turbo Switch 1 of 3" ) PORT_DIPLOCATION("SW(B):4") |
| 1820 | | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1821 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1822 | | PORT_DIPNAME( 0x10, 0x00, "Turbo Switch 2 of 3" ) PORT_DIPLOCATION("SW(B):5") |
| 1823 | | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1824 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1825 | | PORT_DIPNAME( 0x20, 0x00, "Turbo Switch 3 of 3" ) PORT_DIPLOCATION("SW(B):6") |
| 1826 | | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1827 | | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1818 | PORT_MODIFY("DSWB") |
| 1819 | PORT_DIPNAME( 0x08, 0x00, "Turbo Switch 1 of 3" ) PORT_DIPLOCATION("SW(B):4") |
| 1820 | PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) |
| 1821 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1822 | PORT_DIPNAME( 0x10, 0x00, "Turbo Switch 2 of 3" ) PORT_DIPLOCATION("SW(B):5") |
| 1823 | PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) |
| 1824 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1825 | PORT_DIPNAME( 0x20, 0x00, "Turbo Switch 3 of 3" ) PORT_DIPLOCATION("SW(B):6") |
| 1826 | PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) |
| 1827 | PORT_DIPSETTING( 0x00, DEF_STR( On ) ) |
| 1828 | 1828 | INPUT_PORTS_END |
| 1829 | 1829 | */ |
| 1830 | 1830 | |
| r19030 | r19031 | |
| 6576 | 6576 | ROM_START( sf2stt ) |
| 6577 | 6577 | ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ |
| 6578 | 6578 | /* do not comment this out, this is only for testing purpose |
| 6579 | | ROM_LOAD16_BYTE( "12.bin", 0x00000, 0x40000, CRC(a258b4d5) SHA1(3433b6493794c98bb35c1b27cc65bb5f13d52e9b) ) |
| 6580 | | ROM_LOAD16_BYTE( "09.bin", 0x00001, 0x40000, CRC(59ccd474) SHA1(7bb28c28ee722435fdbb18eb73e52bd65b419103) ) |
| 6581 | | */ |
| 6579 | ROM_LOAD16_BYTE( "12.bin", 0x00000, 0x40000, CRC(a258b4d5) SHA1(3433b6493794c98bb35c1b27cc65bb5f13d52e9b) ) |
| 6580 | ROM_LOAD16_BYTE( "09.bin", 0x00001, 0x40000, CRC(59ccd474) SHA1(7bb28c28ee722435fdbb18eb73e52bd65b419103) ) |
| 6581 | */ |
| 6582 | 6582 | ROM_LOAD16_BYTE( "prg part 1.stt", 0x00000, 0x40000, NO_DUMP ) |
| 6583 | 6583 | ROM_LOAD16_BYTE( "prg part 2.stt", 0x00001, 0x40000, NO_DUMP ) |
| 6584 | 6584 | /* there are two empty sockets next to the two following program roms, |
| 6585 | | these roms may be missing and this PCB is not working on real hardware */ |
| 6585 | these roms may be missing and this PCB is not working on real hardware */ |
| 6586 | 6586 | ROM_LOAD16_BYTE( "ce91e-b", 0x80000, 0x40000, CRC(0862386e) SHA1(9fcfbcbbc17529de75d5419018e7b1dd90b397c0) ) |
| 6587 | 6587 | ROM_LOAD16_BYTE( "ce91e-a", 0x80001, 0x40000, CRC(0c83844d) SHA1(4c25ba4a50d62c62789d026e3d304ed1dfb3c248) ) |
| 6588 | 6588 | |
| r19030 | r19031 | |
| 6625 | 6625 | ROM_START( sf2unkb ) |
| 6626 | 6626 | ROM_REGION( CODE_SIZE, "maincpu", 0 ) /* 68000 code */ |
| 6627 | 6627 | /* do not comment this out, this is only for testing purpose |
| 6628 | | ROM_LOAD16_BYTE( "12.bin", 0x000000, 0x40000, CRC(a258b4d5) SHA1(3433b6493794c98bb35c1b27cc65bb5f13d52e9b) ) |
| 6629 | | ROM_LOAD16_BYTE( "09.bin", 0x000001, 0x40000, CRC(59ccd474) SHA1(7bb28c28ee722435fdbb18eb73e52bd65b419103) ) |
| 6630 | | ROM_LOAD16_BYTE( "11.bin", 0x080000, 0x40000, CRC(82097d63) SHA1(881e7ffb78197f6794b5d41f5c2c87da35e8cb15) ) |
| 6631 | | ROM_LOAD16_BYTE( "10.bin", 0x080001, 0x40000, CRC(0c83844d) SHA1(4c25ba4a50d62c62789d026e3d304ed1dfb3c248) ) |
| 6632 | | */ |
| 6628 | ROM_LOAD16_BYTE( "12.bin", 0x000000, 0x40000, CRC(a258b4d5) SHA1(3433b6493794c98bb35c1b27cc65bb5f13d52e9b) ) |
| 6629 | ROM_LOAD16_BYTE( "09.bin", 0x000001, 0x40000, CRC(59ccd474) SHA1(7bb28c28ee722435fdbb18eb73e52bd65b419103) ) |
| 6630 | ROM_LOAD16_BYTE( "11.bin", 0x080000, 0x40000, CRC(82097d63) SHA1(881e7ffb78197f6794b5d41f5c2c87da35e8cb15) ) |
| 6631 | ROM_LOAD16_BYTE( "10.bin", 0x080001, 0x40000, CRC(0c83844d) SHA1(4c25ba4a50d62c62789d026e3d304ed1dfb3c248) ) |
| 6632 | */ |
| 6633 | 6633 | ROM_LOAD16_BYTE( "prg part 1.sf2unkb", 0x00000, 0x80000, NO_DUMP ) |
| 6634 | 6634 | ROM_LOAD16_BYTE( "prg part 2.sf2unkb", 0x00001, 0x80000, NO_DUMP ) |
| 6635 | 6635 | /* there are two empty sockets next to the two following program roms, |
| 6636 | | these roms may be missing and this PCB is not working on real hardware */ |
| 6636 | these roms may be missing and this PCB is not working on real hardware */ |
| 6637 | 6637 | ROM_LOAD16_BYTE( "w-6", 0x100000, 0x20000, CRC(bb4af315) SHA1(75f0827f4f7e9f292add46467f8d4fe19b2514c9) ) |
| 6638 | 6638 | ROM_LOAD16_BYTE( "w-5", 0x100001, 0x20000, CRC(c02a13eb) SHA1(b807cc495bff3f95d03b061fc629c95f965cb6d8) ) |
| 6639 | 6639 | |
| r19030 | r19031 | |
| 6671 | 6671 | ROM_REGION( 0x40000, "oki", 0 ) /* Samples */ |
| 6672 | 6672 | ROM_LOAD( "sample part 1.unkb", 0x20000, 0x20000, NO_DUMP ) |
| 6673 | 6673 | /* do not comment this out, this is only for testing purpose |
| 6674 | | ROM_LOAD( "sf2_18.11c", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) |
| 6675 | | */ |
| 6674 | ROM_LOAD( "sf2_18.11c", 0x00000, 0x20000, CRC(7f162009) SHA1(346bf42992b4c36c593e21901e22c87ae4a7d86d) ) |
| 6675 | */ |
| 6676 | 6676 | ROM_LOAD( "w-7", 0x20000, 0x20000, CRC(beade53f) SHA1(277c397dc12752719ec6b47d2224750bd1c07f79) ) |
| 6677 | 6677 | ROM_END |
| 6678 | 6678 | |
| r19030 | r19031 | |
| 8323 | 8323 | ROM_LOAD16_BYTE( "5.amf", 0x000000, 0x80000, CRC(03991fba) SHA1(6c42bf15248640fdb3e98fb01b0a870649deb410) ) |
| 8324 | 8324 | ROM_LOAD16_BYTE( "4.amf", 0x000001, 0x80000, CRC(39f15a1e) SHA1(901c4fea76bf5bff7330ed07ffde54cdccdaa680) ) |
| 8325 | 8325 | /* there are two empty sockets next to the two former program roms, |
| 8326 | | these roms may be missing and this PCB is not working on real hardware */ |
| 8326 | these roms may be missing and this PCB is not working on real hardware */ |
| 8327 | 8327 | ROM_LOAD16_BYTE( "prg part 3.amf", 0x100000, 0x40000, NO_DUMP ) |
| 8328 | 8328 | ROM_LOAD16_BYTE( "prg part 4.amf", 0x100001, 0x40000, NO_DUMP ) |
| 8329 | 8329 | /* do not comment this out, this is only for testing purpose |
| 8330 | | ROM_LOAD16_BYTE( "u221.rom", 0x100000, 0x20000, CRC(64e6e091) SHA1(32ec05db955e538d4ada26d19ee50926f74b684f) ) |
| 8331 | | ROM_LOAD16_BYTE( "u195.rom", 0x100001, 0x20000, CRC(c95e4443) SHA1(28417dee9ccdfa65b0f4a92aa29b90279fe8cd85) ) |
| 8332 | | */ |
| 8333 | | |
| 8330 | ROM_LOAD16_BYTE( "u221.rom", 0x100000, 0x20000, CRC(64e6e091) SHA1(32ec05db955e538d4ada26d19ee50926f74b684f) ) |
| 8331 | ROM_LOAD16_BYTE( "u195.rom", 0x100001, 0x20000, CRC(c95e4443) SHA1(28417dee9ccdfa65b0f4a92aa29b90279fe8cd85) ) |
| 8332 | */ |
| 8333 | |
| 8334 | 8334 | ROM_REGION( 0x600000, "gfx", 0 ) |
| 8335 | 8335 | ROMX_LOAD( "y.c.e.c m.k.r-001", 0x000000, 0x80000, CRC(a258de13) SHA1(2e477948c4c8a2fb7cfdc4a739766bc4a4e01c49), ROM_GROUPWORD | ROM_SKIP(6) ) |
| 8336 | 8336 | ROM_CONTINUE( 0x000002, 0x80000) |
trunk/src/mame/drivers/supercrd.c
| r19030 | r19031 | |
| 34 | 34 | |
| 35 | 35 | ROMs: PRG: 2x 27C512 (IC37, IC51) |
| 36 | 36 | GFX: 2x 27C512 (IC10, IC11) |
| 37 | | BP: 1x N82S147N |
| 37 | BP: 1x N82S147N |
| 38 | 38 | |
| 39 | 39 | 1x Xtal 16 MHz. |
| 40 | 40 | 1x 8 DIP switches bank. |
| r19030 | r19031 | |
| 276 | 276 | AM_RANGE(0x0000, 0xbfff) AM_ROM |
| 277 | 277 | AM_RANGE(0xc000, 0xcfff) AM_RAM_WRITE(supercrd_videoram_w) AM_SHARE("videoram") // wrong |
| 278 | 278 | AM_RANGE(0xd000, 0xdfff) AM_RAM_WRITE(supercrd_colorram_w) AM_SHARE("colorram") // wrong |
| 279 | | // AM_RANGE(0x0000, 0x0000) AM_RAM AM_SHARE("nvram") |
| 280 | | // AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 281 | | // AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 279 | // AM_RANGE(0x0000, 0x0000) AM_RAM AM_SHARE("nvram") |
| 280 | // AM_RANGE(0xe000, 0xe000) AM_DEVWRITE("crtc", mc6845_device, address_w) |
| 281 | // AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) |
| 282 | 282 | ADDRESS_MAP_END |
| 283 | 283 | |
| 284 | 284 | |
| r19030 | r19031 | |
| 401 | 401 | |
| 402 | 402 | //static const mc6845_interface mc6845_intf = |
| 403 | 403 | //{ |
| 404 | | // "screen", /* screen we are acting on */ |
| 405 | | // 4, /* number of pixels per video memory address */ |
| 406 | | // NULL, /* before pixel update callback */ |
| 407 | | // NULL, /* row update callback */ |
| 408 | | // NULL, /* after pixel update callback */ |
| 409 | | // DEVCB_NULL, /* callback for display state changes */ |
| 410 | | // DEVCB_NULL, /* callback for cursor state changes */ |
| 411 | | // DEVCB_NULL, /* HSYNC callback */ |
| 412 | | // DEVCB_NULL, /* VSYNC callback */ |
| 413 | | // NULL /* update address callback */ |
| 404 | // "screen", /* screen we are acting on */ |
| 405 | // 4, /* number of pixels per video memory address */ |
| 406 | // NULL, /* before pixel update callback */ |
| 407 | // NULL, /* row update callback */ |
| 408 | // NULL, /* after pixel update callback */ |
| 409 | // DEVCB_NULL, /* callback for display state changes */ |
| 410 | // DEVCB_NULL, /* callback for cursor state changes */ |
| 411 | // DEVCB_NULL, /* HSYNC callback */ |
| 412 | // DEVCB_NULL, /* VSYNC callback */ |
| 413 | // NULL /* update address callback */ |
| 414 | 414 | //}; |
| 415 | 415 | |
| 416 | 416 | |
| r19030 | r19031 | |
| 420 | 420 | |
| 421 | 421 | //static I8255_INTERFACE (ppi8255_intf_0) |
| 422 | 422 | //{ |
| 423 | | // /* (port) Mode X - description */ |
| 424 | | // DEVCB_UNMAPPED, /* Port A read */ |
| 425 | | // DEVCB_UNMAPPED, /* Port A write */ |
| 426 | | // DEVCB_UNMAPPED, /* Port B read */ |
| 427 | | // DEVCB_UNMAPPED, /* Port B write */ |
| 428 | | // DEVCB_UNMAPPED, /* Port C read */ |
| 429 | | // DEVCB_UNMAPPED /* Port C write */ |
| 423 | // /* (port) Mode X - description */ |
| 424 | // DEVCB_UNMAPPED, /* Port A read */ |
| 425 | // DEVCB_UNMAPPED, /* Port A write */ |
| 426 | // DEVCB_UNMAPPED, /* Port B read */ |
| 427 | // DEVCB_UNMAPPED, /* Port B write */ |
| 428 | // DEVCB_UNMAPPED, /* Port C read */ |
| 429 | // DEVCB_UNMAPPED /* Port C write */ |
| 430 | 430 | //}; |
| 431 | 431 | |
| 432 | 432 | //static I8255_INTERFACE (ppi8255_intf_1) |
| 433 | 433 | //{ |
| 434 | | // /* (port) Mode X - description */ |
| 435 | | // DEVCB_UNMAPPED, /* Port A read */ |
| 436 | | // DEVCB_UNMAPPED, /* Port A write */ |
| 437 | | // DEVCB_UNMAPPED, /* Port B read */ |
| 438 | | // DEVCB_UNMAPPED, /* Port B write */ |
| 439 | | // DEVCB_UNMAPPED, /* Port C read */ |
| 440 | | // DEVCB_UNMAPPED /* Port C write */ |
| 434 | // /* (port) Mode X - description */ |
| 435 | // DEVCB_UNMAPPED, /* Port A read */ |
| 436 | // DEVCB_UNMAPPED, /* Port A write */ |
| 437 | // DEVCB_UNMAPPED, /* Port B read */ |
| 438 | // DEVCB_UNMAPPED, /* Port B write */ |
| 439 | // DEVCB_UNMAPPED, /* Port C read */ |
| 440 | // DEVCB_UNMAPPED /* Port C write */ |
| 441 | 441 | //}; |
| 442 | 442 | |
| 443 | 443 | /************************** |
| r19030 | r19031 | |
| 449 | 449 | MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK/8) /* 2MHz, guess */ |
| 450 | 450 | MCFG_CPU_PROGRAM_MAP(supercrd_map) |
| 451 | 451 | |
| 452 | | // MCFG_NVRAM_ADD_0FILL("nvram") |
| 452 | // MCFG_NVRAM_ADD_0FILL("nvram") |
| 453 | 453 | |
| 454 | | // MCFG_I8255_ADD( "ppi8255_0", ppi8255_intf_0 ) |
| 455 | | // MCFG_I8255_ADD( "ppi8255_1", ppi8255_intf_1 ) |
| 454 | // MCFG_I8255_ADD( "ppi8255_0", ppi8255_intf_0 ) |
| 455 | // MCFG_I8255_ADD( "ppi8255_1", ppi8255_intf_1 ) |
| 456 | 456 | |
| 457 | 457 | /* video hardware */ |
| 458 | 458 | |
| r19030 | r19031 | |
| 469 | 469 | MCFG_PALETTE_INIT_OVERRIDE(supercrd_state, supercrd) |
| 470 | 470 | MCFG_VIDEO_START_OVERRIDE(supercrd_state, supercrd) |
| 471 | 471 | |
| 472 | | // MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf) |
| 472 | // MCFG_MC6845_ADD("crtc", MC6845, MASTER_CLOCK/8, mc6845_intf) |
| 473 | 473 | |
| 474 | 474 | /* sound hardware */ |
| 475 | 475 | MCFG_SPEAKER_STANDARD_MONO("mono") |
| 476 | 476 | |
| 477 | | // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 477 | // MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75) |
| 478 | 478 | MACHINE_CONFIG_END |
| 479 | 479 | |
| 480 | 480 | |
| r19030 | r19031 | |
| 488 | 488 | ROM_LOAD( "supca_417_ce2.ic51", 0x10000, 0x08000, CRC(36415f73) SHA1(9881b88991f034d79260502289432a7318aa1647) ) // wrong |
| 489 | 489 | ROM_IGNORE( 0x8000) |
| 490 | 490 | |
| 491 | | // ROM_LOAD( "supca_417_ce1.ic37", 0x0000, 0x8000, CRC(b67f7d38) SHA1(eaf8f24d476185d4744858afcbf0005362f49cab) ) |
| 492 | | // ROM_CONTINUE( 0x0000, 0x8000) |
| 493 | | // ROM_LOAD( "supca_417_ce2.ic51", 0x8000, 0x8000, CRC(36415f73) SHA1(9881b88991f034d79260502289432a7318aa1647) ) |
| 494 | | // ROM_IGNORE( 0x8000) |
| 491 | // ROM_LOAD( "supca_417_ce1.ic37", 0x0000, 0x8000, CRC(b67f7d38) SHA1(eaf8f24d476185d4744858afcbf0005362f49cab) ) |
| 492 | // ROM_CONTINUE( 0x0000, 0x8000) |
| 493 | // ROM_LOAD( "supca_417_ce2.ic51", 0x8000, 0x8000, CRC(36415f73) SHA1(9881b88991f034d79260502289432a7318aa1647) ) |
| 494 | // ROM_IGNORE( 0x8000) |
| 495 | 495 | |
| 496 | 496 | ROM_REGION( 0x20000, "gfxtemp", 0 ) |
| 497 | 497 | ROM_LOAD( "supca_410_zg2.ic11", 0x00000, 0x10000, CRC(a4646dc6) SHA1(638ad334bb4f1430381474ddfaa1029cb4d13916) ) |
trunk/src/emu/sound/tms5110r.c
| r19030 | r19031 | |
| 383 | 383 | }, |
| 384 | 384 | /* Chirp table */ |
| 385 | 385 | /* |
| 386 | | { 0, 42, -44, 50, -78, 18, 37, 20, |
| 387 | | 2, -31, -59, 2, 95, 90, 5, 15, |
| 388 | | 38, -4, -91,-91, -42,-35,-36, -4, |
| 389 | | 37, 43, 34, 33, 15, -1, -8,-18, |
| 390 | | -19,-17, -9,-10, -6, 0, 3, 2, |
| 391 | | 1, 0, 0, 0, 0, 0, 0, 0, |
| 392 | | 0, 0, 0, 0 },*/ |
| 386 | { 0, 42, -44, 50, -78, 18, 37, 20, |
| 387 | 2, -31, -59, 2, 95, 90, 5, 15, |
| 388 | 38, -4, -91,-91, -42,-35,-36, -4, |
| 389 | 37, 43, 34, 33, 15, -1, -8,-18, |
| 390 | -19,-17, -9,-10, -6, 0, 3, 2, |
| 391 | 1, 0, 0, 0, 0, 0, 0, 0, |
| 392 | 0, 0, 0, 0 },*/ |
| 393 | 393 | { 0,127,127, 0, 0, 0, 0, 0, |
| 394 | 394 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 395 | 395 | 0, 0, 0, 0, 0, 0, 0, 0, |
| r19030 | r19031 | |
| 460 | 460 | }, |
| 461 | 461 | /* Chirp table */ |
| 462 | 462 | /* |
| 463 | | { 0, 42, -44, 50, -78, 18, 37, 20, |
| 464 | | 2, -31, -59, 2, 95, 90, 5, 15, |
| 465 | | 38, -4, -91,-91, -42,-35,-36, -4, |
| 466 | | 37, 43, 34, 33, 15, -1, -8,-18, |
| 467 | | -19,-17, -9,-10, -6, 0, 3, 2, |
| 468 | | 1, 0, 0, 0, 0, 0, 0, 0, |
| 469 | | 0, 0, 0, 0 },*/ |
| 463 | { 0, 42, -44, 50, -78, 18, 37, 20, |
| 464 | 2, -31, -59, 2, 95, 90, 5, 15, |
| 465 | 38, -4, -91,-91, -42,-35,-36, -4, |
| 466 | 37, 43, 34, 33, 15, -1, -8,-18, |
| 467 | -19,-17, -9,-10, -6, 0, 3, 2, |
| 468 | 1, 0, 0, 0, 0, 0, 0, 0, |
| 469 | 0, 0, 0, 0 },*/ |
| 470 | 470 | { 0,127,127, 0, 0, 0, 0, 0, |
| 471 | 471 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 472 | 472 | 0, 0, 0, 0, 0, 0, 0, 0, |
| r19030 | r19031 | |
| 541 | 541 | }, |
| 542 | 542 | /* Chirp table */ |
| 543 | 543 | /* |
| 544 | | { 0, 42, -44, 50, -78, 18, 37, 20, |
| 545 | | 2, -31, -59, 2, 95, 90, 5, 15, |
| 546 | | 38, -4, -91,-91, -42,-35,-36, -4, |
| 547 | | 37, 43, 34, 33, 15, -1, -8,-18, |
| 548 | | -19,-17, -9,-10, -6, 0, 3, 2, |
| 549 | | 1, 0, 0, 0, 0, 0, 0, 0, |
| 550 | | 0, 0, 0, 0 },*/ |
| 544 | { 0, 42, -44, 50, -78, 18, 37, 20, |
| 545 | 2, -31, -59, 2, 95, 90, 5, 15, |
| 546 | 38, -4, -91,-91, -42,-35,-36, -4, |
| 547 | 37, 43, 34, 33, 15, -1, -8,-18, |
| 548 | -19,-17, -9,-10, -6, 0, 3, 2, |
| 549 | 1, 0, 0, 0, 0, 0, 0, 0, |
| 550 | 0, 0, 0, 0 },*/ |
| 551 | 551 | { 0,127,127, 0, 0, 0, 0, 0, |
| 552 | 552 | 0, 0, 0, 0, 0, 0, 0, 0, |
| 553 | 553 | 0, 0, 0, 0, 0, 0, 0, 0, |
trunk/src/emu/sound/tms5220.c
| r19030 | r19031 | |
| 418 | 418 | UINT8 RDB_flag; /* whether we should read data register or status register */ |
| 419 | 419 | |
| 420 | 420 | /* io_ready: page 3 of the datasheet specifies that READY will be asserted until |
| 421 | | * data is available or processed by the system. |
| 422 | | */ |
| 421 | * data is available or processed by the system. |
| 422 | */ |
| 423 | 423 | UINT8 io_ready; |
| 424 | 424 | |
| 425 | 425 | /* flag for "true" timing involving rs/ws */ |
| r19030 | r19031 | |
| 431 | 431 | UINT8 write_latch; |
| 432 | 432 | |
| 433 | 433 | /* The TMS52xx has two different ways of providing output data: the |
| 434 | | analog speaker pin (which was usually used) and the Digital I/O pin. |
| 435 | | The internal DAC used to feed the analog pin is only 8 bits, and has the |
| 436 | | funny clipping/clamping logic, while the digital pin gives full 12? bit |
| 437 | | resolution of the output data. |
| 438 | | TODO: add a way to set/reset this other than the FORCE_DIGITAL define |
| 439 | | */ |
| 434 | analog speaker pin (which was usually used) and the Digital I/O pin. |
| 435 | The internal DAC used to feed the analog pin is only 8 bits, and has the |
| 436 | funny clipping/clamping logic, while the digital pin gives full 12? bit |
| 437 | resolution of the output data. |
| 438 | TODO: add a way to set/reset this other than the FORCE_DIGITAL define |
| 439 | */ |
| 440 | 440 | UINT8 digital_select; |
| 441 | 441 | device_t *device; |
| 442 | 442 | |
| r19030 | r19031 | |
| 554 | 554 | |
| 555 | 555 | /********************************************************************************************** |
| 556 | 556 | |
| 557 | | printbits helper function: takes a long int input and prints the resulting bits to stderr |
| 557 | printbits helper function: takes a long int input and prints the resulting bits to stderr |
| 558 | 558 | |
| 559 | 559 | ***********************************************************************************************/ |
| 560 | 560 | |
| r19030 | r19031 | |
| 592 | 592 | |
| 593 | 593 | /********************************************************************************************** |
| 594 | 594 | |
| 595 | | tms5220_data_write -- handle a write to the TMS5220 |
| 595 | tms5220_data_write -- handle a write to the TMS5220 |
| 596 | 596 | |
| 597 | 597 | ***********************************************************************************************/ |
| 598 | 598 | |
| r19030 | r19031 | |
| 652 | 652 | |
| 653 | 653 | /********************************************************************************************** |
| 654 | 654 | |
| 655 | | update_status_and_ints -- check to see if the various flags should be on or off |
| 656 | | Description of flags, and their position in the status register: |
| 657 | | From the data sheet: |
| 658 | | bit D0(bit 7) = TS - Talk Status is active (high) when the VSP is processing speech data. |
| 659 | | Talk Status goes active at the initiation of a Speak command or after nine |
| 660 | | bytes of data are loaded into the FIFO following a Speak External command. It |
| 661 | | goes inactive (low) when the stop code (Energy=1111) is processed, or |
| 662 | | immediately by a buffer empty condition or a reset command. |
| 663 | | bit D1(bit 6) = BL - Buffer Low is active (high) when the FIFO buffer is more than half empty. |
| 664 | | Buffer Low is set when the "Last-In" byte is shifted down past the half-full |
| 665 | | boundary of the stack. Buffer Low is cleared when data is loaded to the stack |
| 666 | | so that the "Last-In" byte lies above the half-full boundary and becomes the |
| 667 | | eighth data byte of the stack. |
| 668 | | bit D2(bit 5) = BE - Buffer Empty is active (high) when the FIFO buffer has run out of data |
| 669 | | while executing a Speak External command. Buffer Empty is set when the last bit |
| 670 | | of the "Last-In" byte is shifted out to the Synthesis Section. This causes |
| 671 | | Talk Status to be cleared. Speech is terminated at some abnormal point and the |
| 672 | | Speak External command execution is terminated. |
| 655 | update_status_and_ints -- check to see if the various flags should be on or off |
| 656 | Description of flags, and their position in the status register: |
| 657 | From the data sheet: |
| 658 | bit D0(bit 7) = TS - Talk Status is active (high) when the VSP is processing speech data. |
| 659 | Talk Status goes active at the initiation of a Speak command or after nine |
| 660 | bytes of data are loaded into the FIFO following a Speak External command. It |
| 661 | goes inactive (low) when the stop code (Energy=1111) is processed, or |
| 662 | immediately by a buffer empty condition or a reset command. |
| 663 | bit D1(bit 6) = BL - Buffer Low is active (high) when the FIFO buffer is more than half empty. |
| 664 | Buffer Low is set when the "Last-In" byte is shifted down past the half-full |
| 665 | boundary of the stack. Buffer Low is cleared when data is loaded to the stack |
| 666 | so that the "Last-In" byte lies above the half-full boundary and becomes the |
| 667 | eighth data byte of the stack. |
| 668 | bit D2(bit 5) = BE - Buffer Empty is active (high) when the FIFO buffer has run out of data |
| 669 | while executing a Speak External command. Buffer Empty is set when the last bit |
| 670 | of the "Last-In" byte is shifted out to the Synthesis Section. This causes |
| 671 | Talk Status to be cleared. Speech is terminated at some abnormal point and the |
| 672 | Speak External command execution is terminated. |
| 673 | 673 | |
| 674 | 674 | ***********************************************************************************************/ |
| 675 | 675 | |
| r19030 | r19031 | |
| 680 | 680 | update_ready_state(tms); |
| 681 | 681 | |
| 682 | 682 | /* BL is set if neither byte 9 nor 8 of the fifo are in use; this |
| 683 | | translates to having fifo_count (which ranges from 0 bytes in use to 16 |
| 684 | | bytes used) being less than or equal to 8. Victory/Victorba depends on this. */ |
| 683 | translates to having fifo_count (which ranges from 0 bytes in use to 16 |
| 684 | bytes used) being less than or equal to 8. Victory/Victorba depends on this. */ |
| 685 | 685 | if (tms->fifo_count <= 8) |
| 686 | 686 | { |
| 687 | 687 | // generate an interrupt if necessary; if /BL was inactive and is now active, set int. |
| r19030 | r19031 | |
| 693 | 693 | tms->buffer_low = 0; |
| 694 | 694 | |
| 695 | 695 | /* BE is set if neither byte 15 nor 14 of the fifo are in use; this |
| 696 | | translates to having fifo_count equal to exactly 0 */ |
| 696 | translates to having fifo_count equal to exactly 0 */ |
| 697 | 697 | if (tms->fifo_count == 0) |
| 698 | 698 | { |
| 699 | 699 | // generate an interrupt if necessary; if /BE was inactive and is now active, set int. |
| r19030 | r19031 | |
| 705 | 705 | tms->buffer_empty = 0; |
| 706 | 706 | |
| 707 | 707 | /* TS is talk status and is set elsewhere in the fifo parser and in |
| 708 | | the SPEAK command handler; however, if /BE is true during speak external |
| 709 | | mode, it is immediately unset here. */ |
| 708 | the SPEAK command handler; however, if /BE is true during speak external |
| 709 | mode, it is immediately unset here. */ |
| 710 | 710 | if ((tms->speak_external == 1) && (tms->buffer_empty == 1)) |
| 711 | 711 | { |
| 712 | 712 | // generate an interrupt: /TS was active, and is now inactive. |
| r19030 | r19031 | |
| 717 | 717 | } |
| 718 | 718 | } |
| 719 | 719 | /* Note that TS being unset will also generate an interrupt when a STOP |
| 720 | | frame is encountered; this is handled in the sample generator code and not here */ |
| 720 | frame is encountered; this is handled in the sample generator code and not here */ |
| 721 | 721 | } |
| 722 | 722 | |
| 723 | 723 | /********************************************************************************************** |
| 724 | 724 | |
| 725 | | extract_bits -- extract a specific number of bits from the current input stream (FIFO or VSM) |
| 725 | extract_bits -- extract a specific number of bits from the current input stream (FIFO or VSM) |
| 726 | 726 | |
| 727 | 727 | ***********************************************************************************************/ |
| 728 | 728 | |
| r19030 | r19031 | |
| 759 | 759 | |
| 760 | 760 | /********************************************************************************************** |
| 761 | 761 | |
| 762 | | tms5220_status_read -- read status or data from the TMS5220 |
| 762 | tms5220_status_read -- read status or data from the TMS5220 |
| 763 | 763 | |
| 764 | 764 | ***********************************************************************************************/ |
| 765 | 765 | |
| r19030 | r19031 | |
| 801 | 801 | |
| 802 | 802 | /********************************************************************************************** |
| 803 | 803 | |
| 804 | | tms5220_cycles_to_ready -- returns the number of cycles until ready is asserted |
| 805 | | NOTE: this function is deprecated and is known to be VERY inaccurate. |
| 806 | | Use at your own peril! |
| 804 | tms5220_cycles_to_ready -- returns the number of cycles until ready is asserted |
| 805 | NOTE: this function is deprecated and is known to be VERY inaccurate. |
| 806 | Use at your own peril! |
| 807 | 807 | |
| 808 | 808 | ***********************************************************************************************/ |
| 809 | 809 | |
| r19030 | r19031 | |
| 829 | 829 | val = (tms->fifo[tms->fifo_head] >> tms->fifo_bits_taken) & 0xf; |
| 830 | 830 | if (val == 0) |
| 831 | 831 | /* 0 -> silence frame: we will only read 4 bits, and we will |
| 832 | | * therefore need to read another frame before the FIFO is not |
| 833 | | * full any more */ |
| 832 | * therefore need to read another frame before the FIFO is not |
| 833 | * full any more */ |
| 834 | 834 | answer += tms->subc_reload?200:304; |
| 835 | 835 | /* 15 -> stop frame, we will only read 4 bits, but the FIFO will |
| 836 | | * we cleared; otherwise, we need to parse the repeat flag (1 bit) |
| 837 | | * and the pitch (6 bits), so everything will be OK. */ |
| 836 | * we cleared; otherwise, we need to parse the repeat flag (1 bit) |
| 837 | * and the pitch (6 bits), so everything will be OK. */ |
| 838 | 838 | } |
| 839 | 839 | } |
| 840 | 840 | |
| r19030 | r19031 | |
| 844 | 844 | |
| 845 | 845 | /********************************************************************************************** |
| 846 | 846 | |
| 847 | | tms5220_int_read -- returns the interrupt state of the TMS5220 |
| 847 | tms5220_int_read -- returns the interrupt state of the TMS5220 |
| 848 | 848 | |
| 849 | 849 | ***********************************************************************************************/ |
| 850 | 850 | |
| r19030 | r19031 | |
| 859 | 859 | |
| 860 | 860 | /********************************************************************************************** |
| 861 | 861 | |
| 862 | | tms5220_process -- fill the buffer with a specific number of samples |
| 862 | tms5220_process -- fill the buffer with a specific number of samples |
| 863 | 863 | |
| 864 | 864 | ***********************************************************************************************/ |
| 865 | 865 | |
| r19030 | r19031 | |
| 875 | 875 | goto empty; |
| 876 | 876 | |
| 877 | 877 | /* if speak external is set, but talk status is not (yet) set, |
| 878 | | wait for buffer low to clear */ |
| 878 | wait for buffer low to clear */ |
| 879 | 879 | if (!tms->talk_status && tms->speak_external && tms->buffer_low) |
| 880 | 880 | goto empty; |
| 881 | 881 | |
| r19030 | r19031 | |
| 883 | 883 | while ((size > 0) && tms->speaking_now) |
| 884 | 884 | { |
| 885 | 885 | /* if it is the appropriate time to update the old energy/pitch idxes, |
| 886 | | * i.e. when IP=7, PC=12, T=17, subcycle=2, do so. Since IP=7 PC=12 T=17 |
| 887 | | * is JUST BEFORE the transition to IP=0 PC=0 T=0 sybcycle=(0 or 1), |
| 888 | | * which happens 4 T-cycles later), we change on the latter.*/ |
| 886 | * i.e. when IP=7, PC=12, T=17, subcycle=2, do so. Since IP=7 PC=12 T=17 |
| 887 | * is JUST BEFORE the transition to IP=0 PC=0 T=0 sybcycle=(0 or 1), |
| 888 | * which happens 4 T-cycles later), we change on the latter.*/ |
| 889 | 889 | if ((tms->interp_period == 0) && (tms->PC == 0) && (tms->subcycle < 2)) |
| 890 | 890 | { |
| 891 | 891 | tms->OLDE = (tms->new_frame_energy_idx == 0); |
| r19030 | r19031 | |
| 893 | 893 | } |
| 894 | 894 | |
| 895 | 895 | /* if we're ready for a new frame to be applied, i.e. when IP=0, PC=12, Sub=1 |
| 896 | | * (In reality, the frame was really loaded incrementally during the entire IP=0 |
| 897 | | * PC=x time period, but it doesn't affect anything until IP=0 PC=12 happens) |
| 898 | | */ |
| 896 | * (In reality, the frame was really loaded incrementally during the entire IP=0 |
| 897 | * PC=x time period, but it doesn't affect anything until IP=0 PC=12 happens) |
| 898 | */ |
| 899 | 899 | if ((tms->interp_period == 0) && (tms->PC == 12) && (tms->subcycle == 1)) |
| 900 | 900 | { |
| 901 | 901 | // HACK for regression testing, be sure to comment out before release! |
| r19030 | r19031 | |
| 939 | 939 | } |
| 940 | 940 | |
| 941 | 941 | /* in all cases where interpolation would be inhibited, set the inhibit flag; otherwise clear it. |
| 942 | | Interpolation inhibit cases: |
| 943 | | * Old frame was voiced, new is unvoiced |
| 944 | | * Old frame was silence/zero energy, new has nonzero energy |
| 945 | | * Old frame was unvoiced, new is voiced |
| 946 | | */ |
| 942 | Interpolation inhibit cases: |
| 943 | * Old frame was voiced, new is unvoiced |
| 944 | * Old frame was silence/zero energy, new has nonzero energy |
| 945 | * Old frame was unvoiced, new is voiced |
| 946 | */ |
| 947 | 947 | if ( ((OLD_FRAME_UNVOICED_FLAG == 0) && (NEW_FRAME_UNVOICED_FLAG == 1)) |
| 948 | 948 | || ((OLD_FRAME_UNVOICED_FLAG == 1) && (NEW_FRAME_UNVOICED_FLAG == 0)) |
| 949 | 949 | || ((OLD_FRAME_SILENCE_FLAG == 1) && (NEW_FRAME_SILENCE_FLAG == 0)) ) |
| r19030 | r19031 | |
| 1056 | 1056 | { |
| 1057 | 1057 | // generate voiced samples here |
| 1058 | 1058 | /* US patent 4331836 Figure 14B shows, and logic would hold, that a pitch based chirp |
| 1059 | | * function has a chirp/peak and then a long chain of zeroes. |
| 1060 | | * The last entry of the chirp rom is at address 0b110011 (51d), the 52nd sample, |
| 1061 | | * and if the address reaches that point the ADDRESS incrementer is |
| 1062 | | * disabled, forcing all samples beyond 51d to be == 51d |
| 1063 | | * (address 51d holds zeroes, which may or may not be inverted to -1) |
| 1064 | | */ |
| 1059 | * function has a chirp/peak and then a long chain of zeroes. |
| 1060 | * The last entry of the chirp rom is at address 0b110011 (51d), the 52nd sample, |
| 1061 | * and if the address reaches that point the ADDRESS incrementer is |
| 1062 | * disabled, forcing all samples beyond 51d to be == 51d |
| 1063 | * (address 51d holds zeroes, which may or may not be inverted to -1) |
| 1064 | */ |
| 1065 | 1065 | if (tms->pitch_count >= 51) |
| 1066 | 1066 | tms->excitation_data = tms->coeff->chirptable[51]; |
| 1067 | 1067 | else /*tms->pitch_count < 51*/ |
| r19030 | r19031 | |
| 1124 | 1124 | tms->PC++; |
| 1125 | 1125 | } |
| 1126 | 1126 | /* Circuit 412 in the patent ensures that when INHIBIT is true, |
| 1127 | | * during the period from IP=7 PC=12 T12, to IP=0 PC=12 T12, the pitch |
| 1128 | | * count is forced to 0; since the initial stop happens right before |
| 1129 | | * the switch to IP=0 PC=0 and this code is located after the switch would |
| 1130 | | * happen, we check for ip=0 inhibit=1, which covers that whole range. |
| 1131 | | * The purpose of Circuit 412 is to prevent a spurious click caused by |
| 1132 | | * the voiced source being fed to the filter before all the values have |
| 1133 | | * been updated during ip=0 when interpolation was inhibited. |
| 1134 | | */ |
| 1127 | * during the period from IP=7 PC=12 T12, to IP=0 PC=12 T12, the pitch |
| 1128 | * count is forced to 0; since the initial stop happens right before |
| 1129 | * the switch to IP=0 PC=0 and this code is located after the switch would |
| 1130 | * happen, we check for ip=0 inhibit=1, which covers that whole range. |
| 1131 | * The purpose of Circuit 412 is to prevent a spurious click caused by |
| 1132 | * the voiced source being fed to the filter before all the values have |
| 1133 | * been updated during ip=0 when interpolation was inhibited. |
| 1134 | */ |
| 1135 | 1135 | tms->pitch_count++; |
| 1136 | 1136 | if (tms->pitch_count >= tms->current_pitch) tms->pitch_count = 0; |
| 1137 | 1137 | if ((tms->interp_period == 0)&&(tms->inhibit==1)) tms->pitch_count = 0; |
| r19030 | r19031 | |
| 1165 | 1165 | |
| 1166 | 1166 | /********************************************************************************************** |
| 1167 | 1167 | |
| 1168 | | clip_analog -- clips the 14 bit return value from the lattice filter to its final 10 bit value (-512 to 511), and upshifts/range extends this to 16 bits |
| 1168 | clip_analog -- clips the 14 bit return value from the lattice filter to its final 10 bit value (-512 to 511), and upshifts/range extends this to 16 bits |
| 1169 | 1169 | |
| 1170 | 1170 | ***********************************************************************************************/ |
| 1171 | 1171 | |
| 1172 | 1172 | static INT16 clip_analog(INT16 cliptemp) |
| 1173 | 1173 | { |
| 1174 | 1174 | /* clipping, just like the patent shows: |
| 1175 | | * the top 10 bits of this result are visible on the digital output IO pin. |
| 1176 | | * next, if the top 3 bits of the 14 bit result are all the same, the lowest of those 3 bits plus the next 7 bits are the signed analog output, otherwise the low bits are all forced to match the inverse of the topmost bit, i.e.: |
| 1177 | | * 1x xxxx xxxx xxxx -> 0b10000000 |
| 1178 | | * 11 1bcd efgh xxxx -> 0b1bcdefgh |
| 1179 | | * 00 0bcd efgh xxxx -> 0b0bcdefgh |
| 1180 | | * 0x xxxx xxxx xxxx -> 0b01111111 |
| 1181 | | */ |
| 1175 | * the top 10 bits of this result are visible on the digital output IO pin. |
| 1176 | * next, if the top 3 bits of the 14 bit result are all the same, the lowest of those 3 bits plus the next 7 bits are the signed analog output, otherwise the low bits are all forced to match the inverse of the topmost bit, i.e.: |
| 1177 | * 1x xxxx xxxx xxxx -> 0b10000000 |
| 1178 | * 11 1bcd efgh xxxx -> 0b1bcdefgh |
| 1179 | * 00 0bcd efgh xxxx -> 0b0bcdefgh |
| 1180 | * 0x xxxx xxxx xxxx -> 0b01111111 |
| 1181 | */ |
| 1182 | 1182 | #ifdef DEBUG_CLIP |
| 1183 | 1183 | if ((cliptemp > 2047) || (cliptemp < -2048)) fprintf(stderr,"clipping cliptemp to range; was %d\n", cliptemp); |
| 1184 | 1184 | #endif |
| r19030 | r19031 | |
| 1203 | 1203 | |
| 1204 | 1204 | /********************************************************************************************** |
| 1205 | 1205 | |
| 1206 | | matrix_multiply -- does the proper multiply and shift |
| 1207 | | a is the k coefficient and is clamped to 10 bits (9 bits plus a sign) |
| 1208 | | b is the running result and is clamped to 14 bits. |
| 1209 | | output is 14 bits, but note the result LSB bit is always 1. |
| 1210 | | Because the low 4 bits of the result are trimmed off before |
| 1211 | | output, this makes almost no difference in the computation. |
| 1206 | matrix_multiply -- does the proper multiply and shift |
| 1207 | a is the k coefficient and is clamped to 10 bits (9 bits plus a sign) |
| 1208 | b is the running result and is clamped to 14 bits. |
| 1209 | output is 14 bits, but note the result LSB bit is always 1. |
| 1210 | Because the low 4 bits of the result are trimmed off before |
| 1211 | output, this makes almost no difference in the computation. |
| 1212 | 1212 | |
| 1213 | 1213 | **********************************************************************************************/ |
| 1214 | 1214 | static INT32 matrix_multiply(INT32 a, INT32 b) |
| r19030 | r19031 | |
| 1228 | 1228 | |
| 1229 | 1229 | /********************************************************************************************** |
| 1230 | 1230 | |
| 1231 | | lattice_filter -- executes one 'full run' of the lattice filter on a specific byte of |
| 1232 | | excitation data, and specific values of all the current k constants, and returns the |
| 1233 | | resulting sample. |
| 1231 | lattice_filter -- executes one 'full run' of the lattice filter on a specific byte of |
| 1232 | excitation data, and specific values of all the current k constants, and returns the |
| 1233 | resulting sample. |
| 1234 | 1234 | |
| 1235 | 1235 | ***********************************************************************************************/ |
| 1236 | 1236 | |
| r19030 | r19031 | |
| 1239 | 1239 | // Lattice filter here |
| 1240 | 1240 | // Aug/05/07: redone as unrolled loop, for clarity - LN |
| 1241 | 1241 | /* Originally Copied verbatim from table I in US patent 4,209,804, now updated to be in same order as the actual chip does it, not that it matters. |
| 1242 | | notation equivalencies from table: |
| 1243 | | Yn(i) == tms->u[n-1] |
| 1244 | | Kn = tms->current_k[n-1] |
| 1245 | | bn = tms->x[n-1] |
| 1246 | | */ |
| 1242 | notation equivalencies from table: |
| 1243 | Yn(i) == tms->u[n-1] |
| 1244 | Kn = tms->current_k[n-1] |
| 1245 | bn = tms->x[n-1] |
| 1246 | */ |
| 1247 | 1247 | tms->u[10] = matrix_multiply(tms->previous_energy, (tms->excitation_data<<6)); //Y(11) |
| 1248 | 1248 | tms->u[9] = tms->u[10] - matrix_multiply(tms->current_k[9], tms->x[9]); |
| 1249 | 1249 | tms->u[8] = tms->u[9] - matrix_multiply(tms->current_k[8], tms->x[8]); |
| r19030 | r19031 | |
| 1282 | 1282 | |
| 1283 | 1283 | /********************************************************************************************** |
| 1284 | 1284 | |
| 1285 | | process_command -- extract a byte from the FIFO and interpret it as a command |
| 1285 | process_command -- extract a byte from the FIFO and interpret it as a command |
| 1286 | 1286 | |
| 1287 | 1287 | ***********************************************************************************************/ |
| 1288 | 1288 | |
| r19030 | r19031 | |
| 1332 | 1332 | if (tms->talk_status == 0) /* TALKST must be clear for LA */ |
| 1333 | 1333 | { |
| 1334 | 1334 | /* tms5220 data sheet says that if we load only one 4-bit nibble, it won't work. |
| 1335 | | This code does not care about this. */ |
| 1335 | This code does not care about this. */ |
| 1336 | 1336 | if (tms->intf->load_address) |
| 1337 | 1337 | (*tms->intf->load_address)(tms->device, cmd & 0x0f); |
| 1338 | 1338 | tms->schedule_dummy_read = TRUE; |
| r19030 | r19031 | |
| 1403 | 1403 | // We actually don't care how many bits are left in the fifo here; the frame subpart will be processed normally, and any bits extracted 'past the end' of the fifo will be read as zeroes; the fifo being emptied will set the /BE latch which will halt speech exactly as if a stop frame had been encountered (instead of whatever partial frame was read); the same exact circuitry is used for both on the real chip, see us patent 4335277 sheet 16, gates 232a (decode stop frame) and 232b (decode /BE plus DDIS (decode disable) which is active during speak external). |
| 1404 | 1404 | |
| 1405 | 1405 | /* if the chip is a tms5220C, and the rate mode is set to that each frame (0x04 bit set) |
| 1406 | | has a 2 bit rate preceding it, grab two bits here and store them as the rate; */ |
| 1406 | has a 2 bit rate preceding it, grab two bits here and store them as the rate; */ |
| 1407 | 1407 | if ((tms->variant == SUBTYPE_TMS5220C) && (tms->tms5220c_rate & 0x04)) |
| 1408 | 1408 | { |
| 1409 | 1409 | indx = extract_bits(tms, 2); |
| r19030 | r19031 | |
| 2177 | 2177 | |
| 2178 | 2178 | // initialize the chip state |
| 2179 | 2179 | /* Note that we do not actually clear IRQ on start-up: IRQ is even raised |
| 2180 | | * if m_buffer_empty or m_buffer_low are 0 */ |
| 2180 | * if m_buffer_empty or m_buffer_low are 0 */ |
| 2181 | 2181 | m_speaking_now = false; |
| 2182 | 2182 | m_speak_external = false; |
| 2183 | 2183 | m_talk_status = false; |
| r19030 | r19031 | |
| 2314 | 2314 | while ((size > 0) && m_speaking_now) |
| 2315 | 2315 | { |
| 2316 | 2316 | /* if it is the appropriate time to update the old energy/pitch idxes, |
| 2317 | | * i.e. when IP=7, PC=12, T=17, subcycle=2, do so. Since IP=7 PC=12 T=17 |
| 2318 | | * is JUST BEFORE the transition to IP=0 PC=0 T=0 sybcycle=(0 or 1), |
| 2319 | | * which happens 4 T-cycles later), we change on the latter. |
| 2320 | | */ |
| 2317 | * i.e. when IP=7, PC=12, T=17, subcycle=2, do so. Since IP=7 PC=12 T=17 |
| 2318 | * is JUST BEFORE the transition to IP=0 PC=0 T=0 sybcycle=(0 or 1), |
| 2319 | * which happens 4 T-cycles later), we change on the latter. |
| 2320 | */ |
| 2321 | 2321 | if ((m_interp_period == 0) && (m_PC == 0) && (m_subcycle < 2)) |
| 2322 | 2322 | { |
| 2323 | 2323 | m_OLDE = (m_new_frame_energy_idx == 0); |
| r19030 | r19031 | |
| 2325 | 2325 | } |
| 2326 | 2326 | |
| 2327 | 2327 | /* if we're ready for a new frame to be applied, i.e. when IP=0, PC=12, Sub=1 |
| 2328 | | * (In reality, the frame was really loaded incrementally during the |
| 2329 | | * entire IP=0 PC=x time period, but it doesn't affect anything until IP=0 PC=12 happens) |
| 2330 | | */ |
| 2328 | * (In reality, the frame was really loaded incrementally during the |
| 2329 | * entire IP=0 PC=x time period, but it doesn't affect anything until IP=0 PC=12 happens) |
| 2330 | */ |
| 2331 | 2331 | if ((m_interp_period == 0) && (m_PC == 12) && (m_subcycle == 1)) |
| 2332 | 2332 | { |
| 2333 | 2333 | // HACK for regression testing, be sure to comment out before release! |
| r19030 | r19031 | |
| 2573 | 2573 | m_PC++; |
| 2574 | 2574 | } |
| 2575 | 2575 | /* Circuit 412 in the patent ensures that when INHIBIT is true, |
| 2576 | | * during the period from IP=7 PC=12 T12, to IP=0 PC=12 T12, the pitch |
| 2577 | | * count is forced to 0; since the initial stop happens right before |
| 2578 | | * the switch to IP=0 PC=0 and this code is located after the switch would |
| 2579 | | * happen, we check for ip=0 inhibit=1, which covers that whole range. |
| 2580 | | * The purpose of Circuit 412 is to prevent a spurious click caused by |
| 2581 | | * the voiced source being fed to the filter before all the values have |
| 2582 | | * been updated during ip=0 when interpolation was inhibited. |
| 2583 | | */ |
| 2576 | * during the period from IP=7 PC=12 T12, to IP=0 PC=12 T12, the pitch |
| 2577 | * count is forced to 0; since the initial stop happens right before |
| 2578 | * the switch to IP=0 PC=0 and this code is located after the switch would |
| 2579 | * happen, we check for ip=0 inhibit=1, which covers that whole range. |
| 2580 | * The purpose of Circuit 412 is to prevent a spurious click caused by |
| 2581 | * the voiced source being fed to the filter before all the values have |
| 2582 | * been updated during ip=0 when interpolation was inhibited. |
| 2583 | */ |
| 2584 | 2584 | m_pitch_count++; |
| 2585 | 2585 | if (m_pitch_count >= m_current_pitch) m_pitch_count = 0; |
| 2586 | 2586 | if ((m_interp_period == 0) && m_inhibit) m_pitch_count = 0; |
| r19030 | r19031 | |
| 2622 | 2622 | { |
| 2623 | 2623 | /* Lattice filter here */ |
| 2624 | 2624 | /* Aug/05/07: redone as unrolled loop, for clarity - LN |
| 2625 | | * Originally Copied verbatim from table I in US patent 4,209,804, now updated |
| 2626 | | * to be in same order as the actual chip does it, not that it matters. |
| 2627 | | * notation equivalencies from table: |
| 2628 | | * Yn(i) == m_u[n-1] |
| 2629 | | * Kn = m_current_k[n-1] |
| 2630 | | * bn = m_x[n-1] |
| 2631 | | */ |
| 2625 | * Originally Copied verbatim from table I in US patent 4,209,804, now updated |
| 2626 | * to be in same order as the actual chip does it, not that it matters. |
| 2627 | * notation equivalencies from table: |
| 2628 | * Yn(i) == m_u[n-1] |
| 2629 | * Kn = m_current_k[n-1] |
| 2630 | * bn = m_x[n-1] |
| 2631 | */ |
| 2632 | 2632 | |
| 2633 | 2633 | m_u[10] = matrix_multiply(m_previous_energy, (m_excitation_data<<6)); //Y(11) |
| 2634 | 2634 | m_u[9] = m_u[10] - matrix_multiply(m_current_k[9], m_x[9]); |
| r19030 | r19031 | |
| 2694 | 2694 | logerror("tms52xx: data_write triggered talk status to go active!\n"); |
| 2695 | 2695 | #endif |
| 2696 | 2696 | /* ...then we now have enough bytes to start talking; clear out |
| 2697 | | * the new frame parameters (it will become old frame just before the first call to parse_frame()) |
| 2698 | | * TODO: the 3 lines below (and others) are needed for victory |
| 2699 | | * to not fail its selftest due to a sample ending too late, may require additional investigation */ |
| 2697 | * the new frame parameters (it will become old frame just before the first call to parse_frame()) |
| 2698 | * TODO: the 3 lines below (and others) are needed for victory |
| 2699 | * to not fail its selftest due to a sample ending too late, may require additional investigation */ |
| 2700 | 2700 | m_subcycle = m_subc_reload; |
| 2701 | 2701 | m_PC = 0; |
| 2702 | 2702 | m_interp_period = reload_table[m_tms5220c_rate & 0x3]; // is this correct? should this be always 7 instead, so that the new frame is loaded quickly? |
| r19030 | r19031 | |
| 2842 | 2842 | int indx, i, rep_flag; |
| 2843 | 2843 | |
| 2844 | 2844 | /* We actually don't care how many bits are left in the fifo here; the |
| 2845 | | * frame subpart will be processed normally, and any bits extracted 'past |
| 2846 | | * the end' of the fifo will be read as zeroes; the fifo being emptied will |
| 2847 | | * set the /BE latch which will halt speech exactly as if a stop frame had |
| 2848 | | * been encountered (instead of whatever partial frame was read); the same |
| 2849 | | * exact circuitry is used for both on the real chip, see us patent 4335277 |
| 2850 | | * sheet 16, gates 232a (decode stop frame) and 232b (decode /BE plus DDIS |
| 2851 | | * (decode disable) which is active during speak external). */ |
| 2845 | * frame subpart will be processed normally, and any bits extracted 'past |
| 2846 | * the end' of the fifo will be read as zeroes; the fifo being emptied will |
| 2847 | * set the /BE latch which will halt speech exactly as if a stop frame had |
| 2848 | * been encountered (instead of whatever partial frame was read); the same |
| 2849 | * exact circuitry is used for both on the real chip, see us patent 4335277 |
| 2850 | * sheet 16, gates 232a (decode stop frame) and 232b (decode /BE plus DDIS |
| 2851 | * (decode disable) which is active during speak external). */ |
| 2852 | 2852 | |
| 2853 | 2853 | /* if the chip is a tms5220C, and the rate mode is set to that each frame (0x04 bit set) |
| 2854 | | * has a 2 bit rate preceding it, grab two bits here and store them as the rate; */ |
| 2854 | * has a 2 bit rate preceding it, grab two bits here and store them as the rate; */ |
| 2855 | 2855 | if ((m_variant == SUBTYPE_TMS5220C) && (m_tms5220c_rate & 0x04)) |
| 2856 | 2856 | { |
| 2857 | 2857 | indx = extract_bits(2); |
| r19030 | r19031 | |
| 2895 | 2895 | update_status_and_ints(); |
| 2896 | 2896 | if (!m_talk_status) goto ranout; |
| 2897 | 2897 | /* if this is a repeat frame, just do nothing, it will reuse the |
| 2898 | | * old coefficients */ |
| 2898 | * old coefficients */ |
| 2899 | 2899 | if (rep_flag) return; |
| 2900 | 2900 | |
| 2901 | 2901 | // extract first 4 K coefficients |
| r19030 | r19031 | |
| 2972 | 2972 | update_ready_state(); |
| 2973 | 2973 | |
| 2974 | 2974 | /* BL is set if neither byte 9 nor 8 of the fifo are in use; this |
| 2975 | | * translates to having fifo_count (which ranges from 0 bytes in use to 16 |
| 2976 | | * bytes used) being less than or equal to 8. Victory/Victorba depends on this. */ |
| 2975 | * translates to having fifo_count (which ranges from 0 bytes in use to 16 |
| 2976 | * bytes used) being less than or equal to 8. Victory/Victorba depends on this. */ |
| 2977 | 2977 | if (m_fifo_count <= 8) |
| 2978 | 2978 | { |
| 2979 | 2979 | // generate an interrupt if necessary; if /BL was inactive and is now active, set int. |
| r19030 | r19031 | |
| 2984 | 2984 | m_buffer_low = false; |
| 2985 | 2985 | |
| 2986 | 2986 | /* BE is set if neither byte 15 nor 14 of the fifo are in use; this |
| 2987 | | * translates to having fifo_count equal to exactly 0 */ |
| 2987 | * translates to having fifo_count equal to exactly 0 */ |
| 2988 | 2988 | if (m_fifo_count == 0) |
| 2989 | 2989 | { |
| 2990 | 2990 | // generate an interrupt if necessary; if /BE was inactive and is now active, set int. |
| r19030 | r19031 | |
| 2995 | 2995 | m_buffer_empty = false; |
| 2996 | 2996 | |
| 2997 | 2997 | /* TS is talk status and is set elsewhere in the fifo parser and in |
| 2998 | | * the SPEAK command handler; however, if /BE is true during speak external |
| 2999 | | * mode, it is immediately unset here. */ |
| 2998 | * the SPEAK command handler; however, if /BE is true during speak external |
| 2999 | * mode, it is immediately unset here. */ |
| 3000 | 3000 | if (m_speak_external && m_buffer_empty) |
| 3001 | 3001 | { |
| 3002 | 3002 | // generate an interrupt: /TS was active, and is now inactive. |
| r19030 | r19031 | |
| 3007 | 3007 | } |
| 3008 | 3008 | } |
| 3009 | 3009 | /* Note that TS being unset will also generate an interrupt when a STOP |
| 3010 | | * frame is encountered; this is handled in the sample generator code and not here */ |
| 3010 | * frame is encountered; this is handled in the sample generator code and not here */ |
| 3011 | 3011 | } |
| 3012 | 3012 | |
| 3013 | 3013 | /****************************************************************************** |
| r19030 | r19031 | |
| 3214 | 3214 | logerror("tms52xx: Scheduling ready cycle for /RS...\n"); |
| 3215 | 3215 | #endif |
| 3216 | 3216 | /* upon /RS being activated, /READY goes inactive after 100 nsec from |
| 3217 | | * data sheet, through 3 asynchronous gates on patent. This is effectively |
| 3218 | | * within one clock, so we immediately set io_ready to 0 and activate the callback. */ |
| 3217 | * data sheet, through 3 asynchronous gates on patent. This is effectively |
| 3218 | * within one clock, so we immediately set io_ready to 0 and activate the callback. */ |
| 3219 | 3219 | m_io_ready = 0; |
| 3220 | 3220 | update_ready_state(); |
| 3221 | 3221 | /* How long does /READY stay inactive, when /RS is pulled low? |
| 3222 | | * I believe its almost always ~16 clocks (25 usec at 800khz as shown on the datasheet) */ |
| 3222 | * I believe its almost always ~16 clocks (25 usec at 800khz as shown on the datasheet) */ |
| 3223 | 3223 | m_ready_timer->adjust(attotime::from_hz(clock()/16)); |
| 3224 | 3224 | } |
| 3225 | 3225 | } |
| r19030 | r19031 | |
| 3270 | 3270 | logerror("tms52xx: Scheduling ready cycle for /WS...\n"); |
| 3271 | 3271 | #endif |
| 3272 | 3272 | /* upon /WS being activated, /READY goes inactive after 100 nsec |
| 3273 | | * from data sheet, through 3 asynchronous gates on patent. |
| 3274 | | * This is effectively within one clock, so we immediately set |
| 3275 | | * io_ready to 0 and activate the callback. */ |
| 3273 | * from data sheet, through 3 asynchronous gates on patent. |
| 3274 | * This is effectively within one clock, so we immediately set |
| 3275 | * io_ready to 0 and activate the callback. */ |
| 3276 | 3276 | m_io_ready = 0; |
| 3277 | 3277 | update_ready_state(); |
| 3278 | 3278 | /* Now comes the complicated part: long does /READY stay inactive |
| 3279 | | * when /WS is pulled low? This depends ENTIRELY on the command written, |
| 3280 | | * or whether the chip is in speak external mode or not... |
| 3281 | | * Speak external mode: ~16 cycles |
| 3282 | | * Command Mode: |
| 3283 | | * SPK: ? cycles |
| 3284 | | * SPKEXT: ? cycles |
| 3285 | | * RDBY: between 60 and 140 cycles |
| 3286 | | * RB: ? cycles (80?) |
| 3287 | | * RST: between 60 and 140 cycles |
| 3288 | | * SET RATE (5220C only): ? cycles (probably ~16) */ |
| 3279 | * when /WS is pulled low? This depends ENTIRELY on the command written, |
| 3280 | * or whether the chip is in speak external mode or not... |
| 3281 | * Speak external mode: ~16 cycles |
| 3282 | * Command Mode: |
| 3283 | * SPK: ? cycles |
| 3284 | * SPKEXT: ? cycles |
| 3285 | * RDBY: between 60 and 140 cycles |
| 3286 | * RB: ? cycles (80?) |
| 3287 | * RST: between 60 and 140 cycles |
| 3288 | * SET RATE (5220C only): ? cycles (probably ~16) */ |
| 3289 | 3289 | |
| 3290 | 3290 | // TODO: actually HANDLE the timing differences! currently just assuming always 16 cycles |
| 3291 | 3291 | m_ready_timer->adjust(attotime::from_hz(clock()/16)); |
trunk/src/mess/drivers/apc.c
| r19030 | r19031 | |
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | | Advanced Personal Computer (c) 1982 NEC |
| 3 | Advanced Personal Computer (c) 1982 NEC |
| 4 | 4 | |
| 5 | | preliminary driver by Angelo Salese |
| 5 | preliminary driver by Angelo Salese |
| 6 | 6 | |
| 7 | | TODO: |
| 8 | | - video emulation |
| 9 | | - Floppy device |
| 10 | | - keyboard |
| 11 | | - Understand interrupt sources |
| 12 | | - NMI seems valid, dumps a x86 stack to vram? |
| 13 | | - Unknown RTC device type; |
| 14 | | - What are exactly APU and MPU devices? They sounds scary ... |
| 15 | | - DMA hook-ups |
| 16 | | - serial ports |
| 17 | | - parallel ports |
| 18 | | - Extract info regarding Hard Disk functionality |
| 19 | | - Various unknown ports |
| 20 | | - What kind of external ROM actually maps at 0xa****? |
| 7 | TODO: |
| 8 | - video emulation |
| 9 | - Floppy device |
| 10 | - keyboard |
| 11 | - Understand interrupt sources |
| 12 | - NMI seems valid, dumps a x86 stack to vram? |
| 13 | - Unknown RTC device type; |
| 14 | - What are exactly APU and MPU devices? They sounds scary ... |
| 15 | - DMA hook-ups |
| 16 | - serial ports |
| 17 | - parallel ports |
| 18 | - Extract info regarding Hard Disk functionality |
| 19 | - Various unknown ports |
| 20 | - What kind of external ROM actually maps at 0xa****? |
| 21 | 21 | |
| 22 | 22 | ============================================================================ |
| 23 | | front ^ |
| 24 | | | |
| 25 | | card |
| 26 | | ---- |
| 27 | | 69PFCU 7220 PFCU1R 2764 |
| 28 | | 69PTS 7220 |
| 29 | | - |
| 30 | | 69PFB2 8086/8087 DFBU2J PFBU2L 2732 |
| 31 | | 69SNB RAM |
| 23 | front ^ |
| 24 | | |
| 25 | card |
| 26 | ---- |
| 27 | 69PFCU 7220 PFCU1R 2764 |
| 28 | 69PTS 7220 |
| 29 | - |
| 30 | 69PFB2 8086/8087 DFBU2J PFBU2L 2732 |
| 31 | 69SNB RAM |
| 32 | 32 | |
| 33 | 33 | ---------------------------------------------------------------------------- |
| 34 | | i/o memory map (preliminary): |
| 35 | | 0x00 - 0x1f DMA |
| 36 | | 0x20 - 0x23 i8259 master |
| 37 | | 0x28 - 0x2f i8259 slave (even), pit8253 (odd) |
| 38 | | 0x30 - 0x37 serial i8251, even #1 / odd #2 |
| 39 | | 0x38 - 0x3f DMA segments |
| 40 | | 0x40 - 0x43 upd7220, even chr / odd bitmap |
| 41 | | 0x48 - 0x4f keyboard |
| 42 | | 0x50 - 0x53 upd765 |
| 43 | | 0x58 rtc |
| 44 | | 0x5a - 0x5e APU |
| 45 | | 0x60 MPU (melody) |
| 46 | | 0x61 - 0x67 (Mirror of pit8253?) |
| 47 | | 0x68 - 0x6f parallel port |
| 34 | i/o memory map (preliminary): |
| 35 | 0x00 - 0x1f DMA |
| 36 | 0x20 - 0x23 i8259 master |
| 37 | 0x28 - 0x2f i8259 slave (even), pit8253 (odd) |
| 38 | 0x30 - 0x37 serial i8251, even #1 / odd #2 |
| 39 | 0x38 - 0x3f DMA segments |
| 40 | 0x40 - 0x43 upd7220, even chr / odd bitmap |
| 41 | 0x48 - 0x4f keyboard |
| 42 | 0x50 - 0x53 upd765 |
| 43 | 0x58 rtc |
| 44 | 0x5a - 0x5e APU |
| 45 | 0x60 MPU (melody) |
| 46 | 0x61 - 0x67 (Mirror of pit8253?) |
| 47 | 0x68 - 0x6f parallel port |
| 48 | 48 | |
| 49 | 49 | ---------------------------------------------------------------------------- |
| 50 | 50 | 0xfe3c2: checks if the floppy has a valid string for booting (either "CP/M-86" |
| r19030 | r19031 | |
| 172 | 172 | int xi,yi; |
| 173 | 173 | int x; |
| 174 | 174 | UINT8 char_size; |
| 175 | | // UINT8 interlace_on; |
| 175 | // UINT8 interlace_on; |
| 176 | 176 | |
| 177 | | // if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off |
| 178 | | // return; |
| 177 | // if(state->m_video_ff[DISPLAY_REG] == 0) //screen is off |
| 178 | // return; |
| 179 | 179 | |
| 180 | | // interlace_on = state->m_video_reg[2] == 0x10; /* TODO: correct? */ |
| 180 | // interlace_on = state->m_video_reg[2] == 0x10; /* TODO: correct? */ |
| 181 | 181 | char_size = 16; |
| 182 | 182 | |
| 183 | 183 | for(x=0;x<pitch;x++) |
| 184 | 184 | { |
| 185 | 185 | UINT8 tile_data; |
| 186 | | // UINT8 secret,reverse,u_line,v_line; |
| 186 | // UINT8 secret,reverse,u_line,v_line; |
| 187 | 187 | UINT8 color; |
| 188 | 188 | UINT8 tile,attr,pen; |
| 189 | 189 | UINT32 tile_addr; |
| 190 | 190 | |
| 191 | | // tile_addr = addr+(x*(state->m_video_ff[WIDTH40_REG]+1)); |
| 191 | // tile_addr = addr+(x*(state->m_video_ff[WIDTH40_REG]+1)); |
| 192 | 192 | tile_addr = addr+(x*(1)); |
| 193 | 193 | |
| 194 | 194 | tile = state->m_video_ram_1[(tile_addr*2+1) & 0x1fff] & 0x007f; |
| 195 | 195 | attr = (state->m_video_ram_1[(tile_addr*2 & 0x1fff) | 0x2000] & 0x00ff); |
| 196 | 196 | |
| 197 | | // secret = (attr & 1) ^ 1; |
| 197 | // secret = (attr & 1) ^ 1; |
| 198 | 198 | //blink = attr & 2; |
| 199 | | // reverse = attr & 4; |
| 200 | | // u_line = attr & 8; |
| 201 | | // v_line = attr & 0x10; |
| 199 | // reverse = attr & 4; |
| 200 | // u_line = attr & 8; |
| 201 | // v_line = attr & 0x10; |
| 202 | 202 | color = (attr & 0xe0) >> 5; |
| 203 | 203 | |
| 204 | 204 | for(yi=0;yi<lr;yi++) |
| r19030 | r19031 | |
| 207 | 207 | { |
| 208 | 208 | int res_x,res_y; |
| 209 | 209 | |
| 210 | | // res_x = (x*8+xi) * (state->m_video_ff[WIDTH40_REG]+1); |
| 210 | // res_x = (x*8+xi) * (state->m_video_ff[WIDTH40_REG]+1); |
| 211 | 211 | res_x = (x*8+xi) * (1); |
| 212 | 212 | res_y = y*lr+yi; |
| 213 | 213 | |
| 214 | 214 | if(res_x > 640 || res_y > char_size*25) //TODO |
| 215 | 215 | continue; |
| 216 | 216 | |
| 217 | | // tile_data = secret ? 0 : (state->m_char_rom[tile*char_size+interlace_on*0x800+yi]); |
| 217 | // tile_data = secret ? 0 : (state->m_char_rom[tile*char_size+interlace_on*0x800+yi]); |
| 218 | 218 | tile_data = (state->m_char_rom[tile+yi*0x80]); |
| 219 | 219 | |
| 220 | | // if(reverse) { tile_data^=0xff; } |
| 221 | | // if(u_line && yi == 7) { tile_data = 0xff; } |
| 222 | | // if(v_line) { tile_data|=8; } |
| 220 | // if(reverse) { tile_data^=0xff; } |
| 221 | // if(u_line && yi == 7) { tile_data = 0xff; } |
| 222 | // if(v_line) { tile_data|=8; } |
| 223 | 223 | |
| 224 | 224 | if(cursor_on && cursor_addr == tile_addr) |
| 225 | 225 | tile_data^=0xff; |
| r19030 | r19031 | |
| 232 | 232 | if(pen) |
| 233 | 233 | bitmap.pix16(res_y, res_x) = pen; |
| 234 | 234 | |
| 235 | | // if(state->m_video_ff[WIDTH40_REG]) |
| 236 | | // { |
| 237 | | // if(res_x+1 > 640 || res_y > char_size*25) //TODO |
| 238 | | // continue; |
| 235 | // if(state->m_video_ff[WIDTH40_REG]) |
| 236 | // { |
| 237 | // if(res_x+1 > 640 || res_y > char_size*25) //TODO |
| 238 | // continue; |
| 239 | 239 | |
| 240 | | // bitmap.pix16(res_y, res_x+1) = pen; |
| 241 | | // } |
| 240 | // bitmap.pix16(res_y, res_x+1) = pen; |
| 241 | // } |
| 242 | 242 | } |
| 243 | 243 | } |
| 244 | 244 | } |
| r19030 | r19031 | |
| 387 | 387 | |
| 388 | 388 | static ADDRESS_MAP_START( apc_map, AS_PROGRAM, 16, apc_state ) |
| 389 | 389 | AM_RANGE(0x00000, 0x9ffff) AM_RAM |
| 390 | | // AM_RANGE(0xa0000, 0xaffff) space for an external ROM |
| 390 | // AM_RANGE(0xa0000, 0xaffff) space for an external ROM |
| 391 | 391 | AM_RANGE(0xfe000, 0xfffff) AM_ROM AM_REGION("ipl", 0) |
| 392 | 392 | ADDRESS_MAP_END |
| 393 | 393 | |
| r19030 | r19031 | |
| 396 | 396 | AM_RANGE(0x00, 0x1f) AM_READWRITE8(apc_dma_r, apc_dma_w,0xff00) |
| 397 | 397 | AM_RANGE(0x20, 0x23) AM_DEVREADWRITE8_LEGACY("pic8259_master", pic8259_r, pic8259_w, 0x00ff) // i8259 |
| 398 | 398 | AM_RANGE(0x28, 0x2f) AM_READWRITE8(apc_port_28_r, apc_port_28_w, 0xffff) |
| 399 | | // 0x30, 0x37 serial port 0/1 (i8251) (even/odd) |
| 399 | // 0x30, 0x37 serial port 0/1 (i8251) (even/odd) |
| 400 | 400 | AM_RANGE(0x38, 0x3f) AM_WRITE8(apc_dma_segments_w,0x00ff) |
| 401 | 401 | AM_RANGE(0x40, 0x43) AM_READWRITE8(apc_gdc_r, apc_gdc_w, 0xffff) |
| 402 | 402 | // 0x46 UPD7220 reset interrupt |
| 403 | 403 | AM_RANGE(0x48, 0x4f) AM_READWRITE8(apc_kbd_r, apc_kbd_w, 0x00ff) |
| 404 | 404 | AM_RANGE(0x50, 0x53) AM_DEVICE8("upd765", upd765a_device, map, 0x00ff ) // upd765 |
| 405 | | // 0x5a APU data (Arithmetic Processing Unit!) |
| 406 | | // 0x5e APU status/command |
| 405 | // 0x5a APU data (Arithmetic Processing Unit!) |
| 406 | // 0x5e APU status/command |
| 407 | 407 | AM_RANGE(0x60, 0x67) AM_READWRITE8(apc_port_60_r, apc_port_60_w, 0xffff) |
| 408 | | // 0x60 Melody Processing Unit |
| 409 | | // AM_RANGE(0x68, 0x6f) i8255 , printer port (A: status (R) B: data (W) C: command (W)) |
| 410 | | // AM_DEVREADWRITE8("upd7220_btm", upd7220_device, read, write, 0x00ff) |
| 408 | // 0x60 Melody Processing Unit |
| 409 | // AM_RANGE(0x68, 0x6f) i8255 , printer port (A: status (R) B: data (W) C: command (W)) |
| 410 | // AM_DEVREADWRITE8("upd7220_btm", upd7220_device, read, write, 0x00ff) |
| 411 | 411 | ADDRESS_MAP_END |
| 412 | 412 | |
| 413 | 413 | static INPUT_PORTS_START( apc ) |
| r19030 | r19031 | |
| 468 | 468 | |
| 469 | 469 | void apc_state::fdc_drq(bool state) |
| 470 | 470 | { |
| 471 | | // printf("%02x DRQ\n",state); |
| 472 | | // i8237_dreq0_w(m_dma, state); |
| 471 | // printf("%02x DRQ\n",state); |
| 472 | // i8237_dreq0_w(m_dma, state); |
| 473 | 473 | m_dmac->dreq1_w(state); |
| 474 | 474 | |
| 475 | 475 | } |
| 476 | 476 | |
| 477 | 477 | void apc_state::fdc_irq(bool state) |
| 478 | 478 | { |
| 479 | | // printf("IRQ %d\n",state); |
| 479 | // printf("IRQ %d\n",state); |
| 480 | 480 | pic8259_ir3_w(machine().device("pic8259_slave"), state); |
| 481 | 481 | } |
| 482 | 482 | |
| r19030 | r19031 | |
| 628 | 628 | |
| 629 | 629 | m_dmac->hack_w(state); |
| 630 | 630 | |
| 631 | | // printf("%02x HLDA\n",state); |
| 631 | // printf("%02x HLDA\n",state); |
| 632 | 632 | } |
| 633 | 633 | |
| 634 | 634 | WRITE_LINE_MEMBER( apc_state::apc_tc_w ) |
| r19030 | r19031 | |
| 655 | 655 | address_space &program = m_maincpu->space(AS_PROGRAM); |
| 656 | 656 | offs_t addr = (m_dma_offset[m_dack] << 16) | offset; |
| 657 | 657 | |
| 658 | | // printf("%08x %02x\n",addr,data); |
| 658 | // printf("%08x %02x\n",addr,data); |
| 659 | 659 | |
| 660 | 660 | program.write_byte(addr, data); |
| 661 | 661 | } |
| r19030 | r19031 | |
| 673 | 673 | |
| 674 | 674 | READ8_MEMBER(apc_state::test_r) |
| 675 | 675 | { |
| 676 | | // printf("2dd DACK R\n"); |
| 676 | // printf("2dd DACK R\n"); |
| 677 | 677 | |
| 678 | 678 | return m_fdc->dma_r(); |
| 679 | 679 | } |
| r19030 | r19031 | |
| 767 | 767 | ROM_LOAD16_BYTE( "pfbu2j.bin", 0x00000, 0x001000, CRC(86970df5) SHA1(be59c5dad3bd8afc21e9f2f1404553d4371978be) ) |
| 768 | 768 | ROM_LOAD16_BYTE( "pfbu2l.bin", 0x00001, 0x001000, CRC(38df2e70) SHA1(a37ccaea00c2b290610d354de08b489fa897ec48) ) |
| 769 | 769 | |
| 770 | | // ROM_REGION( 0x10000, "file", ROMREGION_ERASE00 ) |
| 771 | | // ROM_LOAD( "sioapc.o", 0, 0x10000, CRC(1) SHA1(1) ) |
| 770 | // ROM_REGION( 0x10000, "file", ROMREGION_ERASE00 ) |
| 771 | // ROM_LOAD( "sioapc.o", 0, 0x10000, CRC(1) SHA1(1) ) |
| 772 | 772 | |
| 773 | 773 | ROM_REGION( 0x2000, "gfx", ROMREGION_ERASE00 ) |
| 774 | 774 | ROM_LOAD("pfcu1r.bin", 0x000000, 0x002000, CRC(683efa94) SHA1(43157984a1746b2e448f3236f571011af9a3aa73) ) |
trunk/src/mess/drivers/ng_aes.c
| r19030 | r19031 | |
| 92 | 92 | if(neocd.cd == NULL) // no cd is there, bail out |
| 93 | 93 | return QChannelData; |
| 94 | 94 | |
| 95 | | // NeoCDSectorLBA |
| 95 | // NeoCDSectorLBA |
| 96 | 96 | switch (CDEmuStatus) { |
| 97 | 97 | case reading: |
| 98 | 98 | case playing: { |
| 99 | | |
| 99 | |
| 100 | 100 | UINT32 msf; |
| 101 | 101 | msf = lba_to_msf_alt(NeoCDSectorLBA+150); |
| 102 | 102 | |
| 103 | 103 | |
| 104 | 104 | |
| 105 | 105 | QChannelData[0] = cdrom_get_track(neocd.cd, NeoCDSectorLBA); |
| 106 | | |
| 106 | |
| 107 | 107 | QChannelData[1] = (msf >> 16)&0xff; |
| 108 | 108 | QChannelData[2] = (msf >> 8)&0xff; |
| 109 | 109 | QChannelData[3] = (msf >> 0)&0xff; |
| 110 | | |
| 110 | |
| 111 | 111 | int elapsedlba; |
| 112 | 112 | elapsedlba = NeoCDSectorLBA - neocd.toc->tracks[ cdrom_get_track(neocd.cd, NeoCDSectorLBA) ].physframeofs; |
| 113 | 113 | msf = lba_to_msf_alt (elapsedlba); |
| r19030 | r19031 | |
| 115 | 115 | QChannelData[4] = (msf >> 16)&0xff; |
| 116 | 116 | QChannelData[5] = (msf >> 8)&0xff; |
| 117 | 117 | QChannelData[6] = (msf >> 0)&0xff; |
| 118 | | |
| 118 | |
| 119 | 119 | if (QChannelData[0]==1) |
| 120 | 120 | QChannelData[7] = 0x4; |
| 121 | 121 | else |
| r19030 | r19031 | |
| 140 | 140 | |
| 141 | 141 | static unsigned char TOCEntry[4]; |
| 142 | 142 | |
| 143 | | if(neocd.cd == NULL) |
| 143 | if(neocd.cd == NULL) |
| 144 | 144 | return TOCEntry; |
| 145 | 145 | |
| 146 | 146 | |
| r19030 | r19031 | |
| 252 | 252 | static void MapVectorTable(bool bMapBoardROM) |
| 253 | 253 | { |
| 254 | 254 | /* |
| 255 | | if (!bMapBoardROM && Neo68KROMActive) { |
| 256 | | SekMapMemory(Neo68KFix[nNeoActiveSlot], 0x000000, 0x0003FF, SM_ROM); |
| 257 | | } else { |
| 258 | | SekMapMemory(NeoVectorActive, 0x000000, 0x0003FF, SM_ROM); |
| 259 | | } |
| 260 | | */ |
| 255 | if (!bMapBoardROM && Neo68KROMActive) { |
| 256 | SekMapMemory(Neo68KFix[nNeoActiveSlot], 0x000000, 0x0003FF, SM_ROM); |
| 257 | } else { |
| 258 | SekMapMemory(NeoVectorActive, 0x000000, 0x0003FF, SM_ROM); |
| 259 | } |
| 260 | */ |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | |
| r19030 | r19031 | |
| 404 | 404 | |
| 405 | 405 | void ng_aes_state::SekWriteWord(UINT32 a, UINT16 d) |
| 406 | 406 | { |
| 407 | | // printf("write word %08x %04x\n", a, d); |
| 407 | // printf("write word %08x %04x\n", a, d); |
| 408 | 408 | curr_space->write_word(a,d); |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | void ng_aes_state::SekWriteByte(UINT32 a, UINT8 d) |
| 412 | 412 | { |
| 413 | | // printf("write byte %08x %02x\n", a, d); |
| 413 | // printf("write byte %08x %02x\n", a, d); |
| 414 | 414 | curr_space->write_byte(a,d); |
| 415 | 415 | } |
| 416 | 416 | |
| 417 | 417 | UINT32 ng_aes_state::SekReadByte(UINT32 a) |
| 418 | 418 | { |
| 419 | | // printf("read byte %08x\n", a); |
| 419 | // printf("read byte %08x\n", a); |
| 420 | 420 | return curr_space->read_byte(a); |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | 423 | |
| 424 | 424 | UINT32 ng_aes_state::SekReadWord(UINT32 a) |
| 425 | 425 | { |
| 426 | | // printf("read WORD %08x\n", a); |
| 426 | // printf("read WORD %08x\n", a); |
| 427 | 427 | return curr_space->read_word(a); |
| 428 | 428 | } |
| 429 | 429 | |
| r19030 | r19031 | |
| 947 | 947 | if ((nff0002 & 0x0500)) { |
| 948 | 948 | if (NeoCDAssyStatus == 1 && bNeoCDLoadSector) { |
| 949 | 949 | |
| 950 | | // if (LC8951RegistersW[10] & 0x80) { |
| 950 | // if (LC8951RegistersW[10] & 0x80) { |
| 951 | 951 | NeoCDSectorLBA++; |
| 952 | 952 | NeoCDSectorLBA = CDEmuLoadSector(NeoCDSectorLBA, NeoCDSectorData + 4) -1; |
| 953 | | // } |
| 953 | // } |
| 954 | 954 | |
| 955 | 955 | if (LC8951RegistersW[10] & 0x80) { |
| 956 | 956 | LC8951UpdateHeader(); |
| 957 | | |
| 957 | |
| 958 | 958 | LC8951RegistersR[12] = 0x80; // STAT0 |
| 959 | 959 | LC8951RegistersR[13] = 0; // STAT1 |
| 960 | 960 | LC8951RegistersR[14] = 0x10; // STAT2 |
| 961 | 961 | LC8951RegistersR[15] = 0; // STAT3 |
| 962 | | |
| 963 | | // bprintf(PRINT_IMPORTANT, _T(" Sector %08i (%02i:%02i:%02i) read\n"), NeoCDSectorLBA, NeoCDSectorMin, NeoCDSectorSec, NeoCDSectorFrm); |
| 964 | 962 | |
| 963 | // bprintf(PRINT_IMPORTANT, _T(" Sector %08i (%02i:%02i:%02i) read\n"), NeoCDSectorLBA, NeoCDSectorMin, NeoCDSectorSec, NeoCDSectorFrm); |
| 964 | |
| 965 | 965 | // CDZ protection hack? (error correction on the CDC should correct this?) |
| 966 | 966 | #if 1 |
| 967 | 967 | if (NeoCDSectorData[4 + 64] == 'g' && !strncmp(NeoCDSectorData + 4, "Copyright by SNK", 16)) { |
| 968 | | // printf(PRINT_ERROR, _T(" simulated CDZ protection error\n")); |
| 969 | | // bprintf(PRINT_ERROR, _T(" %.70hs\n"), NeoCDSectorData + 4); |
| 970 | | |
| 968 | // printf(PRINT_ERROR, _T(" simulated CDZ protection error\n")); |
| 969 | // bprintf(PRINT_ERROR, _T(" %.70hs\n"), NeoCDSectorData + 4); |
| 970 | |
| 971 | 971 | NeoCDSectorData[4 + 64] = 'f'; |
| 972 | | |
| 973 | | // LC8951RegistersR[12] = 0x00; // STAT0 |
| 972 | |
| 973 | // LC8951RegistersR[12] = 0x00; // STAT0 |
| 974 | 974 | } |
| 975 | 975 | #endif |
| 976 | 976 | |
| 977 | 977 | nIRQAcknowledge &= ~0x20; |
| 978 | 978 | NeoCDIRQUpdate(0); |
| 979 | | |
| 979 | |
| 980 | 980 | LC8951RegistersR[1] &= ~0x20; |
| 981 | 981 | |
| 982 | | // bprintf(PRINT_IMPORTANT, _T(" DECI interrupt triggered\n")); |
| 982 | // bprintf(PRINT_IMPORTANT, _T(" DECI interrupt triggered\n")); |
| 983 | 983 | } |
| 984 | 984 | } |
| 985 | 985 | |
| 986 | 986 | bNeoCDLoadSector = true; |
| 987 | | // bNeoCDLoadSector = false; |
| 987 | // bNeoCDLoadSector = false; |
| 988 | 988 | } |
| 989 | 989 | } |
| 990 | 990 | |
| r19030 | r19031 | |
| 992 | 992 | |
| 993 | 993 | UINT8 ng_aes_state::neogeoReadTransfer(UINT32 sekAddress, int is_byte_transfer) |
| 994 | 994 | { |
| 995 | | // if ((sekAddress & 0x0FFFFF) < 16) |
| 996 | | // printf(PRINT_NORMAL, _T(" - NGCD port 0x%06X read (byte, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1)); |
| 997 | | |
| 995 | // if ((sekAddress & 0x0FFFFF) < 16) |
| 996 | // printf(PRINT_NORMAL, _T(" - NGCD port 0x%06X read (byte, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1)); |
| 997 | |
| 998 | 998 | sekAddress ^= 1; |
| 999 | 999 | |
| 1000 | 1000 | switch (nActiveTransferArea) { |
| r19030 | r19031 | |
| 1012 | 1012 | return NeoTextRAM[(sekAddress & 0x3FFFF) >> 1]; |
| 1013 | 1013 | break; |
| 1014 | 1014 | } |
| 1015 | | |
| 1015 | |
| 1016 | 1016 | return ~0; |
| 1017 | 1017 | } |
| 1018 | 1018 | |
| 1019 | 1019 | |
| 1020 | 1020 | void ng_aes_state::neogeoWriteTransfer(UINT32 sekAddress, UINT8 byteValue, int is_byte_transfer) |
| 1021 | 1021 | { |
| 1022 | | // if ((sekAddress & 0x0FFFFF) < 16) |
| 1023 | | // bprintf(PRINT_NORMAL, _T(" - Transfer: 0x%06X -> 0x%02X (PC: 0x%06X)\n"), sekAddress, byteValue, SekGetPC(-1)); |
| 1022 | // if ((sekAddress & 0x0FFFFF) < 16) |
| 1023 | // bprintf(PRINT_NORMAL, _T(" - Transfer: 0x%06X -> 0x%02X (PC: 0x%06X)\n"), sekAddress, byteValue, SekGetPC(-1)); |
| 1024 | 1024 | |
| 1025 | 1025 | if (!nTransferWriteEnable) { |
| 1026 | | // return; |
| 1026 | // return; |
| 1027 | 1027 | } |
| 1028 | 1028 | int address; |
| 1029 | 1029 | |
| r19030 | r19031 | |
| 1033 | 1033 | switch (nActiveTransferArea) { |
| 1034 | 1034 | case 0: // Sprites |
| 1035 | 1035 | address = (nSpriteTransferBank + (sekAddress & 0x0FFFFF)); |
| 1036 | | |
| 1036 | |
| 1037 | 1037 | // wtf? is this just due to how we decode the sprite gfx or is something bad happening? |
| 1038 | 1038 | if ((address&3)==0) NeoSpriteRAM[address] = byteValue; |
| 1039 | 1039 | if ((address&3)==1) NeoSpriteRAM[address^3] = byteValue; |
| 1040 | 1040 | if ((address&3)==2) NeoSpriteRAM[address^3] = byteValue; |
| 1041 | 1041 | if ((address&3)==3) NeoSpriteRAM[address] = byteValue; |
| 1042 | 1042 | |
| 1043 | | // NeoCDOBJBankUpdate[nSpriteTransferBank >> 20] = true; |
| 1043 | // NeoCDOBJBankUpdate[nSpriteTransferBank >> 20] = true; |
| 1044 | 1044 | break; |
| 1045 | 1045 | case 1: // ADPCM |
| 1046 | 1046 | YM2610ADPCMAROM[nNeoActiveSlot][nADPCMTransferBank + ((sekAddress & 0x0FFFFF) >> 1)] = byteValue; |
| r19030 | r19031 | |
| 1058 | 1058 | break; |
| 1059 | 1059 | case 5: // Text |
| 1060 | 1060 | NeoTextRAM[(sekAddress & 0x3FFFF) >> 1] = byteValue; |
| 1061 | | // NeoUpdateTextOne((sekAddress & 0x3FFFF) >> 1, byteValue); |
| 1061 | // NeoUpdateTextOne((sekAddress & 0x3FFFF) >> 1, byteValue); |
| 1062 | 1062 | break; |
| 1063 | 1063 | } |
| 1064 | 1064 | } |
| r19030 | r19031 | |
| 1067 | 1067 | |
| 1068 | 1068 | UINT16 ng_aes_state::neogeoReadWordCDROM(UINT32 sekAddress) |
| 1069 | 1069 | { |
| 1070 | | // bprintf(PRINT_NORMAL, _T(" - CDROM: 0x%06X read (word, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1)); |
| 1070 | // bprintf(PRINT_NORMAL, _T(" - CDROM: 0x%06X read (word, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1)); |
| 1071 | 1071 | |
| 1072 | 1072 | |
| 1073 | 1073 | switch (sekAddress & 0xFFFF) { |
| r19030 | r19031 | |
| 1077 | 1077 | |
| 1078 | 1078 | // LC8951 registers |
| 1079 | 1079 | case 0x0100: |
| 1080 | | // bprintf(PRINT_NORMAL, _T(" - LC8951 register read (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1080 | // bprintf(PRINT_NORMAL, _T(" - LC8951 register read (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1081 | 1081 | return nLC8951Register; |
| 1082 | 1082 | case 0x0102: { |
| 1083 | | // bprintf(PRINT_NORMAL, _T(" - LC8951 register 0x%X read (PC: 0x%06X)\n"), nLC8951Register, SekGetPC(-1)); |
| 1083 | // bprintf(PRINT_NORMAL, _T(" - LC8951 register 0x%X read (PC: 0x%06X)\n"), nLC8951Register, SekGetPC(-1)); |
| 1084 | 1084 | |
| 1085 | 1085 | INT32 reg = LC8951RegistersR[nLC8951Register]; |
| 1086 | 1086 | |
| r19030 | r19031 | |
| 1101 | 1101 | |
| 1102 | 1102 | // CD mechanism communication |
| 1103 | 1103 | case 0x0160: |
| 1104 | | return NeoCDCommsread(); |
| 1104 | return NeoCDCommsread(); |
| 1105 | 1105 | |
| 1106 | 1106 | case 0x011C: // region |
| 1107 | 1107 | return ~((0x10 | (NeoSystem & 3)) << 8); |
| 1108 | 1108 | } |
| 1109 | 1109 | |
| 1110 | 1110 | |
| 1111 | | // bprintf(PRINT_NORMAL, _T(" - NGCD port 0x%06X read (word, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1)); |
| 1111 | // bprintf(PRINT_NORMAL, _T(" - NGCD port 0x%06X read (word, PC: 0x%06X)\n"), sekAddress, SekGetPC(-1)); |
| 1112 | 1112 | |
| 1113 | 1113 | return ~0; |
| 1114 | 1114 | } |
| r19030 | r19031 | |
| 1116 | 1116 | |
| 1117 | 1117 | void ng_aes_state::neogeoWriteWordCDROM(UINT32 sekAddress, UINT16 wordValue) |
| 1118 | 1118 | { |
| 1119 | | // bprintf(PRINT_NORMAL, _T(" - NGCD port 0x%06X -> 0x%04X (PC: 0x%06X)\n"), sekAddress, wordValue, SekGetPC(-1)); |
| 1119 | // bprintf(PRINT_NORMAL, _T(" - NGCD port 0x%06X -> 0x%04X (PC: 0x%06X)\n"), sekAddress, wordValue, SekGetPC(-1)); |
| 1120 | 1120 | int byteValue = wordValue & 0xff; |
| 1121 | 1121 | |
| 1122 | 1122 | switch (sekAddress & 0xFFFE) { |
| 1123 | 1123 | case 0x0002: |
| 1124 | | // bprintf(PRINT_IMPORTANT, _T(" - NGCD Interrupt mask -> 0x%04X (PC: 0x%06X)\n"), wordValue, SekGetPC(-1)); |
| 1125 | | nff0002 = wordValue; |
| 1124 | // bprintf(PRINT_IMPORTANT, _T(" - NGCD Interrupt mask -> 0x%04X (PC: 0x%06X)\n"), wordValue, SekGetPC(-1)); |
| 1125 | nff0002 = wordValue; |
| 1126 | 1126 | |
| 1127 | 1127 | // LC8951RegistersR[1] |= 0x20; |
| 1128 | 1128 | |
| 1129 | 1129 | //if (nff0002 & 0x0500) |
| 1130 | | // nNeoCDCyclesIRQPeriod = (INT32)(12000000.0 * nBurnCPUSpeedAdjust / (256.0 * 75.0)); |
| 1130 | // nNeoCDCyclesIRQPeriod = (INT32)(12000000.0 * nBurnCPUSpeedAdjust / (256.0 * 75.0)); |
| 1131 | 1131 | //else |
| 1132 | | // nNeoCDCyclesIRQPeriod = (INT32)(12000000.0 * nBurnCPUSpeedAdjust / (256.0 * 75.0)); |
| 1132 | // nNeoCDCyclesIRQPeriod = (INT32)(12000000.0 * nBurnCPUSpeedAdjust / (256.0 * 75.0)); |
| 1133 | 1133 | |
| 1134 | 1134 | break; |
| 1135 | 1135 | |
| r19030 | r19031 | |
| 1182 | 1182 | |
| 1183 | 1183 | case 0x007E: |
| 1184 | 1184 | NeoCDDMAMode = wordValue; |
| 1185 | | // bprintf(PRINT_NORMAL, _T(" - DMA controller 0x%2X -> 0x%04X (PC: 0x%06X)\n"), sekAddress & 0xFF, wordValue, SekGetPC(-1)); |
| 1185 | // bprintf(PRINT_NORMAL, _T(" - DMA controller 0x%2X -> 0x%04X (PC: 0x%06X)\n"), sekAddress & 0xFF, wordValue, SekGetPC(-1)); |
| 1186 | 1186 | break; |
| 1187 | 1187 | |
| 1188 | 1188 | // upload DMA controller program |
| r19030 | r19031 | |
| 1195 | 1195 | case 0x008A: |
| 1196 | 1196 | case 0x008C: |
| 1197 | 1197 | case 0x008E: |
| 1198 | | // bprintf(PRINT_NORMAL, _T(" - DMA controller program[%02i] -> 0x%04X (PC: 0x%06X)\n"), sekAddress & 0x0F, wordValue, SekGetPC(-1)); |
| 1198 | // bprintf(PRINT_NORMAL, _T(" - DMA controller program[%02i] -> 0x%04X (PC: 0x%06X)\n"), sekAddress & 0x0F, wordValue, SekGetPC(-1)); |
| 1199 | 1199 | break; |
| 1200 | 1200 | |
| 1201 | 1201 | // LC8951 registers |
| 1202 | 1202 | case 0x0100: |
| 1203 | 1203 | nLC8951Register = byteValue & 0x0F; |
| 1204 | | // bprintf(PRINT_NORMAL, _T(" - LC8951 register -> 0x%02X (PC: 0x%06X)\n"), nLC8951Register, SekGetPC(-1)); |
| 1204 | // bprintf(PRINT_NORMAL, _T(" - LC8951 register -> 0x%02X (PC: 0x%06X)\n"), nLC8951Register, SekGetPC(-1)); |
| 1205 | 1205 | break; |
| 1206 | 1206 | case 0x0102: |
| 1207 | | // bprintf(PRINT_NORMAL, _T(" - LC8951 register 0x%X -> 0x%02X (PC: 0x%06X)\n"), nLC8951Register, byteValue, SekGetPC(-1)); |
| 1207 | // bprintf(PRINT_NORMAL, _T(" - LC8951 register 0x%X -> 0x%02X (PC: 0x%06X)\n"), nLC8951Register, byteValue, SekGetPC(-1)); |
| 1208 | 1208 | switch (nLC8951Register) { |
| 1209 | 1209 | case 3: // DBCH |
| 1210 | 1210 | LC8951RegistersW[ 3] = byteValue & 0x0F; |
| r19030 | r19031 | |
| 1217 | 1217 | LC8951RegistersW[ 7] = ~0x00; |
| 1218 | 1218 | LC8951RegistersR[ 1] &= ~0x40; |
| 1219 | 1219 | break; |
| 1220 | | // case 10: |
| 1221 | | // LC8951RegistersW[nLC8951Register] = byteValue; |
| 1222 | | // bprintf(PRINT_NORMAL, _T(" - CTRL0 -> %02X (PC: 0x%06X)\n"), LC8951RegistersW[nLC8951Register], byteValue, SekGetPC(-1)); |
| 1223 | | // break; |
| 1220 | // case 10: |
| 1221 | // LC8951RegistersW[nLC8951Register] = byteValue; |
| 1222 | // bprintf(PRINT_NORMAL, _T(" - CTRL0 -> %02X (PC: 0x%06X)\n"), LC8951RegistersW[nLC8951Register], byteValue, SekGetPC(-1)); |
| 1223 | // break; |
| 1224 | 1224 | case 11: |
| 1225 | 1225 | LC8951RegistersW[11] = byteValue; // CTRL1 |
| 1226 | 1226 | LC8951UpdateHeader(); |
| r19030 | r19031 | |
| 1235 | 1235 | break; |
| 1236 | 1236 | |
| 1237 | 1237 | case 0x0104: |
| 1238 | | // bprintf(PRINT_NORMAL, _T(" - NGCD 0xE00000 area -> 0x%02X (PC: 0x%06X)\n"), byteValue, SekGetPC(-1)); |
| 1238 | // bprintf(PRINT_NORMAL, _T(" - NGCD 0xE00000 area -> 0x%02X (PC: 0x%06X)\n"), byteValue, SekGetPC(-1)); |
| 1239 | 1239 | nActiveTransferArea = byteValue; |
| 1240 | 1240 | break; |
| 1241 | 1241 | |
| 1242 | 1242 | case 0x0120: |
| 1243 | | // bprintf(PRINT_NORMAL, _T(" - NGCD OBJ BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1243 | // bprintf(PRINT_NORMAL, _T(" - NGCD OBJ BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1244 | 1244 | NeoSetSpriteSlot(1); |
| 1245 | 1245 | memset(NeoCDOBJBankUpdate, 0, sizeof(NeoCDOBJBankUpdate)); |
| 1246 | 1246 | break; |
| 1247 | 1247 | case 0x0122: |
| 1248 | | // bprintf(PRINT_NORMAL, _T(" - NGCD PCM BUSREQ -> 1 (PC: 0x%06X) %x\n"), SekGetPC(-1), byteValue); |
| 1248 | // bprintf(PRINT_NORMAL, _T(" - NGCD PCM BUSREQ -> 1 (PC: 0x%06X) %x\n"), SekGetPC(-1), byteValue); |
| 1249 | 1249 | break; |
| 1250 | 1250 | case 0x0126: |
| 1251 | | // bprintf(PRINT_NORMAL, _T(" - NGCD Z80 BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1251 | // bprintf(PRINT_NORMAL, _T(" - NGCD Z80 BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1252 | 1252 | curr_space->machine().scheduler().synchronize(); |
| 1253 | 1253 | curr_space->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_HALT, ASSERT_LINE); |
| 1254 | 1254 | |
| 1255 | 1255 | break; |
| 1256 | 1256 | case 0x0128: |
| 1257 | | // bprintf(PRINT_NORMAL, _T(" - NGCD FIX BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1257 | // bprintf(PRINT_NORMAL, _T(" - NGCD FIX BUSREQ -> 1 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1258 | 1258 | NeoSetTextSlot(1); |
| 1259 | 1259 | break; |
| 1260 | 1260 | |
| 1261 | 1261 | case 0x0140: |
| 1262 | | // bprintf(PRINT_NORMAL, _T(" - NGCD OBJ BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1262 | // bprintf(PRINT_NORMAL, _T(" - NGCD OBJ BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1263 | 1263 | video_reset(); |
| 1264 | 1264 | break; |
| 1265 | 1265 | case 0x0142: |
| 1266 | | // bprintf(PRINT_NORMAL, _T(" - NGCD PCM BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1266 | // bprintf(PRINT_NORMAL, _T(" - NGCD PCM BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1267 | 1267 | break; |
| 1268 | 1268 | case 0x0146: |
| 1269 | | // bprintf(PRINT_NORMAL, _T(" - NGCD Z80 BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1269 | // bprintf(PRINT_NORMAL, _T(" - NGCD Z80 BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1270 | 1270 | curr_space->machine().scheduler().synchronize(); |
| 1271 | 1271 | curr_space->machine().device("audiocpu")->execute().set_input_line(INPUT_LINE_HALT, CLEAR_LINE); |
| 1272 | 1272 | break; |
| 1273 | 1273 | case 0x0148: |
| 1274 | | // bprintf(PRINT_NORMAL, _T(" - NGCD FIX BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1274 | // bprintf(PRINT_NORMAL, _T(" - NGCD FIX BUSREQ -> 0 (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1275 | 1275 | video_reset(); |
| 1276 | 1276 | break; |
| 1277 | 1277 | |
| r19030 | r19031 | |
| 1284 | 1284 | break; |
| 1285 | 1285 | |
| 1286 | 1286 | case 0x016c: |
| 1287 | | // bprintf(PRINT_ERROR, _T(" - NGCD port 0x%06X -> 0x%02X (PC: 0x%06X)\n"), sekAddress, byteValue, SekGetPC(-1)); |
| 1287 | // bprintf(PRINT_ERROR, _T(" - NGCD port 0x%06X -> 0x%02X (PC: 0x%06X)\n"), sekAddress, byteValue, SekGetPC(-1)); |
| 1288 | 1288 | |
| 1289 | 1289 | MapVectorTable(!(byteValue == 0xFF)); |
| 1290 | 1290 | |
| r19030 | r19031 | |
| 1293 | 1293 | break; |
| 1294 | 1294 | |
| 1295 | 1295 | case 0x016e: |
| 1296 | | // bprintf(PRINT_IMPORTANT, _T(" - NGCD 0xE00000 area write access %s (0x%02X, PC: 0x%06X)\n"), byteValue ? _T("enabled") : _T("disabled"), byteValue, SekGetPC(-1)); |
| 1296 | // bprintf(PRINT_IMPORTANT, _T(" - NGCD 0xE00000 area write access %s (0x%02X, PC: 0x%06X)\n"), byteValue ? _T("enabled") : _T("disabled"), byteValue, SekGetPC(-1)); |
| 1297 | 1297 | |
| 1298 | 1298 | nTransferWriteEnable = byteValue; |
| 1299 | 1299 | break; |
| r19030 | r19031 | |
| 1301 | 1301 | case 0x0180: { |
| 1302 | 1302 | static UINT8 clara = 0; |
| 1303 | 1303 | if (!byteValue && clara) { |
| 1304 | | // bprintf(PRINT_IMPORTANT, _T(" - NGCD CD communication reset (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1305 | | // NeoCDCommsReset(); |
| 1304 | // bprintf(PRINT_IMPORTANT, _T(" - NGCD CD communication reset (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1305 | // NeoCDCommsReset(); |
| 1306 | 1306 | } |
| 1307 | | clara = byteValue; |
| 1307 | clara = byteValue; |
| 1308 | 1308 | break; |
| 1309 | 1309 | } |
| 1310 | 1310 | case 0x0182: { |
| 1311 | 1311 | static UINT8 clara = 0; |
| 1312 | 1312 | if (!byteValue && clara) { |
| 1313 | | // bprintf(PRINT_IMPORTANT, _T(" - NGCD Z80 reset (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1313 | // bprintf(PRINT_IMPORTANT, _T(" - NGCD Z80 reset (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1314 | 1314 | //ZetReset(); |
| 1315 | 1315 | } |
| 1316 | | clara = byteValue; |
| 1316 | clara = byteValue; |
| 1317 | 1317 | break; |
| 1318 | 1318 | } |
| 1319 | 1319 | case 0x01A0: |
| r19030 | r19031 | |
| 1325 | 1325 | |
| 1326 | 1326 | |
| 1327 | 1327 | default: { |
| 1328 | | // bprintf(PRINT_NORMAL, _T(" - NGCD port 0x%06X -> 0x%04X (PC: 0x%06X)\n"), sekAddress, wordValue, SekGetPC(-1)); |
| 1328 | // bprintf(PRINT_NORMAL, _T(" - NGCD port 0x%06X -> 0x%04X (PC: 0x%06X)\n"), sekAddress, wordValue, SekGetPC(-1)); |
| 1329 | 1329 | } |
| 1330 | 1330 | } |
| 1331 | | |
| 1331 | |
| 1332 | 1332 | } |
| 1333 | 1333 | |
| 1334 | 1334 | |
| r19030 | r19031 | |
| 1394 | 1394 | // Here, only bus access is used to get a rough approximation -- |
| 1395 | 1395 | // each read/write takes a single cycle, setup and everything else is ignored. |
| 1396 | 1396 | |
| 1397 | | // bprintf(PRINT_IMPORTANT, _T(" - DMA controller transfer started (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1397 | // bprintf(PRINT_IMPORTANT, _T(" - DMA controller transfer started (PC: 0x%06X)\n"), SekGetPC(-1)); |
| 1398 | 1398 | |
| 1399 | 1399 | switch (NeoCDDMAMode) { |
| 1400 | 1400 | |
| 1401 | 1401 | case 0xCFFD: { |
| 1402 | | // bprintf(PRINT_NORMAL, _T(" adr : 0x%08X - 0x%08X <- address, skip odd bytes\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 8); |
| 1402 | // bprintf(PRINT_NORMAL, _T(" adr : 0x%08X - 0x%08X <- address, skip odd bytes\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 8); |
| 1403 | 1403 | |
| 1404 | 1404 | // - DMA controller 0x7E -> 0xCFFD (PC: 0xC07CE2) |
| 1405 | 1405 | // - DMA controller program[00] -> 0xFCF5 (PC: 0xC07CE8) |
| r19030 | r19031 | |
| 1425 | 1425 | } |
| 1426 | 1426 | |
| 1427 | 1427 | case 0xE2DD: { |
| 1428 | | // bprintf(PRINT_NORMAL, _T(" copy: 0x%08X - 0x%08X <- 0x%08X - 0x%08X, skip odd bytes\n"), NeoCDDMAAddress2, NeoCDDMAAddress2 + NeoCDDMACount * 2, NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4); |
| 1428 | // bprintf(PRINT_NORMAL, _T(" copy: 0x%08X - 0x%08X <- 0x%08X - 0x%08X, skip odd bytes\n"), NeoCDDMAAddress2, NeoCDDMAAddress2 + NeoCDDMACount * 2, NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4); |
| 1429 | 1429 | |
| 1430 | 1430 | // - DMA controller 0x7E -> 0xE2DD (PC: 0xC0A190) |
| 1431 | 1431 | // - DMA controller program[00] -> 0xFCF5 (PC: 0xC0A192) |
| r19030 | r19031 | |
| 1450 | 1450 | } |
| 1451 | 1451 | |
| 1452 | 1452 | case 0xFC2D: { |
| 1453 | | // bprintf(PRINT_NORMAL, _T(" copy: 0x%08X - 0x%08X <- LC8951 external buffer, skip odd bytes\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4); |
| 1453 | // bprintf(PRINT_NORMAL, _T(" copy: 0x%08X - 0x%08X <- LC8951 external buffer, skip odd bytes\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4); |
| 1454 | 1454 | |
| 1455 | 1455 | // - DMA controller 0x7E -> 0xFC2D (PC: 0xC0A190) |
| 1456 | 1456 | // - DMA controller program[00] -> 0xFCF5 (PC: 0xC0A192) |
| r19030 | r19031 | |
| 1494 | 1494 | // - DMA controller program[14] -> 0xFCF5 (PC: 0xC0A1A0) |
| 1495 | 1495 | |
| 1496 | 1496 | case 0xFE6D: { |
| 1497 | | // bprintf(PRINT_NORMAL, _T(" copy: 0x%08X - 0x%08X <- 0x%08X - 0x%08X\n"), NeoCDDMAAddress2, NeoCDDMAAddress2 + NeoCDDMACount * 2, NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2); |
| 1497 | // bprintf(PRINT_NORMAL, _T(" copy: 0x%08X - 0x%08X <- 0x%08X - 0x%08X\n"), NeoCDDMAAddress2, NeoCDDMAAddress2 + NeoCDDMACount * 2, NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2); |
| 1498 | 1498 | |
| 1499 | 1499 | // - DMA controller 0x7E -> 0xFE6D (PC: 0xC0FD7A) |
| 1500 | 1500 | // - DMA controller program[00] -> 0xFCF5 (PC: 0xC0FD7C) |
| r19030 | r19031 | |
| 1516 | 1516 | |
| 1517 | 1517 | if (NeoCDDMAAddress2 == 0x0800) { |
| 1518 | 1518 | // MapVectorTable(false); |
| 1519 | | // bprintf(PRINT_ERROR, _T(" RAM vectors mapped (PC = 0x%08X\n"), SekGetPC(0)); |
| 1520 | | // extern INT32 bRunPause; |
| 1521 | | // bRunPause = 1; |
| 1519 | // bprintf(PRINT_ERROR, _T(" RAM vectors mapped (PC = 0x%08X\n"), SekGetPC(0)); |
| 1520 | // extern INT32 bRunPause; |
| 1521 | // bRunPause = 1; |
| 1522 | 1522 | } |
| 1523 | 1523 | break; |
| 1524 | 1524 | } |
| 1525 | 1525 | |
| 1526 | 1526 | case 0xFEF5: { |
| 1527 | | // bprintf(PRINT_NORMAL, _T(" adr : 0x%08X - 0x%08X <- address\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4); |
| 1527 | // bprintf(PRINT_NORMAL, _T(" adr : 0x%08X - 0x%08X <- address\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 4); |
| 1528 | 1528 | |
| 1529 | 1529 | // - DMA controller 0x7E -> 0xFEF5 (PC: 0xC07CE2) |
| 1530 | 1530 | // - DMA controller program[00] -> 0xFCF5 (PC: 0xC07CE8) |
| r19030 | r19031 | |
| 1548 | 1548 | } |
| 1549 | 1549 | |
| 1550 | 1550 | case 0xFFC5: { |
| 1551 | | // bprintf(PRINT_NORMAL, _T(" copy: 0x%08X - 0x%08X <- LC8951 external buffer\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2); |
| 1551 | // bprintf(PRINT_NORMAL, _T(" copy: 0x%08X - 0x%08X <- LC8951 external buffer\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2); |
| 1552 | 1552 | |
| 1553 | 1553 | // - DMA controller 0x7E -> 0xFFC5 (PC: 0xC0A190) |
| 1554 | 1554 | // - DMA controller program[00] -> 0xFCF5 (PC: 0xC0A192) |
| r19030 | r19031 | |
| 1592 | 1592 | // - DMA controller program[14] -> 0x13FC (PC: 0xC0A1A0) |
| 1593 | 1593 | |
| 1594 | 1594 | case 0xFFDD: { |
| 1595 | | // bprintf(PRINT_NORMAL, _T(" Fill: 0x%08X - 0x%08X <- 0x%04X\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2, NeoCDDMAValue1); |
| 1595 | // bprintf(PRINT_NORMAL, _T(" Fill: 0x%08X - 0x%08X <- 0x%04X\n"), NeoCDDMAAddress1, NeoCDDMAAddress1 + NeoCDDMACount * 2, NeoCDDMAValue1); |
| 1596 | 1596 | |
| 1597 | 1597 | // - DMA controller 0x7E -> 0xFFDD (PC: 0xC07CE2) |
| 1598 | 1598 | // - DMA controller program[00] -> 0xFCF5 (PC: 0xC07CE8) |
| r19030 | r19031 | |
| 1637 | 1637 | case 0: |
| 1638 | 1638 | break; |
| 1639 | 1639 | case 1: |
| 1640 | | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1640 | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1641 | 1641 | CDEmuStop(); |
| 1642 | 1642 | |
| 1643 | 1643 | NeoCDAssyStatus = 0x0E; |
| 1644 | 1644 | bNeoCDLoadSector = false; |
| 1645 | 1645 | break; |
| 1646 | 1646 | case 2: |
| 1647 | | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1647 | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1648 | 1648 | NeoCDCommsStatusFIFO[1] = NeoCDCommsCommandFIFO[3]; |
| 1649 | 1649 | switch (NeoCDCommsCommandFIFO[3]) { |
| 1650 | 1650 | |
| r19030 | r19031 | |
| 1659 | 1659 | |
| 1660 | 1660 | NeoCDCommsStatusFIFO[6] = ChannelData[3] / 10; |
| 1661 | 1661 | NeoCDCommsStatusFIFO[7] = ChannelData[3] % 10; |
| 1662 | | |
| 1662 | |
| 1663 | 1663 | NeoCDCommsStatusFIFO[8] = ChannelData[7]; |
| 1664 | 1664 | |
| 1665 | 1665 | // //bprintf(PRINT_ERROR, _T(" %02i %02i:%02i:%02i %02i:%02i:%02i %02i\n"), ChannelData[0], ChannelData[1], ChannelData[2], ChannelData[3], ChannelData[4], ChannelData[5], ChannelData[6], ChannelData[7]); |
| r19030 | r19031 | |
| 1786 | 1786 | NeoCDSectorLBA -= CD_FRAMES_PREGAP; |
| 1787 | 1787 | |
| 1788 | 1788 | CDEmuStartRead(); |
| 1789 | | // LC8951RegistersR[1] |= 0x20; |
| 1789 | // LC8951RegistersR[1] |= 0x20; |
| 1790 | 1790 | } else { |
| 1791 | 1791 | |
| 1792 | 1792 | if (CDEmuGetStatus() == reading) { |
| r19030 | r19031 | |
| 1802 | 1802 | break; |
| 1803 | 1803 | } |
| 1804 | 1804 | case 4: |
| 1805 | | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1805 | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1806 | 1806 | CDEmuPause(); |
| 1807 | 1807 | break; |
| 1808 | 1808 | case 5: |
| 1809 | | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1810 | | // NeoCDAssyStatus = 9; |
| 1811 | | // bNeoCDLoadSector = false; |
| 1809 | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1810 | // NeoCDAssyStatus = 9; |
| 1811 | // bNeoCDLoadSector = false; |
| 1812 | 1812 | break; |
| 1813 | 1813 | |
| 1814 | 1814 | case 6: |
| 1815 | | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1815 | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1816 | 1816 | NeoCDAssyStatus = 4; |
| 1817 | 1817 | bNeoCDLoadSector = false; |
| 1818 | 1818 | break; |
| 1819 | 1819 | case 7: |
| 1820 | | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1820 | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1821 | 1821 | NeoCDAssyStatus = 1; |
| 1822 | 1822 | bNeoCDLoadSector = true; |
| 1823 | 1823 | break; |
| r19030 | r19031 | |
| 1830 | 1830 | case 13: |
| 1831 | 1831 | case 14: |
| 1832 | 1832 | case 15: |
| 1833 | | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1833 | // //bprintf(PRINT_ERROR, _T(" CD comms received command %i\n"), NeoCDCommsCommandFIFO[0]); |
| 1834 | 1834 | NeoCDAssyStatus = 9; |
| 1835 | 1835 | bNeoCDLoadSector = false; |
| 1836 | 1836 | break; |
| r19030 | r19031 | |
| 1853 | 1853 | |
| 1854 | 1854 | printf("has command %02x\n", NeoCDCommsCommandFIFO[0]); |
| 1855 | 1855 | |
| 1856 | | // bprintf(PRINT_NORMAL, _T(" - CD mechanism command receive completed : 0x")); |
| 1856 | // bprintf(PRINT_NORMAL, _T(" - CD mechanism command receive completed : 0x")); |
| 1857 | 1857 | for (INT32 i = 0; i < 9; i++) { |
| 1858 | | // bprintf(PRINT_NORMAL, _T("%X"), NeoCDCommsCommandFIFO[i]); |
| 1858 | // bprintf(PRINT_NORMAL, _T("%X"), NeoCDCommsCommandFIFO[i]); |
| 1859 | 1859 | sum += NeoCDCommsCommandFIFO[i]; |
| 1860 | 1860 | } |
| 1861 | 1861 | sum = ~(sum + 5) & 0x0F; |
| 1862 | | // bprintf(PRINT_NORMAL, _T(" (CS 0x%X, %s)\n"), NeoCDCommsCommandFIFO[9], (sum == NeoCDCommsCommandFIFO[9]) ? _T("OK") : _T("NG")); |
| 1862 | // bprintf(PRINT_NORMAL, _T(" (CS 0x%X, %s)\n"), NeoCDCommsCommandFIFO[9], (sum == NeoCDCommsCommandFIFO[9]) ? _T("OK") : _T("NG")); |
| 1863 | 1863 | if (sum == NeoCDCommsCommandFIFO[9]) { |
| 1864 | 1864 | |
| 1865 | 1865 | printf("request to process command %02x\n", NeoCDCommsCommandFIFO[0]); |
| r19030 | r19031 | |
| 1892 | 1892 | |
| 1893 | 1893 | // status send complete |
| 1894 | 1894 | |
| 1895 | | // if (NeoCDCommsStatusFIFO[0] || NeoCDCommsStatusFIFO[1]) { |
| 1896 | | // INT32 sum = 0; |
| 1895 | // if (NeoCDCommsStatusFIFO[0] || NeoCDCommsStatusFIFO[1]) { |
| 1896 | // INT32 sum = 0; |
| 1897 | 1897 | // |
| 1898 | | // bprintf(PRINT_NORMAL, _T(" - CD mechanism status send completed : 0x")); |
| 1899 | | // for (INT32 i = 0; i < 9; i++) { |
| 1900 | | // bprintf(PRINT_NORMAL, _T("%X"), NeoCDCommsStatusFIFO[i]); |
| 1901 | | // sum += NeoCDCommsStatusFIFO[i]; |
| 1902 | | // } |
| 1903 | | // sum = ~(sum + 5) & 0x0F; |
| 1904 | | // bprintf(PRINT_NORMAL, _T(" (CS 0x%X, %s)\n"), NeoCDCommsStatusFIFO[9], (sum == NeoCDCommsStatusFIFO[9]) ? _T("OK") : _T("NG")); |
| 1905 | | // } |
| 1898 | // bprintf(PRINT_NORMAL, _T(" - CD mechanism status send completed : 0x")); |
| 1899 | // for (INT32 i = 0; i < 9; i++) { |
| 1900 | // bprintf(PRINT_NORMAL, _T("%X"), NeoCDCommsStatusFIFO[i]); |
| 1901 | // sum += NeoCDCommsStatusFIFO[i]; |
| 1902 | // } |
| 1903 | // sum = ~(sum + 5) & 0x0F; |
| 1904 | // bprintf(PRINT_NORMAL, _T(" (CS 0x%X, %s)\n"), NeoCDCommsStatusFIFO[9], (sum == NeoCDCommsStatusFIFO[9]) ? _T("OK") : _T("NG")); |
| 1905 | // } |
| 1906 | 1906 | |
| 1907 | | // if (NeoCDAssyStatus == 0xE) { |
| 1908 | | // NeoCDAssyStatus = 9; |
| 1909 | | // } |
| 1907 | // if (NeoCDAssyStatus == 0xE) { |
| 1908 | // NeoCDAssyStatus = 9; |
| 1909 | // } |
| 1910 | 1910 | } |
| 1911 | 1911 | |
| 1912 | 1912 | } |
| r19030 | r19031 | |
| 1956 | 1956 | } |
| 1957 | 1957 | |
| 1958 | 1958 | return NeoCDSectorData + ((LC8951RegistersW[5] << 8) | LC8951RegistersW[4]); |
| 1959 | | } |
| 1959 | } |
| 1960 | 1960 | |
| 1961 | 1961 | void ng_aes_state::LC8915EndTransfer() |
| 1962 | 1962 | { |
| r19030 | r19031 | |
| 2014 | 2014 | UINT16 ret = 0x0000; |
| 2015 | 2015 | |
| 2016 | 2016 | |
| 2017 | | |
| 2017 | |
| 2018 | 2018 | if (mem_mask & 0x00ff) |
| 2019 | 2019 | { |
| 2020 | 2020 | ret |= neogeoReadTransfer(0xe00000+ (offset*2)+1, is_byte_transfer) & 0xff; |
| r19030 | r19031 | |
| 2038 | 2038 | { |
| 2039 | 2039 | neogeoWriteTransfer(0xe00000+ (offset*2), data>>8, is_byte_transfer); |
| 2040 | 2040 | } |
| 2041 | | |
| 2041 | |
| 2042 | 2042 | if (mem_mask & 0x00ff) |
| 2043 | 2043 | { |
| 2044 | 2044 | neogeoWriteTransfer(0xe00000+ (offset*2)+1, data&0xff, is_byte_transfer); |
| r19030 | r19031 | |
| 2426 | 2426 | AM_RANGE(0x00, 0x00) AM_MIRROR(0xff00) AM_READ(audio_command_r) |
| 2427 | 2427 | AM_RANGE(0x04, 0x07) AM_MIRROR(0xff00) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) |
| 2428 | 2428 | AM_RANGE(0x08, 0x08) AM_MIRROR(0xff00) /* write - NMI enable / acknowledge? (the data written doesn't matter) */ |
| 2429 | | // AM_RANGE(0x08, 0x08) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_f000_f7ff_r) |
| 2430 | | // AM_RANGE(0x09, 0x09) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_e000_efff_r) |
| 2431 | | // AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_c000_dfff_r) |
| 2432 | | // AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_8000_bfff_r) |
| 2429 | // AM_RANGE(0x08, 0x08) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_f000_f7ff_r) |
| 2430 | // AM_RANGE(0x09, 0x09) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_e000_efff_r) |
| 2431 | // AM_RANGE(0x0a, 0x0a) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_c000_dfff_r) |
| 2432 | // AM_RANGE(0x0b, 0x0b) AM_MIRROR(0xfff0) AM_MASK(0xfff0) AM_READ(audio_cpu_bank_select_8000_bfff_r) |
| 2433 | 2433 | AM_RANGE(0x0c, 0x0c) AM_MIRROR(0xff00) AM_WRITE(audio_result_w) |
| 2434 | 2434 | AM_RANGE(0x18, 0x18) AM_MIRROR(0xff00) /* write - NMI disable? (the data written doesn't matter) */ |
| 2435 | 2435 | ADDRESS_MAP_END |