MiSTer-devel / Arcade-IremM62_MiSTer

Irem62 from pace, and mist including Lode Runner, etc
9 stars 9 forks source link

Lot Lot MRA development snags, possibly concerning 3rd set Graphics roms #16

Open birdybro opened 3 years ago

birdybro commented 3 years ago

@paulb-nl - I was informed by @alanswx that it would probably be good to contact you regarding this core and getting Lot Lot to work, since you've done a recent video commit to the core. I've been trying to trouble shoot it. Currently these are the changes I've made to try and match similar rom patterns for MAME mappings from the m62 driver which have ROM_REGION of 0x6000 for graphics. I have pasted the mra (xml) at the bottom for reference. So a few questions.

  1. Is there a schematic for Lot Lot that you are aware of or have?
  2. The other GFX3-containing games are kidniki, spelunkr, spelunk2, battroad, and youjyudn. Lotlot resembles all except for spelunk2 and youjyudn. Is this correlation a relevant clue that would help guide me in figuring out the proper rom mapping?

Current remapping I have attempted that has changed the graphics a little bit to try and match patterns to other 0x6000 ROM_REGION MAME rom mappings:

<misterromdescription>
    <name>Lot Lot</name>
    <mameversion>0221</mameversion>
    <setname>lotlot</setname>
    <mratimestamp>20200601015747</mratimestamp>
    <year>1985</year>
    <manufacturer>Irem (licensed from Tokuma Shoten)</manufacturer>
    <category>Puzzle</category>
    <rbf>iremm62</rbf>
    <switches default="FF,F5">
        <dip bits="0,1" name="Speed" ids="Very Fast,Fast,Slow,Very Slow"></dip>
        <dip bits="2,3" name="Lives" ids="4,2,1,3"></dip>
                <dip bits="4,7" name="Coinage" ids="Free Play,1C/1C" values="16,15"></dip>
        <dip bits="8" name="Flip Screen" ids="On,Off"></dip>
        <dip bits="9" name="Cabinet" ids="Upright,Cocktail"></dip>
        <dip bits="10" name="Coin Mode" ids="Mode 2,Mode 1"></dip>
        <dip bits="11" name="Demo Sounds" ids="On,Off"></dip>
        <dip bits="12" name="Freeze (Cheat)" ids="On,Off"></dip>
        <dip bits="13" name="Unknown" ids="On,Off"></dip>
        <dip bits="14" name="Invulnerability (Cheat)" ids="On,Off"></dip>
        <dip bits="15" name="Service Mode" ids="On,Off"></dip>
    </switches>
    <rom index="1">
        <part>08</part>
    </rom>
    <rom index="0" zip="lotlot.zip" md5="none">
        <part crc="2913d08f" name="lot-a-4e"/>
        <part crc="0443095f" name="lot-a-4d"/>
        <part crc="2913d08f" name="lot-a-4e"/>
        <part crc="0443095f" name="lot-a-4d"/>
        <part crc="2913d08f" name="lot-a-4e"/>
        <part crc="0443095f" name="lot-a-4d"/>
        <part crc="2913d08f" name="lot-a-4e"/>
        <part crc="0443095f" name="lot-a-4d"/>
        <part crc="0781cee7" repeat="8" name="lot-a-3h"/>
        <!-- GFX1 -->
        <interleave output="32">
            <part crc="1b3695f4" name="lot-k-4a" map="0001"/>
            <part crc="bd2b0730" name="lot-k-4c" map="0010"/>
            <part crc="930ddd55" name="lot-k-4b" map="0100"/>
            <part crc="930ddd55" name="lot-k-4b" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="1b3695f4" name="lot-k-4a" map="0001"/>
            <part crc="bd2b0730" name="lot-k-4c" map="0010"/>
            <part crc="930ddd55" name="lot-k-4b" map="0100"/>
            <part crc="930ddd55" name="lot-k-4b" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="1b3695f4" name="lot-k-4a" map="0001"/>
            <part crc="bd2b0730" name="lot-k-4c" map="0010"/>
            <part crc="930ddd55" name="lot-k-4b" map="0100"/>
            <part crc="930ddd55" name="lot-k-4b" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="1b3695f4" name="lot-k-4a" map="0001"/>
            <part crc="bd2b0730" name="lot-k-4c" map="0010"/>
            <part crc="930ddd55" name="lot-k-4b" map="0100"/>
            <part crc="930ddd55" name="lot-k-4b" map="1000"/>
        </interleave>
        <!-- GFX2 -->
        <interleave output="32">
            <part crc="fd27cb90" name="lot-b-4k" map="0001"/>
            <part crc="bd486fff" name="lot-b-3n" map="0010"/>
            <part crc="3026ee6c" name="lot-b-4c" map="0100"/>
            <part crc="3026ee6c" name="lot-b-4c" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="fd27cb90" name="lot-b-4k" map="0001"/>
            <part crc="bd486fff" name="lot-b-3n" map="0010"/>
            <part crc="3026ee6c" name="lot-b-4c" map="0100"/>
            <part crc="3026ee6c" name="lot-b-4c" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="fd27cb90" name="lot-b-4k" map="0001"/>
            <part crc="bd486fff" name="lot-b-3n" map="0010"/>
            <part crc="3026ee6c" name="lot-b-4c" map="0100"/>
            <part crc="3026ee6c" name="lot-b-4c" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="fd27cb90" name="lot-b-4k" map="0001"/>
            <part crc="bd486fff" name="lot-b-3n" map="0010"/>
            <part crc="3026ee6c" name="lot-b-4c" map="0100"/>
            <part crc="3026ee6c" name="lot-b-4c" map="1000"/>
        </interleave>
        <!-- GFX3 -->
        <interleave output="32">
            <part crc="3b7d95ba" name="lot-k-4p" map="0001"/>
            <part crc="f98dca1f" name="lot-k-4l" map="0010"/>
            <part crc="f0cd76a5" name="lot-k-4n" map="0100"/>
            <part crc="f0cd76a5" name="lot-k-4n" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="3b7d95ba" name="lot-k-4p" map="0001"/>
            <part crc="f98dca1f" name="lot-k-4l" map="0010"/>
            <part crc="f0cd76a5" name="lot-k-4n" map="0100"/>
            <part crc="f0cd76a5" name="lot-k-4n" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="3b7d95ba" name="lot-k-4p" map="0001"/>
            <part crc="f98dca1f" name="lot-k-4l" map="0010"/>
            <part crc="f0cd76a5" name="lot-k-4n" map="0100"/>
            <part crc="f0cd76a5" name="lot-k-4n" map="1000"/>
        </interleave>
        <interleave output="32">
            <part crc="3b7d95ba" name="lot-k-4p" map="0001"/>
            <part crc="f98dca1f" name="lot-k-4l" map="0010"/>
            <part crc="f0cd76a5" name="lot-k-4n" map="0100"/>
            <part crc="f0cd76a5" name="lot-k-4n" map="1000"/>
        </interleave>       
        <part crc="c146461d" name="lot-b-1m"/>
        <part crc="01e07db6" name="lot-b-1n"/>
        <part crc="8b6fcde3" name="lot-b-1l"/>
        <part crc="b820a05e" name="lot-k-2f"/>
        <part crc="9b1fa005" name="lot-k-2e"/>
        <part crc="315ed9a8" name="lot-k-2d"/>
        <part crc="ac3e230d" name="lot-k-2l"/>
        <part crc="1811ad2b" name="lot-k-2k"/>
        <part crc="e791ef2a" name="lot-k-2j"/>
        <part crc="110b21fd" name="lot-b-5p"/>
    </rom>
</misterromdescription>

EDIT: I've made a condensed c++ file which will just show all the relevant lines from the m62 driver for MAME which might point to some clues.

void m62_state::lotlot_map(address_map &map)
{
    map(0x0000, 0x7fff).rom();
    map(0xa000, 0xafff).ram().w(FUNC(m62_state::m62_textram_w)).share("m62_textram");
    map(0xc000, 0xc0ff).writeonly().share("spriteram");
    map(0xd000, 0xdfff).ram().w(FUNC(m62_state::m62_tileram_w)).share("m62_tileram");
    map(0xe000, 0xefff).ram();
}
/* line 621 */
static INPUT_PORTS_START( lotlot )
    PORT_INCLUDE( common )

    PORT_MODIFY("DSW2")
    PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:4")
    PORT_DIPSETTING(    0x08, DEF_STR( Off ) )
    PORT_DIPSETTING(    0x00, DEF_STR( On ) )
    /* In freeze mode, press 2 to stop and 1 to restart */
    PORT_DIPNAME( 0x10, 0x10, "Freeze (Cheat)" ) PORT_DIPLOCATION("SW2:5")
    PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
    PORT_DIPSETTING(    0x00, DEF_STR( On ) )
    PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:6" )

    PORT_START("DSW1")
    PORT_DIPNAME( 0x03, 0x03, "Speed" ) PORT_DIPLOCATION("SW1:1,2")
    PORT_DIPSETTING(    0x03, "Very Slow" )
    PORT_DIPSETTING(    0x02, "Slow" )
    PORT_DIPSETTING(    0x01, "Fast" )
    PORT_DIPSETTING(    0x00, "Very Fast" )
    PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:3,4")
    PORT_DIPSETTING(    0x08, "1" )
    PORT_DIPSETTING(    0x04, "2" )
    PORT_DIPSETTING(    0x0c, "3" )
    PORT_DIPSETTING(    0x00, "4" )
    IREM_Z80_COINAGE_TYPE_4_LOC(SW1)
INPUT_PORTS_END
/* line 818 */
static const gfx_layout lotlot_charlayout =
{
    12,10, /* character size */
    256, /* number of characters */
    3, /* bits per pixel */
    { 0, 256*32*8, 2*256*32*8 },
    { 0, 1, 2, 3, 16*8+0, 16*8+1, 16*8+2, 16*8+3, 16*8+4, 16*8+5, 16*8+6, 16*8+7 },
    { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8 },
    32*8    /* every char takes 32 consecutive bytes */
};
/* line 892 */
static GFXDECODE_START( gfx_m62_tiles_lotlot )
    GFXDECODE_ENTRY( "gfx1", 0, lotlot_charlayout,    0, 32 )
GFXDECODE_END
/* line 910 */
static GFXDECODE_START( gfx_m62_fg_lotlot )
    GFXDECODE_ENTRY( "gfx3", 0, lotlot_charlayout,  0, 32 )
GFXDECODE_END
/* line 1076 */
void m62_state::lotlot(machine_config &config)
{
    ldrun(config);

    /* basic machine hardware */
    m_maincpu->set_addrmap(AS_PROGRAM, &m62_state::lotlot_map);

    /* video hardware */
    GFXDECODE(config, m_fg_decode, m_fg_palette, gfx_m62_fg_lotlot);
    m_chr_decode->set_info(gfx_m62_tiles_lotlot);

    PALETTE(config, m_fg_palette, FUNC(m62_state::m62_lotlot_fg), 256);

    MCFG_VIDEO_START_OVERRIDE(m62_state,lotlot)
    subdevice<screen_device>("screen")->set_screen_update(FUNC(m62_state::screen_update_lotlot));
}
/* line 1732 */
ROM_START( lotlot )
    ROM_REGION( 0x10000, "maincpu", 0 )
    ROM_LOAD( "lot-a-4e",     0x0000, 0x4000, CRC(2913d08f) SHA1(829115333825a9483322a910efee9ee470d85a0e) )
    ROM_LOAD( "lot-a-4d",     0x4000, 0x4000, CRC(0443095f) SHA1(2c3ca107b54519632513a75b80a1a7d8b971f2b1) )

    ROM_REGION( 0x10000, "irem_audio:iremsound", 0 )   /* 64k for the audio CPU (6803) */
    ROM_LOAD( "lot-a-3h",     0xe000, 0x2000, CRC(0781cee7) SHA1(bff8592f96b43af6554f1a04e0c00f45b178cce6) )

    ROM_REGION( 0x6000, "gfx1", 0 )
    ROM_LOAD( "lot-k-4a",     0x00000, 0x2000, CRC(1b3695f4) SHA1(0a1a1df8bf0288434d47b323d97019b705f5d9d7) )   /* tiles */
    ROM_LOAD( "lot-k-4c",     0x02000, 0x2000, CRC(bd2b0730) SHA1(af66617a5fce6e72107c3949e9829121e8719648) )
    ROM_LOAD( "lot-k-4b",     0x04000, 0x2000, CRC(930ddd55) SHA1(bf2580c6b1df68fe2bca290b227c40f450a77576) )

    ROM_REGION( 0x6000, "gfx2", 0 )
    ROM_LOAD( "lot-b-4k",     0x00000, 0x2000, CRC(fd27cb90) SHA1(79d3f5ba8e271df05af55625e1db2f2adea25285) )   /* sprites */
    ROM_LOAD( "lot-b-3n",     0x02000, 0x2000, CRC(bd486fff) SHA1(a6159c0f55cf288b0382c3415811ea2a35f3564e) )
    ROM_LOAD( "lot-b-4c",     0x04000, 0x2000, CRC(3026ee6c) SHA1(6d4ea4b0409d3486eb0e7e9507a0ab79df5ee6c8) )

    ROM_REGION( 0x6000, "gfx3", 0 )
    ROM_LOAD( "lot-k-4p",     0x00000, 0x2000, CRC(3b7d95ba) SHA1(4be898c0d5b5c73f380abf5f5ea66f1797eefd1d) )   /* chars */
    ROM_LOAD( "lot-k-4l",     0x02000, 0x2000, CRC(f98dca1f) SHA1(b88d2b9cb3ac8d5523f3788fca8bae60f8fad6f7) )
    ROM_LOAD( "lot-k-4n",     0x04000, 0x2000, CRC(f0cd76a5) SHA1(3f7b1890ca36c190d3fe2571382ada93798a0a51) )

    ROM_REGION( 0x400, "proms", 0 )
    ROM_LOAD( "lot-k-7e",     0x000, 0x200, CRC(6cef0fbd) SHA1(0c5c63a203e7bd852a3574c18f212487caf529ca) )    /* unknown */
    ROM_LOAD( "lot-k-7h",     0x200, 0x200, CRC(04442bee) SHA1(37d10b605830b9355b00256af479c06cd4b97950) )    /* unknown */

    ROM_REGION( 0x20, "spr_height_prom", 0 )
    ROM_LOAD( "lot-b-5p",     0x00, 0x20, CRC(110b21fd) SHA1(a7a660ff18540e2d73a80f341cd50c5f4d184085) )    /* sprite height, one entry per 32 */

    ROM_REGION( 0x300, "spr_color_proms", 0 )
    ROM_LOAD( "lot-b-1m",     0x0000, 0x0100, CRC(c146461d) SHA1(87a5dc3a93a9f9f08e97eef77eb099792fdf70e6) ) /* sprite palette red component */
    ROM_LOAD( "lot-b-1n",     0x0100, 0x0100, CRC(01e07db6) SHA1(3a18a6919b966d429d5ec9cf812768804407f92e) ) /* sprite palette green component */
    ROM_LOAD( "lot-b-1l",     0x0200, 0x0100, CRC(8b6fcde3) SHA1(04e9ce04b77a5f8737f2ec0aaeadaccdbbdda573) ) /* sprite palette blue component */

    ROM_REGION( 0x300, "chr_color_proms", 0 )
    ROM_LOAD( "lot-k-2f",     0x0000, 0x0100, CRC(b820a05e) SHA1(79158f0cd64231c5cd90dc391e492a21aba4c30d) ) /* tile palette red component */
    ROM_LOAD( "lot-k-2e",     0x0100, 0x0100, CRC(9b1fa005) SHA1(076af5d7a30a47b5884fcf33452a10aad91d30ee) ) /* tile palette green component */
    ROM_LOAD( "lot-k-2d",     0x0200, 0x0100, CRC(315ed9a8) SHA1(7bfa91729cce7911a45035e2fa576a2b6b010a65) ) /* tile palette blue component */

    ROM_REGION( 0x300, "fg_color_proms", 0 )
    ROM_LOAD( "lot-k-2l",     0x0000, 0x0100, CRC(ac3e230d) SHA1(e7d5afc707580a5c1df1201694a4db685af5f986) ) /* character palette red component */
    ROM_LOAD( "lot-k-2k",     0x0100, 0x0100, CRC(1811ad2b) SHA1(fb7aa262595010dd0fc1a94d74a37359f20e4cd7) ) /* character palette green component */
    ROM_LOAD( "lot-k-2j",     0x0200, 0x0100, CRC(e791ef2a) SHA1(cb1236630cbbc23e2e684ad3b7f51e52389eea2e) ) /* character palette blue component */

    ROM_REGION( 0x100, "timing", 0 )
    ROM_LOAD( "lot-b-6f",     0x000, 0x100, CRC(34d88d3c) SHA1(727f4c5cfff33538886fa0a29fd119aa085d7008) )    /* video timing - common to the other games */
ROM_END
/* line 2433 */
GAME( 1985, lotlot,    0,        lotlot,   lotlot,   m62_state, empty_init,    ROT0,   "Irem (licensed from Tokuma Shoten)", "Lot Lot", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND )
paulb-nl commented 3 years ago

I have only found the schematics for Kid Niki and Kung fu master. https://www.arcade-museum.com/manuals-videogames/K/KungFu%20Master%20Installation%20Instructions.pdf

https://www.gamesdatabase.org/Media/SYSTEM/Arcade//Manual/formated/Kid_Niki_-_Radical_Ninja_-_1986_-_Irem.pdf

Mame tells us that Lot lot uses 12x10 tiles for both foreground and background layers while all other games use 8x8 for the background and 8x8 or 12x8 for the foreground and the core does not support 12x10 at all.

Currently the core has implemented 8x8 and 12x8 foreground layers as separate tile hardware. Does the real M62 hardware support 8x8,12x8 and 12x10 sizes or do the games all have different hardware?

birdybro commented 3 years ago

After I posted this Alan pointed out that the MiST core doesn't seem to have Lot Lot support implemented either. Seems like the core has to be developed further to support this game regardless, and the MRA might actually be good for now.

Thanks!