Author Topic: Robert's DK2 Misfit driver  (Read 10530 times)

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Robert's DK2 Misfit driver
« on: November 03, 2008, 05:22:19 AM »
Hi all,

Has anyone tried to get roberts DK2 driver to work on regular mame?
I can get it to compile, But when I try to load the game it crashes Mame.
I feel I am messing up the code when I convert it  :idiot:
IQ Forum Member

Offline Haze

  • MAME Devs
  • *****
  • Posts: 172
  • Karma: +46/-0
Re: Robert's DK2 Misfit driver
« Reply #1 on: November 03, 2008, 07:47:10 PM »
Code: [Select]

const eeprom_interface eeprom_interface_d2k =
{
7, // address bits 7
8, // data bits    8
"*110", // read         1 10 aaaaaa
"*101", // write        1 01 aaaaaa dddddddddddddddd
"*111", // erase        1 11 aaaaaa
"*10000xxxx", // lock         1 00 00xxxx
"*10011xxxx", // unlock       1 00 11xxxx
1,
};

static NVRAM_HANDLER( d2k )
{
if (read_or_write)
eeprom_save(file);
else
{
eeprom_init(&eeprom_interface_d2k);
if (file) eeprom_load(file);
}
}

static READ8_HANDLER( d2k_eeprom_r )
{
return eeprom_read_bit();
}

static WRITE8_HANDLER( d2k_eeprom_w )
{
eeprom_write_bit(data & 1);
eeprom_set_clock_line( (data & 2) ? ASSERT_LINE : CLEAR_LINE );
eeprom_set_cs_line( (data & 4) ? CLEAR_LINE : ASSERT_LINE );
}

static WRITE8_HANDLER( d2k_bank_w )
{
memory_set_bank(1, data & 1 );
memory_set_bank(2, data & 1 );
}

static ADDRESS_MAP_START( d2k_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x5fff) AM_READWRITE(SMH_BANK1, 0)
AM_RANGE(0x6000, 0x6bff) AM_RAM
AM_RANGE(0x7000, 0x73ff) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
AM_SIZE_MEMBER(dkong_state, sprite_ram_size)  /* sprite set 1 */
AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w)
AM_BASE_MEMBER(dkong_state, video_ram)
AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE(DMA8257, "dma8257", dma8257_r, dma8257_w) /* P8257 control registers */
AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_LATCH8_WRITE("ls175.3d")      /* IN0, sound CPU intf */
AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(radarscp_grid_color_w)  /* IN1 */

AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r)   /* IN2 */
AM_RANGE(0x7d00, 0x7d07) AM_DEVWRITE(LATCH8, "ls259.6h", latch8_bit0_w)       /* Sound signals */

AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w)   /* DSW0 */
AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w)
AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w)   /* 2 PSL Signal */
AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
AM_RANGE(0x7d85, 0x7d85) AM_DEVWRITE(DMA8257, "dma8257", p8257_drq_w)   /* P8257 ==> /DRQ0 /DRQ1 */
AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)

AM_RANGE(0xc800, 0xc800) AM_READWRITE(d2k_eeprom_r, d2k_eeprom_w) // what if it wants to read rom at c800?
AM_RANGE(0xe000, 0xe000) AM_WRITE(d2k_bank_w)
// seems to be a mirror of the rom below, but if I try to use SMH_BANK1 mirrored it doesn't boot? weird
AM_RANGE(0x8000, 0xffff) AM_READWRITE(SMH_BANK2, 0)
ADDRESS_MAP_END

static MACHINE_DRIVER_START( d2k )
MDRV_IMPORT_FROM(dkong2b)
MDRV_CPU_MODIFY("main")
MDRV_CPU_PROGRAM_MAP(d2k_map,0)

MDRV_NVRAM_HANDLER(d2k)
MACHINE_DRIVER_END

static DRIVER_INIT( d2k )
{
UINT8 *ROM = memory_region(machine, "main");
UINT8* buf = auto_malloc(0x10000);
int i, j;

/* data bitswap */
for( i = 0x00000; i < 0x10000; i++ )
ROM[i] = BITSWAP8( ROM[i], 1, 4, 5, 7, 6, 0, 3, 2 );

/* address scramble */
for (i = 0; i < 0x10000; i++)
{
j = BITSWAP16( i, 15, 10, 8, 9, 13, 14, 12, 11,7,6,5,4,3,2,1,0 );
buf[i] = ROM[j];
}

memcpy(ROM, buf, 0x10000);
free(buf);

memory_configure_bank(1, 0, 2, &ROM[0], 0x8000);
memory_configure_bank(2, 0, 2, &ROM[0], 0x8000);
memory_set_bank(1, 0);
memory_set_bank(2, 0);
}

ROM_START( d2k )
ROM_REGION( 0x10000, "main", ROMREGION_ERASE00 )
/* original roms present but not used */
ROM_LOAD( "d2k12.bin", 0x00000, 0x10000, CRC(6e95ca0d) SHA1(c058add0f146d577e3df0ba60828fe1734e78d01) )

ROM_REGION( 0x1800, "sound", 0 ) /* sound */
ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
ROM_RELOAD(               0x0800, 0x0800 )
ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )

ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )

ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )

ROM_REGION( 0x0300, "proms", 0 )
ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
ROM_END

ROM_START( d2k11 )
ROM_REGION( 0x10000, "main", ROMREGION_ERASE00 )
/* original roms not used */
ROM_LOAD( "d2k11.bin", 0x00000, 0x10000, CRC(2048fc42) SHA1(e427a09ed8e792ee8ce01cd0b07c6a0d5a7c5536) )

ROM_REGION( 0x1800, "sound", 0 ) /* sound */
ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
ROM_RELOAD(               0x0800, 0x0800 )
ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )

ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )

ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )

ROM_REGION( 0x0300, "proms", 0 )
ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
ROM_END

GAME( 200?, d2k,   dkong, d2k, dkong,  d2k, ROT90, "Nintendo [hack, Jeff Kulczycki]", "Donkey Kong II: Jumpman Returns (v1.2) (hack of Donkey Kong)", 0 )
GAME( 200?, d2k11, dkong, d2k, dkong,  d2k, ROT90, "Nintendo [hack, Jeff Kulczycki]", "Donkey Kong II: Jumpman Returns (v1.1) (hack of Donkey Kong)", 0 )

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: Robert's DK2 Misfit driver
« Reply #2 on: November 04, 2008, 02:14:55 AM »
Thanks Haze, now it loads :).
But it still crashes, but this time it happens when I exit the game. Maybe it is something I have done on my end, but I am not sure what....
IQ Forum Member

Offline Haze

  • MAME Devs
  • *****
  • Posts: 172
  • Karma: +46/-0
Re: Robert's DK2 Misfit driver
« Reply #3 on: November 04, 2008, 02:38:20 AM »
nah, not your fault, the code isn't really tested.

use malloc instead of
UINT8* buf = auto_malloc(0x10000);

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: Robert's DK2 Misfit driver
« Reply #4 on: November 04, 2008, 02:50:29 AM »
Thanks, that fixed it :)
IQ Forum Member

Offline CaptainCPS

  • FBA Dev
  • ******
  • Posts: 1513
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: Robert's DK2 Misfit driver
« Reply #5 on: November 04, 2008, 04:35:04 AM »
Interesting stuff ^^  :biggrin:

SeeYaa!
 :biggrin:

Offline Cthulhu32

  • Newbies
  • *
  • Posts: 1
  • Karma: +0/-1
Re: Robert's DK2 Misfit driver
« Reply #6 on: November 19, 2008, 11:08:58 AM »
Damn thats pretty clean Haze. I came up with a solution before I was referred to this post, and its not nearly as clean and it uses the dkong_base machine driver.

Code: [Select]
static MACHINE_START( d2k )
{
dkong_state *state = machine->driver_data;

state->hardware_type = HARDWARE_TKG04;

state_save_register_global(state->dma_latch);

}

const eeprom_interface eeprom_interface_d2k =
{
7, // address bits 7
8, // data bits    8
"*110", // read         1 10 aaaaaa
"*101", // write        1 01 aaaaaa dddddddddddddddd
"*111", // erase        1 11 aaaaaa
"*10000xxxx", // lock         1 00 00xxxx
"*10011xxxx", // unlock       1 00 11xxxx
1,
//  "*10001xxxx"    // write all    1 00 01xxxx dddddddddddddddd
//  "*10010xxxx"    // erase all    1 00 10xxxx
};

NVRAM_HANDLER( d2k )
{
if (read_or_write)
eeprom_save(file);
else
{
eeprom_init(&eeprom_interface_d2k);
if (file) eeprom_load(file);
}
}

static READ8_HANDLER( d2k_eeprom_r )
{
return eeprom_read_bit();
}

static WRITE8_HANDLER( d2k_eeprom_w )
{
eeprom_write_bit(data & 1);
eeprom_set_clock_line( (data & 2) ? ASSERT_LINE : CLEAR_LINE );
eeprom_set_cs_line( (data & 4) ? CLEAR_LINE : ASSERT_LINE );
}

static READ8_HANDLER( d2k_eeprom_unk )
/* This address is read (result discarded), just before CS is asserted */
{
return 0;
}

static WRITE8_HANDLER( d2k_rombank_w )
{
memory_set_bank(1, data & 1 );
memory_set_bank(2, data & 1 );
}

static ADDRESS_MAP_START( d2k_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x5fff) AM_ROMBANK(1)
AM_RANGE(0x0007, 0x0007) AM_WRITENOP
AM_RANGE(0x6000, 0x68ff) AM_RAM
AM_RANGE(0x6900, 0x6a7f) AM_RAM AM_BASE_MEMBER(dkong_state, sprite_ram)
AM_SIZE_MEMBER(dkong_state, sprite_ram_size)
AM_RANGE(0x6a80, 0x73ff) AM_RAM
AM_RANGE(0x7400, 0x77ff) AM_RAM_WRITE(dkong_videoram_w)
AM_BASE_MEMBER(dkong_state, video_ram)
AM_RANGE(0x7800, 0x780f) AM_DEVREADWRITE(DMA8257, "dma8257", dma8257_r, dma8257_w)
AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_LATCH8_WRITE("ls175.3d")
AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_WRITE(radarscp_grid_color_w)
AM_RANGE(0x7d00, 0x7d00) AM_READ(dkong_in2_r)
AM_RANGE(0x7d00, 0x7d07) AM_DEVWRITE(LATCH8, "ls259.6h", latch8_bit0_w)
AM_RANGE(0x7d80, 0x7d80) AM_READ_PORT("DSW0") AM_WRITE(dkong_audio_irq_w)
AM_RANGE(0x7d81, 0x7d81) AM_WRITE(radarscp_grid_enable_w)
AM_RANGE(0x7d82, 0x7d82) AM_WRITE(dkong_flipscreen_w)
AM_RANGE(0x7d83, 0x7d83) AM_WRITE(dkong_spritebank_w)
AM_RANGE(0x7d84, 0x7d84) AM_WRITE(interrupt_enable_w)
AM_RANGE(0x7d85, 0x7d85) AM_DEVWRITE(DMA8257, "dma8257", p8257_drq_w)
AM_RANGE(0x7d86, 0x7d87) AM_WRITE(dkong_palettebank_w)
AM_RANGE(0xc000, 0xc000) AM_READ(d2k_eeprom_unk)
AM_RANGE(0xc800, 0xc800) AM_READWRITE(d2k_eeprom_r, d2k_eeprom_w)
AM_RANGE(0xd000, 0xdfff) AM_ROM
AM_RANGE(0xe000, 0xe000) AM_WRITE(d2k_rombank_w)
AM_RANGE(0xe800, 0xffff) AM_ROMBANK(2)
ADDRESS_MAP_END

static MACHINE_RESET( d2k )
{
UINT8 *ROM = memory_region(machine, "main");

MACHINE_RESET_CALL(dkong);

memory_configure_bank(1, 0, 2, &ROM[0x10000], 0x8000); // rom at 0-0x5fff is banked (dk or d2k)
memory_configure_bank(2, 0, 2, &ROM[0x16800], 0x8000); // 2nd bank

d2k_rombank_w( machine, 0, 0); // select dk at bootup
}

static MACHINE_DRIVER_START( d2k )

MDRV_IMPORT_FROM(dkong_base)

MDRV_CPU_MODIFY("main")
MDRV_CPU_PROGRAM_MAP(d2k_map,0)

MDRV_NVRAM_HANDLER(d2k)

MDRV_SCREEN_MODIFY("main")
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) // needed to disguise a bug in the test screen

MDRV_MACHINE_START(d2k)
MDRV_MACHINE_RESET(d2k)

/* sound hardware */
MDRV_IMPORT_FROM(dkong2b_audio)

MACHINE_DRIVER_END

static DRIVER_INIT( d2k )
{
UINT8 *ROM = memory_region(machine, "main");
int i, m, n;

/* Fix data lines */
for( i = 0x20000; i < 0x30000; i++ )
ROM[i] = BITSWAP8( ROM[i], 1, 4, 5, 7, 6, 0, 3, 2 );

/* Fix address lines */
for (i = 0; i < 0x100; i++)
{
m = (BITSWAP8( i, 7, 2, 0, 1, 5, 6, 4, 3 ) << 8) | 0x20000;
n = (i << 8) | 0x10000;
memcpy( &ROM[n], &ROM[m], 0x100);
}

/* the lines below are to fix a bug that appears in the test screen if the width is set any wider,
but adding this fix breaks the rom checksum. So, cheated by making the screen narrower. */
// ROM[0x14e69] = 0; // fix error in clear-screen routine - v1.2
// ROM[0x14e77] = 0; // fix error in clear-screen routine - v1.1

memcpy( &ROM[0xd000], &ROM[0x1d000], 0x1000); // mirror for E830 trickery

memory_configure_bank(1, 0, 2, &ROM[0x10000], 0x8000); // rom at 0-0x5fff is banked (dk or d2k)
memory_configure_bank(2, 0, 2, &ROM[0x16800], 0x8000); // 2nd bank

d2k_rombank_w( machine, 0, 0); // select dk at bootup
}

ROM_START( d2k )
ROM_REGION( 0x30000, "main", 0 )
ROM_LOAD( "d2k.bin",      0x20000, 0x10000, CRC(6e95ca0d) SHA1(c058add0f146d577e3df0ba60828fe1734e78d01) )

ROM_REGION( 0x1800, "sound", 0 ) /* sound */
ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
ROM_RELOAD(   0x0800, 0x0800 )
ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )

ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )

ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )

ROM_REGION( 0x0300, "proms", 0 )
ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
ROM_END

ROM_START( d2k11 )
ROM_REGION( 0x30000, "main", 0 )
ROM_LOAD( "d2k11.bin",    0x20000, 0x10000, CRC(2048fc42) SHA1(e427a09ed8e792ee8ce01cd0b07c6a0d5a7c5536) )

ROM_REGION( 0x1800, "sound", 0 ) /* sound */
ROM_LOAD( "s_3i_b.bin",   0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) )
ROM_RELOAD(   0x0800, 0x0800 )
ROM_LOAD( "s_3j_b.bin",   0x1000, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) )

ROM_REGION( 0x1000, "gfx1", ROMREGION_DISPOSE )
ROM_LOAD( "v_5h_b.bin",   0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) )
ROM_LOAD( "v_3pt.bin",    0x0800, 0x0800, CRC(15e9c5e9) SHA1(976eb1e18c74018193a35aa86cff482ebfc5cc4e) )

ROM_REGION( 0x2000, "gfx2", ROMREGION_DISPOSE )
ROM_LOAD( "l_4m_b.bin",   0x0000, 0x0800, CRC(59f8054d) SHA1(793dba9bf5a5fe76328acdfb90815c243d2a65f1) )
ROM_LOAD( "l_4n_b.bin",   0x0800, 0x0800, CRC(672e4714) SHA1(92e5d379f4838ac1fa44d448ce7d142dae42102f) )
ROM_LOAD( "l_4r_b.bin",   0x1000, 0x0800, CRC(feaa59ee) SHA1(ecf95db5a20098804fc8bd59232c66e2e0ed3db4) )
ROM_LOAD( "l_4s_b.bin",   0x1800, 0x0800, CRC(20f2ef7e) SHA1(3bc482a38bf579033f50082748ee95205b0f673d) )

ROM_REGION( 0x0300, "proms", 0 )
ROM_LOAD( "c-2k.bpr",     0x0000, 0x0100, CRC(e273ede5) SHA1(b50ec9e1837c00c20fb2a4369ec7dd0358321127) ) /* palette low 4 bits (inverted) */
ROM_LOAD( "c-2j.bpr",     0x0100, 0x0100, CRC(d6412358) SHA1(f9c872da2fe8e800574ae3bf483fb3ccacc92eb3) ) /* palette high 4 bits (inverted) */
ROM_LOAD( "v-5e.bpr",     0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */
ROM_END

GAME( 2006, d2k,   dkong, d2k, dkong,  d2k,   ROT90, "Jeff Kulczycki", "Donkey Kong II: Jumpman Returns (v1.2) [h]", GAME_SUPPORTS_SAVE )
GAME( 2006, d2k11, dkong, d2k, dkong,  d2k,   ROT90, "Jeff Kulczycki", "Donkey Kong II: Jumpman Returns (v1.1) [h]", GAME_SUPPORTS_SAVE )

I left all the hackery that was in Robbbert's d2k driver, but yours is MUCH cleaner and uses the dkong2b base instead of dkong_base which helps clean the code a lot.

Offline Virushead

  • Newbies
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Robert's DK2 Misfit driver
« Reply #7 on: January 05, 2009, 02:58:35 PM »
Has anyone got this to work in 129 yet. not sure what will need to be changed.. having trouble with mem handling. any thoughts

Offline abispac

  • Newbies
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Robert's DK2 Misfit driver
« Reply #8 on: June 04, 2009, 05:56:46 PM »
Can someone share this, maybe a tut on how to add the drivers, thanks.

Offline James33

  • Expert
  • *****
  • Posts: 532
  • Karma: +3/-0
  • The Mame Man
    • Emulation Zone
Re: Robert's DK2 Misfit driver
« Reply #9 on: June 05, 2009, 06:18:19 AM »
Yeah it works on MAME 0.131
IQ Forum Member