New working clones

------------------
Mag Max (set 2) [Purity]
This commit is contained in:
Ivan Vangelista 2021-08-08 09:16:01 +02:00
parent 9ff9ced022
commit 3452b3be9b
6 changed files with 135 additions and 89 deletions

View File

@ -45,7 +45,7 @@ uint8_t magmax_state::sound_r()
void magmax_state::ay8910_portB_0_w(uint8_t data)
{
/*bit 0 is input to CLR line of the LS74*/
// bit 0 is input to CLR line of the LS74
m_LS74_clr = data & 1;
if (m_LS74_clr == 0)
m_LS74_q = 0;
@ -55,8 +55,8 @@ TIMER_CALLBACK_MEMBER(magmax_state::scanline_callback)
{
int scanline = param;
/* bit 0 goes hi whenever line V6 from video part goes lo->hi */
/* that is when scanline is 64 and 192 accordingly */
/* bit 0 goes hi whenever line V6 from video part goes lo->hi
that is when scanline is 64 and 192 accordingly */
if (m_LS74_clr != 0)
m_LS74_q = 1;
@ -68,10 +68,10 @@ TIMER_CALLBACK_MEMBER(magmax_state::scanline_callback)
void magmax_state::machine_start()
{
/* Create interrupt timer */
// Create interrupt timer
m_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(magmax_state::scanline_callback),this));
/* Set up save state */
// Set up save state
save_item(NAME(m_sound_latch));
save_item(NAME(m_LS74_clr));
save_item(NAME(m_LS74_q));
@ -144,21 +144,21 @@ bit3 - SOUND Chan#8 name=AY-3-8910 #2 Ch C
m_gain_control = data & 0x0f;
/*popmessage("gain_ctrl = %2x",data&0x0f);*/
// popmessage("gain_ctrl = %2x",data&0x0f);
float percent = (m_gain_control & 1) ? 1.0 : 0.50;
m_ay[0]->set_output_gain(0, percent);
//fixme: set_RC_filter(0,10000,100000000,0,10000); /* 10K, 10000pF = 0.010uF */
//fixme: set_RC_filter(0,10000,100000000,0,10000); // 10K, 10000pF = 0.010uF
percent = (m_gain_control & 2) ? 0.45 : 0.23;
m_ay[0]->set_output_gain(1, percent);
m_ay[0]->set_output_gain(2, percent);
m_ay[1]->set_output_gain(0, percent);
m_ay[1]->set_output_gain(1, percent);
//fixme: set_RC_filter(1,4700,100000000,0,4700); /* 4.7K, 4700pF = 0.0047uF */
//fixme: set_RC_filter(2,4700,100000000,0,4700); /* 4.7K, 4700pF = 0.0047uF */
//fixme: set_RC_filter(3,4700,100000000,0,4700); /* 4.7K, 4700pF = 0.0047uF */
//fixme: set_RC_filter(4,4700,100000000,0,4700); /* 4.7K, 4700pF = 0.0047uF */
//fixme: set_RC_filter(1,4700,100000000,0,4700); // 4.7K, 4700pF = 0.0047uF
//fixme: set_RC_filter(2,4700,100000000,0,4700); // 4.7K, 4700pF = 0.0047uF
//fixme: set_RC_filter(3,4700,100000000,0,4700); // 4.7K, 4700pF = 0.0047uF
//fixme: set_RC_filter(4,4700,100000000,0,4700); // 4.7K, 4700pF = 0.0047uF
percent = (m_gain_control & 4) ? 0.45 : 0.23;
m_ay[1]->set_output_gain(2, percent);
@ -171,14 +171,14 @@ bit3 - SOUND Chan#8 name=AY-3-8910 #2 Ch C
void magmax_state::vreg_w(offs_t offset, uint16_t data, uint16_t mem_mask)
{
/* VRAM CONTROL REGISTER */
/* bit0 - coin counter 1 */
/* bit1 - coin counter 2 */
/* bit2 - flip screen (INV) */
/* bit3 - page bank to be displayed (PG) */
/* bit4 - sprite bank LSB (DP0) */
/* bit5 - sprite bank MSB (DP1) */
/* bit6 - BG display enable (BE)*/
// VRAM CONTROL REGISTER
// bit0 - coin counter 1
// bit1 - coin counter 2
// bit2 - flip screen (INV)
// bit3 - page bank to be displayed (PG)
// bit4 - sprite bank LSB (DP0)
// bit5 - sprite bank MSB (DP1)
// bit6 - BG display enable (BE)
COMBINE_DATA(m_vreg);
machine().bookkeeping().coin_counter_w(0, BIT(data, 0));
@ -229,7 +229,7 @@ static INPUT_PORTS_START( magmax )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Speed") PORT_CODE(KEYCODE_F1) PORT_TOGGLE /* see notes */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Speed") PORT_CODE(KEYCODE_F1) PORT_TOGGLE // see notes
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -239,7 +239,7 @@ static INPUT_PORTS_START( magmax )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* see notes */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // see notes
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@ -285,11 +285,11 @@ static INPUT_PORTS_START( magmax )
PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:5")
PORT_DIPSETTING( 0x1000, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Hard ) )
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:6") /* undocumented in the US manual */
PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW2:6") // undocumented in the US manual
PORT_DIPSETTING( 0x2000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPUNUSED_DIPLOC( 0x4000, 0x4000, "SW2:7" )
PORT_DIPNAME( 0x8000, 0x8000, "Debug Mode" ) PORT_DIPLOCATION("SW2:8") /* see notes */
PORT_DIPNAME( 0x8000, 0x8000, "Debug Mode" ) PORT_DIPLOCATION("SW2:8") // see notes
PORT_DIPSETTING( 0x8000, DEF_STR( No ) )
PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) )
INPUT_PORTS_END
@ -297,9 +297,9 @@ INPUT_PORTS_END
static const gfx_layout charlayout =
{
8, 8, /* 8*8 characters */
256, /* 256 characters */
4, /* 4 bits per pixel */
8, 8, // 8*8 characters
256, // 256 characters
4, // 4 bits per pixel
{ 0, 1, 2, 3 },
{ 4, 0, 12, 8, 20, 16, 28, 24 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
@ -308,9 +308,9 @@ static const gfx_layout charlayout =
static const gfx_layout spritelayout =
{
16, 16, /* 16*16 characters */
512, /* 512 characters */
4, /* 4 bits per pixel */
16, 16, // 16*16 characters
512, // 512 characters
4, // 4 bits per pixel
{ 0, 1, 2, 3 },
{ 4, 0, 4+512*64*8, 0+512*64*8, 12, 8, 12+512*64*8, 8+512*64*8,
20, 16, 20+512*64*8, 16+512*64*8, 28, 24, 28+512*64*8, 24+512*64*8 },
@ -320,26 +320,26 @@ static const gfx_layout spritelayout =
};
static GFXDECODE_START( gfx_magmax )
GFXDECODE_ENTRY( "chars", 0, charlayout, 0, 1 ) /*no color codes*/
GFXDECODE_ENTRY( "sprites", 0, spritelayout, 1*16, 16 ) /*16 color codes*/
GFXDECODE_ENTRY( "chars", 0, charlayout, 0, 1 ) // no color codes
GFXDECODE_ENTRY( "sprites", 0, spritelayout, 1*16, 16 ) // 16 color codes
GFXDECODE_END
void magmax_state::magmax(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(16'000'000)/2); /* verified on pcb */
// basic machine hardware
M68000(config, m_maincpu, XTAL(16'000'000)/2); // verified on PCB
m_maincpu->set_addrmap(AS_PROGRAM, &magmax_state::main_map);
m_maincpu->set_vblank_int("screen", FUNC(magmax_state::irq1_line_assert));
Z80(config, m_audiocpu, XTAL(20'000'000)/8); /* verified on pcb */
Z80(config, m_audiocpu, XTAL(20'000'000)/8); // verified on PCB
m_audiocpu->set_addrmap(AS_PROGRAM, &magmax_state::sound_map);
m_audiocpu->set_addrmap(AS_IO, &magmax_state::sound_io_map);
config.set_maximum_quantum(attotime::from_hz(600));
/* video hardware */
// video hardware
SCREEN(config, m_screen, SCREEN_TYPE_RASTER);
m_screen->set_refresh_hz(60);
m_screen->set_size(32*8, 32*8);
@ -348,19 +348,19 @@ void magmax_state::magmax(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_magmax);
PALETTE(config, m_palette, FUNC(magmax_state::magmax_palette), 1*16 + 16*16 + 256, 256);
PALETTE(config, m_palette, FUNC(magmax_state::palette), 1*16 + 16*16 + 256, 256);
/* sound hardware */
// sound hardware
SPEAKER(config, "mono").front_center();
AY8910(config, m_ay[0], XTAL(20'000'000)/16); /* verified on pcb */
AY8910(config, m_ay[0], XTAL(20'000'000)/16); // verified on PCB
m_ay[0]->port_a_write_callback().set(FUNC(magmax_state::ay8910_portA_0_w));
m_ay[0]->port_b_write_callback().set(FUNC(magmax_state::ay8910_portB_0_w));
m_ay[0]->add_route(ALL_OUTPUTS, "mono", 0.40);
AY8910(config, m_ay[1], XTAL(20'000'000)/16).add_route(ALL_OUTPUTS, "mono", 0.40); /* verified on pcb */
AY8910(config, m_ay[1], XTAL(20'000'000)/16).add_route(ALL_OUTPUTS, "mono", 0.40); // verified on PCB
AY8910(config, m_ay[2], XTAL(20'000'000)/16).add_route(ALL_OUTPUTS, "mono", 0.40); /* verified on pcb */
AY8910(config, m_ay[2], XTAL(20'000'000)/16).add_route(ALL_OUTPUTS, "mono", 0.40); // verified on PCB
GENERIC_LATCH_8(config, m_soundlatch);
m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0);
@ -392,29 +392,79 @@ ROM_START( magmax )
ROM_LOAD( "21.5g", 0x0a000, 0x2000, CRC(dd52eda4) SHA1(773e92c918f5b076ce3cae55a33a27c38d958edf) )
ROM_LOAD( "22.6g", 0x0c000, 0x2000, CRC(4afc98ff) SHA1(a34d63befdb3c749460d1cfb62e15ced52859b9b) )
ROM_REGION( 0x10000, "user1", 0 ) /* surface scroll control */
ROM_REGION( 0x10000, "user1", 0 ) // surface scroll control
ROM_LOAD16_BYTE( "4.18b", 0x00000, 0x2000, CRC(1550942e) SHA1(436424d63ca576d13b0f4a3713f009a38e33f2f3) )
ROM_LOAD16_BYTE( "5.20b", 0x00001, 0x2000, CRC(3b93017f) SHA1(b1b67c2050c8033c29bb74ab909075c39e4f7c6a) )
/* BG control data */
ROM_LOAD( "9.18d", 0x04000, 0x2000, CRC(9ecc9ab8) SHA1(ea5fbd9e9ce09e25f532dc74623e0f7e8464b7f3) ) /* surface */
ROM_LOAD( "10.20d", 0x06000, 0x2000, CRC(e2ff7293) SHA1(d93c30f7edac53747efcf840325a8ce5f5e47b32) ) /* underground */
/* background tiles */
ROM_LOAD( "11.15f", 0x08000, 0x2000, CRC(91f3edb6) SHA1(64e8008cad0e9c42c2ee972c2ee867c7c51cae27) ) /* surface */
ROM_LOAD( "12.17f", 0x0a000, 0x2000, CRC(99771eff) SHA1(5a1e2316b4055a1332d9d1f02edee5bc6aae90ac) ) /* underground */
ROM_LOAD( "13.18f", 0x0c000, 0x2000, CRC(75f30159) SHA1(d188ccf926e7a842e90ebc1aad3dc20c37d84b98) ) /* surface of mechanical level */
ROM_LOAD( "14.20f", 0x0e000, 0x2000, CRC(96babcba) SHA1(fec58ccc1e5cc2cec56658a412b94fe7b989541d) ) /* underground of mechanical level */
// BG control data
ROM_LOAD( "9.18d", 0x04000, 0x2000, CRC(9ecc9ab8) SHA1(ea5fbd9e9ce09e25f532dc74623e0f7e8464b7f3) ) // surface
ROM_LOAD( "10.20d", 0x06000, 0x2000, CRC(e2ff7293) SHA1(d93c30f7edac53747efcf840325a8ce5f5e47b32) ) // underground
// background tiles
ROM_LOAD( "11.15f", 0x08000, 0x2000, CRC(91f3edb6) SHA1(64e8008cad0e9c42c2ee972c2ee867c7c51cae27) ) // surface
ROM_LOAD( "12.17f", 0x0a000, 0x2000, CRC(99771eff) SHA1(5a1e2316b4055a1332d9d1f02edee5bc6aae90ac) ) // underground
ROM_LOAD( "13.18f", 0x0c000, 0x2000, CRC(75f30159) SHA1(d188ccf926e7a842e90ebc1aad3dc20c37d84b98) ) // surface of mechanical level
ROM_LOAD( "14.20f", 0x0e000, 0x2000, CRC(96babcba) SHA1(fec58ccc1e5cc2cec56658a412b94fe7b989541d) ) // underground of mechanical level
ROM_REGION( 0x0200, "user2", 0 ) /* BG control data */
ROM_LOAD( "mag_b.14d", 0x0000, 0x0100, CRC(a0fb7297) SHA1(e6461050e7e586475343156aae1066b944ceab66) ) /* background control PROM */
ROM_LOAD( "mag_c.15d", 0x0100, 0x0100, CRC(d84a6f78) SHA1(f2ce329b1adf39bde6df2eb79be6d144adea65d0) ) /* background control PROM */
ROM_REGION( 0x0200, "user2", 0 ) // BG control data
ROM_LOAD( "mag_b.14d", 0x0000, 0x0100, CRC(a0fb7297) SHA1(e6461050e7e586475343156aae1066b944ceab66) ) // background control PROM
ROM_LOAD( "mag_c.15d", 0x0100, 0x0100, CRC(d84a6f78) SHA1(f2ce329b1adf39bde6df2eb79be6d144adea65d0) ) // background control PROM
ROM_REGION( 0x0500, "proms", 0 ) /* color PROMs */
ROM_LOAD( "mag_e.10f", 0x0000, 0x0100, CRC(75e4f06a) SHA1(cdaccc3e56df4ac9ace04b93b3bab9a62f1ea6f5) ) /* red */
ROM_LOAD( "mag_d.10e", 0x0100, 0x0100, CRC(34b6a6e3) SHA1(af254ccf0d38e1f4644375cd357d468ad4efe450) ) /* green */
ROM_LOAD( "mag_a.10d", 0x0200, 0x0100, CRC(a7ea7718) SHA1(4789586d6795644517a18f179b4ae5f23737b21d) ) /* blue */
ROM_LOAD( "mag_g.2e", 0x0300, 0x0100, CRC(830be358) SHA1(f412587718040a783c4e6453619930c90daf385e) ) /* sprites color lookup table */
ROM_LOAD( "mag_f.13b", 0x0400, 0x0100, CRC(4a6f9a6d) SHA1(65f1e0bfacd1f354ece1b18598a551044c27c4d1) ) /* state machine data used for video signals generation (not used in emulation)*/
ROM_REGION( 0x0500, "proms", 0 ) // color PROMs
ROM_LOAD( "mag_e.10f", 0x0000, 0x0100, CRC(75e4f06a) SHA1(cdaccc3e56df4ac9ace04b93b3bab9a62f1ea6f5) ) // red
ROM_LOAD( "mag_d.10e", 0x0100, 0x0100, CRC(34b6a6e3) SHA1(af254ccf0d38e1f4644375cd357d468ad4efe450) ) // green
ROM_LOAD( "mag_a.10d", 0x0200, 0x0100, CRC(a7ea7718) SHA1(4789586d6795644517a18f179b4ae5f23737b21d) ) // blue
ROM_LOAD( "mag_g.2e", 0x0300, 0x0100, CRC(830be358) SHA1(f412587718040a783c4e6453619930c90daf385e) ) // sprites color lookup table
ROM_LOAD( "mag_f.13b", 0x0400, 0x0100, CRC(4a6f9a6d) SHA1(65f1e0bfacd1f354ece1b18598a551044c27c4d1) ) // state machine data used for video signals generation (not used in emulation)
ROM_END
ROM_START( magmaxa )
ROM_REGION( 0x14000, "maincpu", 0 ) // all differ from the parent
ROM_LOAD16_BYTE( "1.3b", 0x00001, 0x4000, CRC(f112b450) SHA1(ab10d4015b8736c5fc5aaa2f266fb026afeb2658) ) // sldh
ROM_LOAD16_BYTE( "6.3d", 0x00000, 0x4000, CRC(89a6d9e3) SHA1(99c00fae13201d2204034c079f49f6c6c1260280) ) // sldh
ROM_LOAD16_BYTE( "2.5b", 0x08001, 0x4000, CRC(53560842) SHA1(b5e918d902e0149282558ca750fa874cac76e43e) ) // sldh
ROM_LOAD16_BYTE( "7.5d", 0x08000, 0x4000, CRC(e20c2c05) SHA1(9660e29eb73a2b8fae5addbd300023cd8c881ca0) ) // sldh
ROM_LOAD16_BYTE( "3.6b", 0x10001, 0x2000, CRC(a1276b61) SHA1(ae9a024c817c60b847a1552bbc5af4c9d6aa612c) ) // sldh
ROM_LOAD16_BYTE( "8.6d", 0x10000, 0x2000, CRC(da172797) SHA1(a713c32218cc9f3ca2fa20e3647b4e4fa9a74609) ) // sldh
ROM_REGION( 0x10000, "audiocpu", 0 )
ROM_LOAD( "15.17b", 0x00000, 0x2000, CRC(5f2016b7) SHA1(473be0a67e29f8fa614c026d621a2906143e1939) ) // sldh, only other different ROM
ROM_LOAD( "16.18b", 0x02000, 0x2000, CRC(055e3126) SHA1(8c9b03eb7588512ef17f8c1b731a2fd7cf372bf8) )
ROM_REGION( 0x02000, "chars", 0 )
ROM_LOAD( "23.15g", 0x00000, 0x2000, CRC(a7471da2) SHA1(ec2815a5801bc55955e612173a845399fd493eb7) )
ROM_REGION( 0x10000, "sprites", 0 )
ROM_LOAD( "17.3e", 0x00000, 0x2000, CRC(8e305b2e) SHA1(74c318089f6bebafbee31c22302e93a09d3ffa32) )
ROM_LOAD( "18.5e", 0x02000, 0x2000, CRC(14c55a60) SHA1(fd2a1b434bb65502f0f791995caf1cd869ccd254) )
ROM_LOAD( "19.6e", 0x04000, 0x2000, CRC(fa4141d8) SHA1(a5279d1ada5a13df14a8bbc18ceeea79f82a4c23) )
ROM_LOAD( "20.3g", 0x08000, 0x2000, CRC(6fa3918b) SHA1(658bdbdc581732922c986b07746a9601d86ec5a2) )
ROM_LOAD( "21.5g", 0x0a000, 0x2000, CRC(dd52eda4) SHA1(773e92c918f5b076ce3cae55a33a27c38d958edf) )
ROM_LOAD( "22.6g", 0x0c000, 0x2000, CRC(4afc98ff) SHA1(a34d63befdb3c749460d1cfb62e15ced52859b9b) )
ROM_REGION( 0x10000, "user1", 0 ) // surface scroll control
ROM_LOAD16_BYTE( "4.18b", 0x00000, 0x2000, CRC(1550942e) SHA1(436424d63ca576d13b0f4a3713f009a38e33f2f3) )
ROM_LOAD16_BYTE( "5.20b", 0x00001, 0x2000, CRC(3b93017f) SHA1(b1b67c2050c8033c29bb74ab909075c39e4f7c6a) )
// BG control data
ROM_LOAD( "9.18d", 0x04000, 0x2000, CRC(9ecc9ab8) SHA1(ea5fbd9e9ce09e25f532dc74623e0f7e8464b7f3) ) // surface
ROM_LOAD( "10.20d", 0x06000, 0x2000, CRC(e2ff7293) SHA1(d93c30f7edac53747efcf840325a8ce5f5e47b32) ) // underground
// background tiles
ROM_LOAD( "11.15f", 0x08000, 0x2000, CRC(91f3edb6) SHA1(64e8008cad0e9c42c2ee972c2ee867c7c51cae27) ) // surface
ROM_LOAD( "12.17f", 0x0a000, 0x2000, CRC(99771eff) SHA1(5a1e2316b4055a1332d9d1f02edee5bc6aae90ac) ) // underground
ROM_LOAD( "13.18f", 0x0c000, 0x2000, CRC(75f30159) SHA1(d188ccf926e7a842e90ebc1aad3dc20c37d84b98) ) // surface of mechanical level
ROM_LOAD( "14.20f", 0x0e000, 0x2000, CRC(96babcba) SHA1(fec58ccc1e5cc2cec56658a412b94fe7b989541d) ) // underground of mechanical level
// the PROMs weren't dumped for this set
ROM_REGION( 0x0200, "user2", 0 ) // BG control data
ROM_LOAD( "mag_b.14d", 0x0000, 0x0100, CRC(a0fb7297) SHA1(e6461050e7e586475343156aae1066b944ceab66) ) // background control PROM
ROM_LOAD( "mag_c.15d", 0x0100, 0x0100, CRC(d84a6f78) SHA1(f2ce329b1adf39bde6df2eb79be6d144adea65d0) ) // background control PROM
ROM_REGION( 0x0500, "proms", 0 ) // color PROMs
ROM_LOAD( "mag_e.10f", 0x0000, 0x0100, CRC(75e4f06a) SHA1(cdaccc3e56df4ac9ace04b93b3bab9a62f1ea6f5) ) // red
ROM_LOAD( "mag_d.10e", 0x0100, 0x0100, CRC(34b6a6e3) SHA1(af254ccf0d38e1f4644375cd357d468ad4efe450) ) // green
ROM_LOAD( "mag_a.10d", 0x0200, 0x0100, CRC(a7ea7718) SHA1(4789586d6795644517a18f179b4ae5f23737b21d) ) // blue
ROM_LOAD( "mag_g.2e", 0x0300, 0x0100, CRC(830be358) SHA1(f412587718040a783c4e6453619930c90daf385e) ) // sprites color lookup table
ROM_LOAD( "mag_f.13b", 0x0400, 0x0100, CRC(4a6f9a6d) SHA1(65f1e0bfacd1f354ece1b18598a551044c27c4d1) ) // state machine data used for video signals generation (not used in emulation)
ROM_END
GAME( 1985, magmax, 0, magmax, magmax, magmax_state, empty_init, ROT0, "Nichibutsu", "Mag Max", MACHINE_SUPPORTS_SAVE )
GAME( 1985, magmax, 0, magmax, magmax, magmax_state, empty_init, ROT0, "Nichibutsu", "Mag Max (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 1985, magmaxa, magmax, magmax, magmax, magmax_state, empty_init, ROT0, "Nichibutsu", "Mag Max (set 2)", MACHINE_SUPPORTS_SAVE )

View File

@ -788,4 +788,4 @@ ROM_START( schick )
ROM_END
GAME( 1988, schick, 0, schick, schick, schick_state, init_schick, ROT90, "Microhard", "Super Chick", MACHINE_NOT_WORKING | MACHINE_NO_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )
GAME( 1988, schick, 0, schick, schick, schick_state, init_schick, ROT90, "Microhard", "Super Chick", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE )

View File

@ -3677,4 +3677,4 @@ GAME( 2001, aoh, 0, aoh, aoh, vamphalf_state, init
GAME( 2001, boonggab, 0, boonggab, boonggab, vamphalf_state, init_boonggab, ROT270, "Taff System", "Boong-Ga Boong-Ga (Spank'em!)", MACHINE_SUPPORTS_SAVE )
GAME( 199?, yorijori, 0, yorijori, yorijori, vamphalf_qdsp_state, init_yorijori, ROT0, "Golden Bell Entertainment", "Yori Jori Kuk Kuk", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ROM patch needed to boot
GAME( 2002, yorijori, 0, yorijori, yorijori, vamphalf_qdsp_state, init_yorijori, ROT0, "Golden Bell Entertainment", "Yori Jori Kuk Kuk", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ROM patch needed to boot

View File

@ -57,7 +57,7 @@ private:
uint8_t m_LS74_q;
uint8_t m_gain_control;
emu_timer *m_interrupt_timer;
int m_flipscreen;
uint8_t m_flipscreen;
std::unique_ptr<uint32_t[]> m_prom_tab;
bitmap_ind16 m_bitmap;
@ -67,7 +67,7 @@ private:
void ay8910_portB_0_w(uint8_t data);
void ay8910_portA_0_w(uint8_t data);
void magmax_palette(palette_device &palette) const;
void palette(palette_device &palette) const;
uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(scanline_callback);

View File

@ -20455,6 +20455,7 @@ magictga // (c) 199? Acclaim
@source:magmax.cpp
magmax // (c) 1985
magmaxa // (c) 1985
@source:magnum.cpp
magnum //

View File

@ -26,7 +26,7 @@ Additional tweaking by Jarek Burczynski
bit 0 -- 2.2kohm resistor -- RED/GREEN/BLUE
***************************************************************************/
void magmax_state::magmax_palette(palette_device &palette) const
void magmax_state::palette(palette_device &palette) const
{
const uint8_t *color_prom = memregion("proms")->base();
@ -47,7 +47,7 @@ void magmax_state::magmax_palette(palette_device &palette) const
for (int i = 0; i < 0x10; i++)
palette.set_pen_indirect(i, i);
// sprites use colors 0x10-0x1f, color 0x1f being transparen
// sprites use colors 0x10-0x1f, color 0x1f being transparent
for (int i = 0; i < 0x100; i++)
{
uint8_t const ctabentry = (color_prom[i] & 0x0f) | 0x10;
@ -64,14 +64,14 @@ void magmax_state::video_start()
{
uint8_t * prom14D = memregion("user2")->base();
/* Set up save state */
// Set up save state
save_item(NAME(m_flipscreen));
m_prom_tab = std::make_unique<uint32_t[]>(256);
m_screen->register_screen_bitmap(m_bitmap);
/* Allocate temporary bitmap */
// Allocate temporary bitmap
for (int i = 0; i < 256; i++)
{
int v = (prom14D[i] << 4) + prom14D[i + 0x100];
@ -83,21 +83,21 @@ void magmax_state::video_start()
uint32_t magmax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
/* bit 2 flip screen */
// bit 2 flip screen
m_flipscreen = *m_vreg & 0x04;
/* copy the background graphics */
if (*m_vreg & 0x40) /* background disable */
// copy the background graphics
if (*m_vreg & 0x40) // background disable
bitmap.fill(0, cliprect);
else
{
uint32_t scroll_h = (*m_scroll_x) & 0x3fff;
uint32_t scroll_v = (*m_scroll_y) & 0xff;
/*clear background-over-sprites bitmap*/
// clear background-over-sprites bitmap
m_bitmap.fill(0);
for (int v = 2*8; v < 30*8; v++) /*only for visible area*/
for (int v = 2*8; v < 30*8; v++) // only for visible area
{
uint16_t line_data[256];
@ -110,12 +110,7 @@ uint32_t magmax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
for (int h = 0; h < 0x100; h++)
{
uint32_t graph_data;
uint32_t graph_color;
uint32_t LS283;
uint32_t prom_data;
LS283 = scroll_h + h;
uint32_t LS283 = scroll_h + h;
if (!map_v_scr_100)
{
@ -125,7 +120,7 @@ uint32_t magmax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
LS283 = LS283 + m_rom18B[ map_v_scr_1fe_6 + h ] + 0xff01;
}
prom_data = m_prom_tab[ (LS283 >> 6) & 0xff ];
uint32_t prom_data = m_prom_tab[ (LS283 >> 6) & 0xff ];
rom18D_addr &= 0x20f8;
rom18D_addr += (prom_data & 0x1f00) + ((LS283 & 0x38) >>3);
@ -134,16 +129,16 @@ uint32_t magmax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
rom15F_addr += (m_rom18B[0x4000 + rom18D_addr ]<<5) + ((LS283 & 0x6)>>1);
rom15F_addr += (prom_data & 0x4000);
graph_color = (prom_data & 0x0070);
uint32_t graph_color = (prom_data & 0x0070);
graph_data = m_rom18B[0x8000 + rom15F_addr];
uint32_t graph_data = m_rom18B[0x8000 + rom15F_addr];
if ((LS283 & 1))
graph_data >>= 4;
graph_data &= 0x0f;
line_data[h] = pen_base + graph_color + graph_data;
/*priority: background over sprites*/
// priority: background over sprites
if (map_v_scr_100 && ((graph_data & 0x0c)==0x0c))
m_bitmap.pix(v, h) = line_data[h];
}
@ -160,7 +155,7 @@ uint32_t magmax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
}
}
/* draw the sprites */
// draw the sprites
for (int offs = 0; offs < m_spriteram.bytes()/2; offs += 4)
{
int sy = m_spriteram[offs] & 0xff;
@ -184,10 +179,10 @@ uint32_t magmax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
flipy = !flipy;
}
if (code & 0x80) /* sprite bankswitch */
if (code & 0x80) // sprite bankswitch
code += (*m_vreg & 0x30) * 0x8;
m_gfxdecode->gfx(1)->transmask(bitmap,cliprect,
m_gfxdecode->gfx(1)->transmask(bitmap, cliprect,
code,
color,
flipx, flipy,
@ -196,10 +191,10 @@ uint32_t magmax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
}
}
if (!(*m_vreg & 0x40)) /* background disable */
copybitmap_trans(bitmap, m_bitmap, m_flipscreen,m_flipscreen,0,0, cliprect, 0);
if (!(*m_vreg & 0x40)) // background disable
copybitmap_trans(bitmap, m_bitmap, m_flipscreen, m_flipscreen, 0, 0, cliprect, 0);
/* draw the foreground characters */
// draw the foreground characters
for (int offs = 32*32-1; offs >= 0; offs -= 1)
{
//int page = (*m_vreg>>3) & 0x1;
@ -216,7 +211,7 @@ uint32_t magmax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
sy = 31 - sy;
}
m_gfxdecode->gfx(0)->transpen(bitmap,cliprect,
m_gfxdecode->gfx(0)->transpen(bitmap, cliprect,
code,
0,
m_flipscreen, m_flipscreen,