From d032999421adc4d54fc514d8b36a0d32f398119f Mon Sep 17 00:00:00 2001 From: Grantonius maximus <136645825+grant2258@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:33:04 +0000 Subject: [PATCH 1/5] Revert "Maybe" This reverts commit f1b1412f1b384a4cb68103a9ef06f83d15d40075. --- src/drivers/dkong.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/drivers/dkong.c b/src/drivers/dkong.c index 55ebd4843..41e781e8b 100644 --- a/src/drivers/dkong.c +++ b/src/drivers/dkong.c @@ -2944,27 +2944,16 @@ ROM_START( dkongx ) ROM_END ROM_START( dkremix ) -/* ROM_REGION( 0x20000, REGION_CPU1, 0 ) ROM_LOAD( "c_5et_g.bin", 0x10000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) ) ROM_LOAD( "c_5ct_g.bin", 0x11000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) ) ROM_LOAD( "c_5bt_g.bin", 0x12000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) ) ROM_LOAD( "c_5at_g.bin", 0x13000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) /* space for diagnostic ROM */ -/* + ROM_REGION( 0x20000, REGION_USER1, 0 ) ROM_LOAD( "dkremix.bin", 0x0000, 0x10000, CRC(f47c13aa) SHA1(c8516e27028d371a1f7b198f6d91f6a10bf99d3f) ) -*/ - - ROM_REGION( 0x10000, REGION_CPU1, 0 ) - ROM_LOAD( "c_5et_g.bin", 0x0000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) ) - ROM_LOAD( "c_5ct_g.bin", 0x1000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) ) - ROM_LOAD( "c_5bt_g.bin", 0x2000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) ) - ROM_LOAD( "c_5at_g.bin", 0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) - ROM_REGION( 0x10000, REGION_USER1, 0 ) - ROM_LOAD( "dkremix.bin", 0x0000, 0x10000, CRC(f47c13aa) SHA1(c8516e27028d371a1f7b198f6d91f6a10bf99d3f) ) - ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ ROM_LOAD( "s_3i_b.bin", 0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) ) ROM_RELOAD( 0x0800, 0x0800 ) From 9a45ce9b9b1cdb8aae9f6941728c494766045889 Mon Sep 17 00:00:00 2001 From: Grantonius maximus <136645825+grant2258@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:56:14 +0000 Subject: [PATCH 2/5] start changes --- src/drivers/dkong.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/drivers/dkong.c b/src/drivers/dkong.c index 41e781e8b..1bee0a4de 100644 --- a/src/drivers/dkong.c +++ b/src/drivers/dkong.c @@ -2912,14 +2912,14 @@ ROM_END /* Braze Technologies bootleg hardware */ ROM_START( dkongx ) - ROM_REGION( 0x20000, REGION_CPU1, 0 ) - ROM_LOAD( "c_5et_g.bin", 0x10000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) ) - ROM_LOAD( "c_5ct_g.bin", 0x11000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) ) - ROM_LOAD( "c_5bt_g.bin", 0x12000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) ) - ROM_LOAD( "c_5at_g.bin", 0x13000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) + ROM_REGION( 0x10000, REGION_CPU1, 0 ) + ROM_LOAD( "c_5et_g.bin", 0x0000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) ) + ROM_LOAD( "c_5ct_g.bin", 0x1000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) ) + ROM_LOAD( "c_5bt_g.bin", 0x2000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) ) + ROM_LOAD( "c_5at_g.bin", 0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) /* space for diagnostic ROM */ - ROM_REGION( 0x20000, REGION_USER1, 0 ) + ROM_REGION( 0x10000, REGION_USER1, 0 ) ROM_LOAD( "d2k12.bin", 0x0000, 0x10000, CRC(6e95ca0d) SHA1(c058add0f146d577e3df0ba60828fe1734e78d01) ) /* Version 1.2 */ ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ @@ -2944,14 +2944,14 @@ ROM_START( dkongx ) ROM_END ROM_START( dkremix ) - ROM_REGION( 0x20000, REGION_CPU1, 0 ) - ROM_LOAD( "c_5et_g.bin", 0x10000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) ) - ROM_LOAD( "c_5ct_g.bin", 0x11000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) ) - ROM_LOAD( "c_5bt_g.bin", 0x12000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) ) - ROM_LOAD( "c_5at_g.bin", 0x13000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) + ROM_REGION( 0x10000, REGION_CPU1, 0 ) + ROM_LOAD( "c_5et_g.bin", 0x0000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) ) + ROM_LOAD( "c_5ct_g.bin", 0x1000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) ) + ROM_LOAD( "c_5bt_g.bin", 0x2000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) ) + ROM_LOAD( "c_5at_g.bin", 0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) /* space for diagnostic ROM */ - ROM_REGION( 0x20000, REGION_USER1, 0 ) + ROM_REGION( 0x10000, REGION_USER1, 0 ) ROM_LOAD( "dkremix.bin", 0x0000, 0x10000, CRC(f47c13aa) SHA1(c8516e27028d371a1f7b198f6d91f6a10bf99d3f) ) ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ From 9ae3c01cf094d793d3b6f245b7913bad83bdbfb7 Mon Sep 17 00:00:00 2001 From: Grantonius maximus <136645825+grant2258@users.noreply.github.com> Date: Wed, 24 Jan 2024 20:14:59 +0000 Subject: [PATCH 3/5] try banks --- src/drivers/dkong.c | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/src/drivers/dkong.c b/src/drivers/dkong.c index 1bee0a4de..ee82636c3 100644 --- a/src/drivers/dkong.c +++ b/src/drivers/dkong.c @@ -148,7 +148,7 @@ I/O ports * *************************************/ -static int banks = 0; +static int banks = 99; static struct EEPROM_interface braze_eeprom_intf = { @@ -181,11 +181,22 @@ static READ_HANDLER( braze_eeprom_r ) static WRITE_HANDLER( braze_a15_w ) { - if (banks != (data & 1)) { + + banks = data & 1; - memcpy (memory_region(REGION_CPU1) + 0x0000, memory_region(REGION_USER1) + 0x10000 + (0x8000 * banks), 0x06000); /* ?*/ - memcpy (memory_region(REGION_CPU1) + 0x8000, memory_region(REGION_USER1) + 0x10000 + (0x8000 * banks), 0x08000); /* ?*/ - } + printf("banks:%d\n",banks); + + if(!banks) + { + cpu_setbank(1, memory_region(REGION_CPU1)); + cpu_setbank(2, memory_region(REGION_CPU1)+0x8000); + } + else + { + cpu_setbank(1, memory_region(REGION_USER1) + 0x10000); + cpu_setbank(2, memory_region(REGION_USER1) + 0x18000); + } + } static WRITE_HANDLER( braze_eeprom_w ) @@ -307,16 +318,17 @@ static MEMORY_READ_START( readmem ) MEMORY_END static MEMORY_READ_START( dkong2_readmem ) - { 0x0000, 0x5fff, MRA_ROM }, /* DK: 0000-3fff */ + { 0x0000, 0x5fff, MRA_BANK1 }, /* DK: 0000-3fff */ { 0x6000, 0x6fff, MRA_RAM }, /* including sprites RAM */ { 0x7400, 0x77ff, MRA_RAM }, /* video RAM */ { 0x7c00, 0x7c00, input_port_0_r }, /* IN0 */ { 0x7c80, 0x7c80, input_port_1_r }, /* IN1 */ { 0x7d00, 0x7d00, dkong_in2_r }, /* IN2/DSW2 */ { 0x7d80, 0x7d80, input_port_3_r }, /* DSW1 */ + { 0x8000, 0xffff, MRA_BANK2 }, /* DK3 and bootleg DKjr only */ { 0xc800, 0xc800, braze_eeprom_r }, - { 0x8000, 0x9fff, MRA_ROM }, /* DK3 and bootleg DKjr only */ - { 0xb000, 0xbfff, MRA_ROM }, /* Pest Place only */ + + MEMORY_END static MEMORY_READ_START( dkong3_readmem ) @@ -2919,7 +2931,7 @@ ROM_START( dkongx ) ROM_LOAD( "c_5at_g.bin", 0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) /* space for diagnostic ROM */ - ROM_REGION( 0x10000, REGION_USER1, 0 ) + ROM_REGION( 0x20000, REGION_USER1, 0 ) ROM_LOAD( "d2k12.bin", 0x0000, 0x10000, CRC(6e95ca0d) SHA1(c058add0f146d577e3df0ba60828fe1734e78d01) ) /* Version 1.2 */ ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ @@ -2951,7 +2963,7 @@ ROM_START( dkremix ) ROM_LOAD( "c_5at_g.bin", 0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) /* space for diagnostic ROM */ - ROM_REGION( 0x10000, REGION_USER1, 0 ) + ROM_REGION( 0x20000, REGION_USER1, 0 ) ROM_LOAD( "dkremix.bin", 0x0000, 0x10000, CRC(f47c13aa) SHA1(c8516e27028d371a1f7b198f6d91f6a10bf99d3f) ) ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ @@ -3014,12 +3026,10 @@ static DRIVER_INIT( dkongx ) { braze_decrypt_rom(memory_region(REGION_USER1) + 0x10000); - memset (memory_region(REGION_CPU1), 0, 0x10000); - - banks = 0; - memcpy (memory_region(REGION_CPU1) + 0x0000, memory_region(REGION_USER1) + 0x10000, 0x06000); - memcpy (memory_region(REGION_CPU1) + 0x8000, memory_region(REGION_USER1) + 0x10000, 0x08000); /* ?*/ + cpu_setbank(1, memory_region(REGION_USER1) + 0x10000); + cpu_setbank(2, memory_region(REGION_USER1) + 0x18000); + install_mem_write_handler(0, 0xe000, 0xe000, braze_a15_w); install_mem_write_handler(0, 0xc800, 0xc800, braze_eeprom_w); install_mem_read_handler(0, 0xc800, 0xc800, braze_eeprom_r); From 06a353b6bc9beeb3ef2b28bf255be741298376b1 Mon Sep 17 00:00:00 2001 From: Grantonius maximus <136645825+grant2258@users.noreply.github.com> Date: Wed, 24 Jan 2024 21:35:32 +0000 Subject: [PATCH 4/5] fix sounds --- src/drivers/dkong.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/drivers/dkong.c b/src/drivers/dkong.c index ee82636c3..751e744b3 100644 --- a/src/drivers/dkong.c +++ b/src/drivers/dkong.c @@ -180,21 +180,19 @@ static READ_HANDLER( braze_eeprom_r ) static WRITE_HANDLER( braze_a15_w ) { - - banks = data & 1; - printf("banks:%d\n",banks); + //printf("banks:%d\n",banks); - if(!banks) + if(banks) { - cpu_setbank(1, memory_region(REGION_CPU1)); - cpu_setbank(2, memory_region(REGION_CPU1)+0x8000); + cpu_setbank(1, memory_region(REGION_USER1) + 0x18000); + cpu_setbank(2, memory_region(REGION_USER1) + 0x18000); } else { cpu_setbank(1, memory_region(REGION_USER1) + 0x10000); - cpu_setbank(2, memory_region(REGION_USER1) + 0x18000); + cpu_setbank(2, memory_region(REGION_USER1) + 0x10000); } } @@ -2936,8 +2934,7 @@ ROM_START( dkongx ) ROM_REGION( 0x1800, REGION_CPU2, 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_LOAD( "s_3j_b.bin", 0x0800, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) ROM_REGION( 0x1000, REGION_GFX1, 0 ) ROM_LOAD( "v_5h_b.bin", 0x0000, 0x0800, CRC(12c8c95d) SHA1(a57ff5a231c45252a63b354137c920a1379b70a3) ) @@ -2968,8 +2965,7 @@ ROM_START( dkremix ) ROM_REGION( 0x1800, REGION_CPU2, 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_LOAD( "s_3j_b.bin", 0x0800, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) ROM_REGION( 0x1000, REGION_GFX1, 0 ) ROM_LOAD( "dkremix.5h", 0x0000, 0x0800, CRC(fc82b069) SHA1(ae78e6de0b50149a55f10f480c522f7a147ea106) ) @@ -3027,7 +3023,7 @@ static DRIVER_INIT( dkongx ) braze_decrypt_rom(memory_region(REGION_USER1) + 0x10000); cpu_setbank(1, memory_region(REGION_USER1) + 0x10000); - cpu_setbank(2, memory_region(REGION_USER1) + 0x18000); + cpu_setbank(2, memory_region(REGION_USER1) + 0x10000); install_mem_write_handler(0, 0xe000, 0xe000, braze_a15_w); From b0bb203aef5aa8ebbb09bdb1257dc3f9e365ce39 Mon Sep 17 00:00:00 2001 From: Grantonius maximus <136645825+grant2258@users.noreply.github.com> Date: Wed, 24 Jan 2024 22:52:03 +0000 Subject: [PATCH 5/5] add dk xmas remix --- src/driver.c | 1 + src/drivers/dkong.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/driver.c b/src/driver.c index d1c06653a..a7f9a5977 100644 --- a/src/driver.c +++ b/src/driver.c @@ -813,6 +813,7 @@ const struct GameDriver *test_drivers[] = DRIVER( dkongjo1 ) /* (c) 1981 Nintendo */ DRIVER( dkongx ) /* (c) 2008 Bootleg */ DRIVER( dkremix ) /* 2015 Bootleg */ + DRIVER( dkchrmx ) DRIVER( dkongjr ) /* (c) 1982 Nintendo of America */ DRIVER( dkongjrj ) /* (c) 1982 Nintendo */ DRIVER( dkngjnrj ) /* (c) 1982 Nintendo */ diff --git a/src/drivers/dkong.c b/src/drivers/dkong.c index 751e744b3..fa31047ed 100644 --- a/src/drivers/dkong.c +++ b/src/drivers/dkong.c @@ -2983,6 +2983,36 @@ ROM_START( dkremix ) ROM_LOAD( "v-5e.bpr", 0x0200, 0x0100, CRC(b869b8f5) SHA1(c2bdccbf2654b64ea55cd589fd21323a9178a660) ) /* character color codes on a per-column basis */ ROM_END +ROM_START( dkchrmx ) + ROM_REGION( 0x10000, REGION_CPU1, 0 ) + ROM_LOAD( "c_5et_g.bin", 0x0000, 0x1000, CRC(ba70b88b) SHA1(d76ebecfea1af098d843ee7e578e480cd658ac1a) ) + ROM_LOAD( "c_5ct_g.bin", 0x1000, 0x1000, CRC(5ec461ec) SHA1(acb11a8fbdbb3ab46068385fe465f681e3c824bd) ) + ROM_LOAD( "c_5bt_g.bin", 0x2000, 0x1000, CRC(1c97d324) SHA1(c7966261f3a1d3296927e0b6ee1c58039fc53c1f) ) + ROM_LOAD( "c_5at_g.bin", 0x3000, 0x1000, CRC(b9005ac0) SHA1(3fe3599f6fa7c496f782053ddf7bacb453d197c4) ) + + ROM_REGION( 0x20000, REGION_USER1, 0 ) + ROM_LOAD( "dkchrmx.bin", 0x0000, 0x10000, CRC(e5273cee) SHA1(c440d47e7e3ca356ae1d748cc673393efb2b6c4a) ) + + ROM_REGION( 0x1800, REGION_CPU2, 0 ) /* sound */ + ROM_LOAD( "s_3i_b.bin", 0x0000, 0x0800, CRC(45a4ed06) SHA1(144d24464c1f9f01894eb12f846952290e6e32ef) ) +// ROM_RELOAD( 0x0800, 0x0800 ) + ROM_LOAD( "s_3j_b.bin", 0x0800, 0x0800, CRC(4743fe92) SHA1(6c82b57637c0212a580591397e6a5a1718f19fd2) ) + + ROM_REGION( 0x1000, REGION_GFX1, 0 ) + ROM_LOAD( "v_5h_b.ch", 0x0000, 0x0800, CRC(0b92cc7a) SHA1(cd217c2b45a86744c2fc7df8a3b624489e07f01f) ) + ROM_LOAD( "v_3pt.ch", 0x0800, 0x0800, CRC(6a04f93f) SHA1(b78342f89186c3d2b83fff6fd208afaba4584a5c) ) + + ROM_REGION( 0x2000, REGION_GFX2, 0 ) + ROM_LOAD( "l_4m_b.ch", 0x0000, 0x0800, CRC(c6ddc85f) SHA1(4f19be0904460ec8494bad13b3b55292889e7400) ) + ROM_LOAD( "l_4n_b.ch", 0x0800, 0x0800, CRC(2cd9cfdf) SHA1(fd9b0b75084661441680188ef3faf233579ceeb7) ) + ROM_LOAD( "l_4r_b.ch", 0x1000, 0x0800, CRC(c1ea6688) SHA1(3509bb96d2da1f364d0cb4c60636933cdd42f6e3) ) + ROM_LOAD( "l_4s_b.ch", 0x1800, 0x0800, CRC(9473d658) SHA1(2c5acf47c0ab8bd2e863e9bdea018d17ac4c96c8) ) + + ROM_REGION( 0x0300, REGION_PROMS, 0 ) + ROM_LOAD( "c-2k.ch", 0x0000, 0x0100, CRC(c6cee97e) SHA1(6590b6815a0cb19b800bce0f504494217977ae44) ) + ROM_LOAD( "c-2j.ch", 0x0100, 0x0100, CRC(1f64ac3d) SHA1(0591495a75a301772856c121f34299da4f9df341) ) + ROM_LOAD( "v-5e.ch", 0x0200, 0x0100, CRC(5a8ca805) SHA1(8e711af73ddb20ed62a9a8b53f1150feab1dc051) ) +ROM_END static DRIVER_INIT( herodk ) { @@ -3077,3 +3107,4 @@ GAMEX(1985, strtheat, 0, strtheat, strtheat, 0, ROT270, "Epos Cor /* Braze Technologies bootleg hardware */ GAME (2008, dkongx, dkong, braze, dkongx, dkongx, ROT270, "bootleg", "Donkey Kong II - Jumpman Returns (Hack V1.2)" ) GAME (2015, dkremix, dkong, braze, dkongx, dkongx, ROT270, "bootleg", "Donkey Kong Remix" ) +GAME( 2017, dkchrmx, dkong, braze, dkongx, dkongx, ROT270, "John Kowalski", "Donkey Kong Christmas Remix" )