toaplan2:

-Found a few more fixeight opcodes, by matching code in the interrupt routines with batsugun [Alex Jackson]
-Corrected fixeight V25 address map (the YM2151 and OKI6295 are at a different location than the other games) [Alex Jackson]
-Preliminary implementation of V25/V35 port output [Alex Jackson]
This commit is contained in:
Roberto Zandona 2011-01-20 17:35:27 +00:00
parent a17a148fa0
commit 3d307f2d42
3 changed files with 34 additions and 16 deletions

View File

@ -17,10 +17,10 @@
Interrupt macro service function not implemented.
Port implementation is incomplete: only input works
for now, and mode control registers are ignored.
Port implementation is incomplete: mode control registers are ignored.
Timer implementation is crude and incomplete.
Timer implementation is incomplete: polling is not implemented
(reading any of the registers just returns the last value written)
Serial interface and DMA functions not implemented.
Note that these functions differ considerably between

View File

@ -166,6 +166,16 @@ static void write_sfr(v25_state_t *nec_state, unsigned o, UINT8 d)
switch(o)
{
case 0x00: /* P0 */
nec_state->io->write_byte(V25_PORT_P0, d);
break;
case 0x08: /* P1 */
/* only the upper four bits of P1 can be used as output */
nec_state->io->write_byte(V25_PORT_P1, d & 0xF0);
break;
case 0x10: /* P2 */
nec_state->io->write_byte(V25_PORT_P2, d);
break;
case 0x4C: /* EXIC0 */
write_irqcontrol(nec_state, INTP0, d);
nec_state->priority_intp = d & 0x7;

View File

@ -1801,6 +1801,13 @@ static ADDRESS_MAP_START( V25_rambased_nooki_mem, ADDRESS_SPACE_PROGRAM, 8 )
ADDRESS_MAP_END
static ADDRESS_MAP_START( V25_fixeight_mem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000a, 0x0000b) AM_DEVREADWRITE("ymsnd", ym2151_r, ym2151_w)
AM_RANGE(0x0000c, 0x0000c) AM_DEVREADWRITE_MODERN("oki", okim6295_device, read, write)
AM_RANGE(0x80000, 0x87fff) AM_MIRROR(0x78000) AM_RAM AM_BASE_MEMBER(toaplan2_state, batsugun_share)
ADDRESS_MAP_END
static ADDRESS_MAP_START( V25_port, ADDRESS_SPACE_IO, 8 )
AM_RANGE(V25_PORT_PT, V25_PORT_PT) AM_READ(v25_dswa_read)
AM_RANGE(V25_PORT_P0, V25_PORT_P0) AM_READ(v25_dswb_read)
@ -3627,30 +3634,30 @@ static const UINT8 ts001turbo_decryption_table[256] = {
/*r*//*r*//*r*//*r*//*r*//*r*//*r*/ /*r*//*r*//*r*//*r*//*r*/ /*r*//*r*/
0x10,0x11,0x12,0x5d,0x81,0x3c,0xb5,0x83, 0x68,0xff,0x75,0x75,0x8d,0x5b,0x8a,0x38, /* 10 */
/*r*//*r*//*r*//*r*//*r*/ /*r*//*r*//*r*//*r*//*r*//*r*//*r*//*r*/
0x20,0xeb,0xd2,0x0a,0xb4,0xc7,0x46,0xd1, 0x0a,0x53,0xbd,0x2b,0x2c,0xff,0x2e,0x03, /* 20 */
/*r*//*r*//*r*//*r*//*r*//*r*//*r*/ /*r*//*r*//*r*/ /*r*/ /*r*/
0x8b,0xeb,0xd2,0x0a,0xb4,0xc7,0x46,0xd1, 0x0a,0x53,0xbd,0x2b,0x2c,0xff,0x2e,0x03, /* 20 */
/*a*//*r*//*r*//*r*//*r*//*r*//*r*//*r*/ /*r*//*r*//*r*/ /*r*/ /*r*/
0xfb,0x45,0xc3,0x02,0x34,0x0f,0x36,0x02, 0x0f,0xb7,0x3a,0x24,0xc6,0xeb,0x3e,0x32, /* 30 */
/*r*//*r*//*r*//*r*/ /*r*/ /*r*/ /*r*//*r*/ /*r*//*r*//*r*/ /*r*/
0x8d,0xb9,0xfe,0x08,0x88,0x45,0x8a,0x8a, 0x75,0x8a,0xbd,0x58,0xfe,0x51,0x1e,0x8b, /* 40 */
/*r*//*r*//*r*//*r*//*r*/ /*r*//*r*/ /*r*//*r*//*r*//*r*//*r*//*r*//*r*//*r*/
0x0f,0x51,0xf6,0x53,0xc3,0x36,0x03,0x8d, 0xbb,0x59,0xbc,0x5b,0x0f,0x5e,0x5e,0x2e, /* 50 */
/*r*/ /*r*/ /*r*//*r*//*r*//*r*/ /*r*/ /*r*/ /*r*//*r*/ /*r*/
0x60,0x61,0x59,0x63,0xbb,0x65,0x66,0x8d, 0x68,0x72,0x83,0xa4,0xc3,0xb3,0x8b,0xe9, /* 60 */
/*r*/ /*r*/ /*r*/ /*r*//*r*//*r*//*r*//*r*//*r*//*r*/
0x60,0x61,0x59,0x63,0xbb,0x65,0x66,0x8d, 0x89,0x72,0x83,0xa4,0xc3,0xb3,0x8b,0xe9, /* 60 */
/*r*/ /*r*/ /*r*/ /*a*//*r*//*r*//*r*//*r*//*r*//*r*//*r*/
0x81,0x43,0xa0,0x73,0x0f,0x55,0xf3,0x36, 0xb0,0x59,0xe8,0x03,0x26,0xe9,0x7e,0xb0, /* 70 */
/*r*//*r*//*r*/ /*r*//*r*//*r*//*r*/ /*r*//*r*//*r*//*r*//*r*//*r*/ /*r*/
0x80,0x8e,0x24,0x8a,0xd0,0x3e,0xc3,0x3a, 0x88,0x89,0x57,0x8b,0x88,0x86,0x24,0x74, /* 80 */
/*r*//*r*//*r*//*r*//*r*//*r*//*r*/ /*r*/ /*r*//*r*//*r*//*r*/
0x80,0x8e,0x24,0x8a,0xd0,0x3e,0xc3,0x3a, 0x88,0x79,0x57,0x8b,0x88,0x86,0x24,0x74, /* 80 */
/*r*//*r*//*r*//*r*//*r*//*r*//*r*/ /*a*//*r*/ /*r*//*r*//*r*//*r*/
0x33,0xc3,0x53,0xb8,0xab,0x75,0x96,0x97, 0x8e,0xb1,0xe9,0x5d,0x9c,0x02,0x3c,0x9f, /* 90 */
/*x*//*r*//*r*//*r*//*r*//*r*/ /*r*//*r*//*r*//*r*/ /*r*//*r*/
0x80,0xa1,0x89,0xe8,0xa4,0xa5,0xa6,0x74, 0xa8,0xa9,0xf6,0x88,0x4f,0x56,0x8c,0x03, /* a0 */
/*r*/ /*r*//*r*/ /*r*/ /*r*//*r*//*r*//*r*//*r*//*r*/
0x80,0xd3,0x89,0xe8,0xa4,0xa5,0xa6,0x74, 0xa8,0xa9,0xf6,0x88,0x4f,0x56,0x8c,0x03, /* a0 */
/*r*//*a*//*r*//*r*/ /*r*/ /*r*//*r*//*r*//*r*//*r*//*r*/
0x47,0xb1,0x88,0xb3,0x03,0xfe,0xb6,0xfc, 0xb8,0xb9,0x33,0x07,0xb1,0x50,0x0f,0x3e, /* b0 */
/*r*/ /*r*/ /*r*//*r*/ /*r*/ /*r*//*r*//*r*//*r*//*r*//*r*/
0xbd,0x4d,0xf3,0xbf,0x59,0xc5,0xea,0xc6, 0xc8,0x74,0x72,0xe2,0x3e,0x2e,0xce,0x2e, /* c0 */
/*r*//*r*//*r*//*r*//*r*/ /*x*//*r*/ /*r*//*r*//*r*//*r*//*r*/ /*r*/
0x2e,0x73,0x88,0x72,0x45,0x5d,0xd6,0xb9, 0x32,0x38,0x88,0xc1,0xdc,0x06,0x45,0xdf, /* d0 */
/*r*//*r*//*r*//*r*//*r*//*r*/ /*r*/ /*r*//*r*//*r*//*r*/ /*r*//*r*/
0xbd,0x4d,0xf3,0xbf,0x59,0xd2,0xea,0xc6, 0xc8,0x74,0x72,0xe2,0x3e,0x2e,0xce,0x2e, /* c0 */
/*r*//*r*//*r*//*r*//*r*//*a*//*x*//*r*/ /*r*//*r*//*r*//*r*//*r*/ /*r*/
0x2e,0x73,0x88,0x72,0x45,0x5d,0xd6,0xb9, 0x32,0x38,0x88,0xc1,0xa0,0x06,0x45,0xdf, /* d0 */
/*r*//*r*//*r*//*r*//*r*//*r*/ /*r*/ /*r*//*r*//*r*//*r*//*a*//*r*//*r*/
0xe0,0x86,0xe2,0x87,0xe4,0x8a,0xe6,0xab, 0x33,0xbe,0xea,0x32,0xbd,0xc7,0xee,0x80, /* e0 */
/*r*/ /*r*/ /*r*/ /*r*/ /*r*//*r*/ /*r*//*r*//*r*/ /*r*/
0x0f,0x75,0xf2,0xb9,0x07,0x74,0x3e,0xa2, 0x8a,0x48,0x3e,0x8d,0xeb,0xfd,0xfe,0xff, /* f0 */
@ -3668,7 +3675,7 @@ static MACHINE_CONFIG_START( fixeight, toaplan2_state )
MCFG_CPU_VBLANK_INT("screen", toaplan2_vblank_irq4)
MCFG_CPU_ADD("audiocpu", V25, XTAL_16MHz) /* NEC V25 type Toaplan marked CPU ??? */
MCFG_CPU_PROGRAM_MAP(V25_rambased_mem)
MCFG_CPU_PROGRAM_MAP(V25_fixeight_mem)
// IO map must be different - has eeprom but no dips or jumpers */
MCFG_CPU_CONFIG(ts001turbo_config)
@ -5265,3 +5272,4 @@ GAME( 1999, bkraiduj, bkraidu, bbakradu, bbakraid, bbakradu, ROT270, "Eighting"
GAME( 1999, bkraidj, bkraidu, bbakraid, bbakraid, bbakraid, ROT270, "Eighting", "Battle Bakraid (Japan) (Wed Apr 7 1999)", GAME_SUPPORTS_SAVE )