From e7e1f17e246b8bf2f8ad446bb55e1f1fef1ee66f Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Sun, 24 May 2009 12:29:58 +0000 Subject: [PATCH] 03101: jantotsu: Game gives incorrect calls --- src/mame/drivers/jantotsu.c | 77 ++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 43 deletions(-) diff --git a/src/mame/drivers/jantotsu.c b/src/mame/drivers/jantotsu.c index 0f71f076e0c..9389a75043c 100644 --- a/src/mame/drivers/jantotsu.c +++ b/src/mame/drivers/jantotsu.c @@ -9,7 +9,6 @@ Notes: Mode is for adjusting these screens (to not let the human opponent to read your tiles). TODO: --ADPCM index table isn't yet complete, needs LOTS of game testing; -Video buffering? If you coin up, you can see the "credit 1" msg that gets build into the video bitmaps... -According to the flyer, color bitplanes might be wrong on the A-N mahjong charset, might be @@ -26,43 +25,37 @@ c03b-c048 "up" computer tiles / player-2 tiles c04b-c058 "left" computer tiles ============================================================================================ -MSM samples table (I'm assuming that F is left-right players, M1 is up / player 2 and M2 is player 1): +MSM samples table (I'm assuming that F is left-right players, M2 is up / player 2 and M1 is player 1): start |end |sample |possible data triggers ------------------------|---------------------- -jat-40 (0x6000-0x7fff) -0x0000|0x08ff|odaii? | -0x0900|0x0cff|tsumo F | -0x0d00|0x0fff|tsumo M1 | 0xc9 (right) -0x1000|0x13ff|ron F | 0x14 (up) -0x1400|0x17ff|pon F | 0x40 (up) -0x1800|0x1bff|kan F | 0x1c -0x1c00|0x1fff|chi | 0xdc -jat-41 (0x2000-0x3fff) -0x2000|0x27ff|ippatsu F | -0x2800|0x2fff|ryutoku? | -0x3000|0x35ff|otoyo? | -0x3600|0x3eff|yatta | +jat-43 (0x0000-0x1fff) +0x0000|0x06ff|rii'chi M1| 0x00 +0x0700|0x0bff|rii'chi M2| 0x07 +0x0c00|0x0fff|nagare? | +0x1000|0x13ff|ron M | +0x1400|0x17ff|kore? | 0x14 +0x1800|0x1bff|kan M1 | 0x18 +0x1c00|0x1fff|kan M2 | jat-42 (0x4000-0x5fff) 0x4000|0x42ff|koi? | 0x4300|0x4ef0|ippatsu M | -0x5000|0x52ff|pon M | 0xd4-0x50 (???) -0x5300|0x57ff|tsumo M2 | -0x5800|0x5dff|rii'chi F | 0x07 -jat-43 (0x0000-0x1fff) -0x6000|0x66ff|rii'chi M1| 0x58 -0x6700|0x6bff|rii'chi M2| -0x6c00|0x6fff|nagare? | -0x7000|0x73ff|ron M | 0xd0 -0x7400|0x77ff|kore? | -0x7800|0x7bff|kan M1 | -0x7c00|0x7fff|kan M2 | +0x5000|0x52ff|pon M | +0x5300|0x57ff|tsumo M2 | 0x53 +0x5800|0x5dff|rii'chi F | 0x58 +jat-41 (0x8000-0x9fff) +0x8000|0x87ff|ippatsu F | +0x8800|0x8fff|ryutoku? | 0x88 +0x9000|0x95ff|otoyo? | 0x90 +0x9600|0x9eff|yatta | 0x96 +jat-40 (0xc000-0xdfff) +0xc000|0xc8ff|odaii? | 0xc0 +0xc900|0xccff|tsumo F | 0xc9 +0xcd00|0xcfff|tsumo M1 | +0xd000|0xd3ff|ron F | 0xd0 +0xd400|0xd7ff|pon F | 0xd4 +0xd800|0xdbff|kan F | +0xdc00|0xdfff|chi | ------------------------------------------------ - *0x90: when you lose too much time - *0xc0: calculation sample - *0x43: called after a "ron" - *0x88: called on a No-Ten situation - *0x80: called after a "ron" - *0x96: calculation sample ============================================================================================ @@ -249,6 +242,10 @@ static WRITE8_DEVICE_HANDLER( jan_adpcm_w ) adpcm_pos = (data & 0xff) * 0x100; adpcm_idle = 0; msm5205_reset_w(device,0); + /* I don't think that this will ever happen, it's there just to be sure + (i.e. I'll probably never do a "nagare" in my entire life ;-) ) */ + if(data & 0x20) + popmessage("ADPCM called with data = %02x, contact MAMEdev",data); // printf("%02x 0\n",data); break; /*same write as port 2? MSM sample ack? */ @@ -475,20 +472,14 @@ ROM_START( jantotsu ) ROM_LOAD( "jat-04.3e", 0x08000, 0x02000, CRC(734e029f) SHA1(75aa13397847b4db32c41aaa6ff2ac82f16bd7a2) ) ROM_LOAD( "jat-05.4e", 0x0a000, 0x02000, CRC(1a725e1a) SHA1(1d39d607850f47b9389f41147d4570da8814f639) ) - ROM_REGION( 0x10000, "adpcm", 0 ) - ROM_LOAD( "jat-40.6b", 0x06000, 0x02000, CRC(2275253e) SHA1(64e9415faf2775c6b9ab497dce7fda8c4775192e) ) - ROM_LOAD( "jat-41.7b", 0x02000, 0x02000, CRC(ce08ed71) SHA1(8554e5e7ec178f57bed5fbdd5937e3a35f72c454) ) - ROM_LOAD( "jat-42.8b", 0x04000, 0x02000, CRC(3ac3efbf) SHA1(846faea7c7c01fb7500aa33a70d4b54e878c0e41) ) + ROM_REGION( 0x10000, "adpcm", ROMREGION_ERASE00 ) ROM_LOAD( "jat-43.9b", 0x00000, 0x02000, CRC(3c1d843c) SHA1(7a836e66cad4e94916f0d80a439efde49306a0e1) ) - /* Guess that the engineers got some fun with the PALs there... */ - ROM_COPY( "adpcm", 0x02000, 0x08000, 0x2000 ) - //a000-bfff - ROM_COPY( "adpcm", 0x06000, 0x0c000, 0x1000 ) - ROM_COPY( "adpcm", 0x01000, 0x0d000, 0x1000 ) - //e000-ffff + ROM_LOAD( "jat-42.8b", 0x04000, 0x02000, CRC(3ac3efbf) SHA1(846faea7c7c01fb7500aa33a70d4b54e878c0e41) ) + ROM_LOAD( "jat-41.7b", 0x08000, 0x02000, CRC(ce08ed71) SHA1(8554e5e7ec178f57bed5fbdd5937e3a35f72c454) ) + ROM_LOAD( "jat-40.6b", 0x0c000, 0x02000, CRC(2275253e) SHA1(64e9415faf2775c6b9ab497dce7fda8c4775192e) ) ROM_REGION( 0x20, "proms", 0 ) ROM_LOAD( "jat-60.10p", 0x00, 0x20, CRC(65528ae0) SHA1(6e3bf27d10ec14e3c6a494667b03b68726fcff14) ) ROM_END -GAME( 1983, jantotsu, 0, jantotsu, jantotsu, 0, ROT270, "Sanritsu", "4nin-uchi Mahjong Jantotsu", GAME_IMPERFECT_GRAPHICS | GAME_IMPERFECT_SOUND ) +GAME( 1983, jantotsu, 0, jantotsu, jantotsu, 0, ROT270, "Sanritsu", "4nin-uchi Mahjong Jantotsu", GAME_IMPERFECT_GRAPHICS )