tubep: remove some tag lookups

This commit is contained in:
hap 2023-01-04 14:58:35 +01:00
parent fcee73320b
commit 37520a1e2d
10 changed files with 164 additions and 166 deletions

View File

@ -118,6 +118,7 @@ void es8712_device::es8712_state_save_register()
void es8712_device::play()
{
assert(m_msm.found());
if (m_start < m_end)
{
if (!m_playing)
@ -172,23 +173,31 @@ void es8712_device::write(offs_t offset, uint8_t data)
{
switch (offset)
{
case 00: m_start &= 0x000fff00;
m_start |= ((data & 0xff) << 0); break;
case 01: m_start &= 0x000f00ff;
m_start |= ((data & 0xff) << 8); break;
case 02: m_start &= 0x0000ffff;
m_start |= ((data & 0x0f) << 16); break;
case 03: m_end &= 0x000fff00;
m_end |= ((data & 0xff) << 0); break;
case 04: m_end &= 0x000f00ff;
m_end |= ((data & 0xff) << 8); break;
case 05: m_end &= 0x0000ffff;
m_end |= ((data & 0x0f) << 16); break;
case 06:
play(); break;
default: break;
case 0: case 1: case 2:
{
uint8_t shift = offset * 8;
m_start &= ~(0xff << shift);
m_start |= data << shift;
m_start &= 0xfffff;
break;
}
case 3: case 4: case 5:
{
uint8_t shift = (offset - 3) * 8;
m_end &= ~(0xff << shift);
m_end |= data << shift;
m_end &= 0xfffff;
break;
}
case 6:
play();
break;
default:
break;
}
m_start &= 0xfffff; m_end &= 0xfffff;
}
uint8_t es8712_device::read(offs_t offset)
@ -209,6 +218,7 @@ void es8712_device::msm_int(int state)
{
if (!state || !m_playing)
return;
if (m_base_offset >= 0x100000 || m_base_offset > m_end)
{
m_playing = 0;

View File

@ -1256,7 +1256,7 @@ ROM_START( witchstar ) // Licensed for Korea
ROM_END
ROM_START( pbchmp95 ) // Licensed for Germany?
ROM_START( pbchmp95 ) // Licensed for Netherlands?
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "3.bin", 0x00000, 0x20000, CRC(e881aa05) SHA1(10d259396cac4b9a1b72c262c11ffa5efbdac433) )

View File

@ -337,7 +337,7 @@ void chessking_state::chesskng(machine_config &config)
SPEAKER(config, "mono").front_center();
BEEP(config, m_beeper, 0);
m_beeper->add_route(ALL_OUTPUTS, "mono", 0.5);
m_beeper->add_route(ALL_OUTPUTS, "mono", 0.25);
// Cartridge
GENERIC_CARTSLOT(config, m_cart, generic_linear_slot, "chessking_cart");

View File

@ -2,7 +2,7 @@
// copyright-holders:
/****************************************************************************
Skeleton driver for 4th Generation "Super Chexx" bubble jockey
Skeleton driver for 4th Generation "Super Chexx" bubble hockey
electromechanical machines
****************************************************************************/

View File

@ -554,15 +554,9 @@ static INPUT_PORTS_START( ipminvad )
PORT_DIPNAME( 0x10, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unused ) ) // Verified with debugger
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x20, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_DIPUNUSED( 0x20, 0x00 ) // Verified with debugger
PORT_DIPUNUSED( 0x40, 0x00 )
PORT_DIPUNUSED( 0x80, 0x00 )
PORT_START("FAKE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, m10_state, coin_inserted, 0)

View File

@ -146,7 +146,6 @@ uint32_t shisen_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
// this game doesn't have cocktail mode so if there's software control we don't know where it is mapped.
flip_screen_set(~m_dsw2->read() & 1);
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
return 0;
}

View File

@ -142,7 +142,7 @@ void tubep_state::tubep_main_map(address_map &map)
map(0xa000, 0xa7ff).ram();
map(0xc000, 0xc7ff).w(FUNC(tubep_state::tubep_textram_w)).share("textram"); /* RAM on GFX PCB @B13 */
map(0xe000, 0xe7ff).writeonly().share("share1");
map(0xe800, 0xebff).writeonly().share("backgroundram"); /* row of 8 x 2147 RAMs on main PCB */
map(0xe800, 0xebff).writeonly().share("bgram"); /* row of 8 x 2147 RAMs on main PCB */
}
@ -189,10 +189,10 @@ void tubep_state::tubep_second_map(address_map &map)
map(0x0000, 0x7fff).rom();
map(0xa000, 0xa000).w(FUNC(tubep_state::background_a000_w));
map(0xc000, 0xc000).w(FUNC(tubep_state::background_c000_w));
map(0xe000, 0xe7ff).ram().share("share1"); /* 6116 #1 */
map(0xe800, 0xebff).writeonly().share("backgroundram"); /* row of 8 x 2147 RAMs on main PCB */
map(0xf000, 0xf3ff).lw8([this](offs_t off, u8 data) { m_sprite_colorsharedram[off] = data; }, "sc_w"); /* sprites color lookup table */
map(0xf800, 0xffff).ram().share("share2"); /* program copies here part of shared ram ?? */
map(0xe000, 0xe7ff).ram().share("share1"); /* 6116 #1 */
map(0xe800, 0xebff).writeonly().share("bgram"); /* row of 8 x 2147 RAMs on main PCB */
map(0xf000, 0xf3ff).writeonly().share("sprite_cram"); /* sprites color lookup table */
map(0xf800, 0xffff).ram().share("share2"); /* program copies here part of shared ram ?? */
}
@ -326,7 +326,7 @@ void tubep_state::machine_reset()
/* MS2010-A CPU (equivalent to NSC8105 with one new opcode: 0xec) on graphics PCB */
void tubep_state::nsc_map(address_map &map)
{
map(0x0000, 0x03ff).ram().share("sprite_color");
map(0x0000, 0x03ff).ram().share("sprite_cram");
map(0x0800, 0x0fff).ram().share("share2");
map(0x2000, 0x2009).w(FUNC(tubep_state::sprite_control_w));
map(0x200a, 0x200b).nopw(); /* not used by the games - perhaps designed for debugging */
@ -379,7 +379,7 @@ void rjammer_state::rjammer_second_map(address_map &map)
map(0x0000, 0x7fff).rom();
map(0xa000, 0xa7ff).ram(); /* M5M5117P @21G */
map(0xe000, 0xe7ff).ram().share("share1"); /* MB8416 on daughterboard (the one on the right) */
map(0xe800, 0xefff).ram().share("rjammer_bgram");/* M5M5117P @19B (background) */
map(0xe800, 0xefff).ram().share("bgram");/* M5M5117P @19B (background) */
map(0xf800, 0xffff).ram().share("share2");
}
@ -524,7 +524,7 @@ void rjammer_state::voice_input_w(uint8_t data)
I do it here because this port (0x80) is first one accessed
in the interrupt routine.
*/
m_soundcpu->set_input_line(0, CLEAR_LINE );
m_soundcpu->set_input_line(0, CLEAR_LINE);
}
@ -594,7 +594,6 @@ void tubep_state::ay8910_portB_2_w(uint8_t data)
*
*************************************/
static INPUT_PORTS_START( tubep )
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
@ -926,27 +925,27 @@ void rjammer_state::rjammer(machine_config &config)
*************************************/
ROM_START( tubep )
ROM_REGION( 0x10000,"maincpu", 0 ) /* Z80 (master) cpu code */
ROM_REGION( 0x10000, "maincpu", 0 ) /* Z80 (master) cpu code */
ROM_LOAD( "tp-p.5", 0x0000, 0x2000, CRC(d5e0cc2f) SHA1(db9b062b14af52bb5458fe71996da295a69148ac) )
ROM_LOAD( "tp-p.6", 0x2000, 0x2000, CRC(97b791a0) SHA1(20ef87b3d3bdfc8b983bcb8231252f81d98ad452) )
ROM_LOAD( "tp-p.7", 0x4000, 0x2000, CRC(add9983e) SHA1(70a517451553a8c0e74a1995d9afddb779efc92c) )
ROM_LOAD( "tp-p.8", 0x6000, 0x2000, CRC(b3793cb5) SHA1(0ed622b6bb97b9877acb6dc174edcd9977fa784e) )
ROM_REGION( 0x10000,"slave", 0 ) /* Z80 (slave) cpu code */
ROM_REGION( 0x10000, "slave", 0 ) /* Z80 (slave) cpu code */
ROM_LOAD( "tp-p.1", 0x0000, 0x2000, CRC(b4020fcc) SHA1(437a037adedd596d295a0b6e400d64dee6c4488e) )
ROM_LOAD( "tp-p.2", 0x2000, 0x2000, CRC(a69862d6) SHA1(7180cc26cd11d2daf453fcda8e6cc90851068bc4) )
ROM_LOAD( "tp-p.3", 0x4000, 0x2000, CRC(f1d86e00) SHA1(5c26f20f49e09a736cede4f276f5bdf76f932400) )
ROM_LOAD( "tp-p.4", 0x6000, 0x2000, CRC(0a1027bc) SHA1(2ebb53a1da53a9c3f0b99da084030c4d2b62a7b3) )
ROM_REGION( 0x10000,"soundcpu", 0 ) /* Z80 (sound) cpu code */
ROM_REGION( 0x10000, "soundcpu", 0 ) /* Z80 (sound) cpu code */
ROM_LOAD( "tp-s.1", 0x0000, 0x2000, CRC(78964fcc) SHA1(a2c6119275d6291d82ac11dcffdaf2e8726e935a) )
ROM_LOAD( "tp-s.2", 0x2000, 0x2000, CRC(61232e29) SHA1(a9ef0fefb7250392ef51173b69a69c903ff91ee8) )
ROM_REGION( 0x10000,"mcu", 0 ) /* 64k for the custom CPU */
ROM_REGION( 0x10000, "mcu", 0 ) /* 64k for the custom CPU */
ROM_LOAD( "tp-g5.e1", 0xc000, 0x2000, CRC(9f375b27) SHA1(9666d1b20169d899176fbdf5954df41df06b4b82) )
ROM_LOAD( "tp-g6.d1", 0xe000, 0x2000, CRC(3ea127b8) SHA1(a5f83ee0eb871da81eeaf839499baf14b986c69e) )
ROM_REGION( 0xc000, "user1", 0 ) /* background data */
ROM_REGION( 0xc000, "background", 0 ) /* background data */
ROM_LOAD( "tp-b.1", 0x0000, 0x2000, CRC(fda355e0) SHA1(3270c65a4ee5d01388727f38691f7fe38f541031) )
ROM_LOAD( "tp-b.2", 0x2000, 0x2000, CRC(cbe30149) SHA1(e66057286bea3026743f6de27a7e8dc8a709f8f7) )
ROM_LOAD( "tp-b.3", 0x4000, 0x2000, CRC(f5d118e7) SHA1(a899bef3accef8995c457e8142a0001eed033fae) )
@ -954,7 +953,7 @@ ROM_START( tubep )
ROM_LOAD( "tp-b.5", 0x8000, 0x2000, CRC(4dabea43) SHA1(72b9df9a3665baf34fb1f7301c5b9dd2619ed206) )
ROM_LOAD( "tp-b.6", 0xa000, 0x2000, CRC(01952144) SHA1(d1074c79b51d3e2c152c9f3df6892027fe3a0e00) )
ROM_REGION( 0x18000,"user2", 0 )
ROM_REGION( 0x18000, "sprites", 0 )
ROM_LOAD( "tp-c.1", 0x0000, 0x2000, CRC(ec002af2) SHA1(f9643c2ff01412d3da42b050bce4cf7f7d2e6f6a) )
ROM_LOAD( "tp-c.2", 0x2000, 0x2000, CRC(c44f7128) SHA1(e05c00a7094b3fbf7ac6ed6ed38e1b227d462b27) )
ROM_LOAD( "tp-c.3", 0x4000, 0x2000, CRC(4146b0c9) SHA1(cd3d620531660834530c64cdf1ef0659f9f6f437) )
@ -971,17 +970,17 @@ ROM_START( tubep )
ROM_LOAD( "tp-g7.h2", 0x14000, 0x2000, CRC(105cb9e4) SHA1(b9d8ffe35c1f66aa401e5d8e415bf7c016ff53bb) )
ROM_LOAD( "tp-g8.i2", 0x16000, 0x2000, CRC(27e5e6c1) SHA1(f3896d0006351d165e36bafa4340175077b3d6ba) )
ROM_REGION( 0x1000, "gfx1", 0 )
ROM_REGION( 0x1000, "text", 0 )
ROM_LOAD( "tp-g3.c10", 0x0000, 0x1000, CRC(657a465d) SHA1(848217c3b736550586e8e9ba7a6e99e884094066) ) /* text characters */
ROM_REGION( 0x40, "proms", 0 ) /* color proms */
ROM_REGION( 0x40, "proms", 0 ) /* color proms */
ROM_LOAD( "tp-2.c12", 0x0000, 0x0020, CRC(ac7e582f) SHA1(9d8f9eda7130b49b91d9c63bafa119b2a91eeda0) ) /* text and sprites palette */
ROM_LOAD( "tp-1.c13", 0x0020, 0x0020, CRC(cd0910d6) SHA1(1e6dae16115d5a03bbaf76c695327a06eb6da602) ) /* color control prom */
ROM_END
ROM_START( tubepb )
ROM_REGION( 0x10000,"maincpu", 0 ) /* Z80 (master) cpu code */
ROM_REGION( 0x10000, "maincpu", 0 ) /* Z80 (master) cpu code */
ROM_LOAD( "a15.bin", 0x0000, 0x1000, CRC(806370a8) SHA1(c1915fae15bd766ffbd3c47d65ade51d36117eb8) )
ROM_LOAD( "a16.bin", 0x1000, 0x1000, CRC(0917fb76) SHA1(1ce2680700d6ce28dfd202f238f1fc6e9c4a2758) )
ROM_LOAD( "a13.bin", 0x2000, 0x1000, CRC(6e4bb47e) SHA1(092eba1a90f43eb298ee9e4dc0f13d5411a14b4a) )
@ -991,7 +990,7 @@ ROM_START( tubepb )
ROM_LOAD( "a9.bin", 0x6000, 0x1000, CRC(a20de3d1) SHA1(84f2417597dbaecace0ce72a1684345fb212fc3a) )
ROM_LOAD( "a10.bin", 0x7000, 0x1000, CRC(033ba70c) SHA1(de561c5db7cd493aee05e3513e48d52ed95bd510) )
ROM_REGION( 0x10000,"slave", 0 ) /* Z80 (slave) cpu code */
ROM_REGION( 0x10000, "slave", 0 ) /* Z80 (slave) cpu code */
ROM_LOAD( "a1.bin", 0x0000, 0x1000, CRC(8a68523d) SHA1(268c659a2312e4d1a29e2064f55dfa07e57f6bca) )
ROM_LOAD( "a2.bin", 0x1000, 0x1000, CRC(d15a8645) SHA1(9970377ff49ac525f2ef21c36ded8e7447ed700c) )
ROM_LOAD( "a3.bin", 0x2000, 0x1000, CRC(7acf777c) SHA1(042b051de8fcc1295aca459f762619771438625e) )
@ -1001,15 +1000,15 @@ ROM_START( tubepb )
ROM_LOAD( "a7.bin", 0x6000, 0x1000, CRC(417dd321) SHA1(aa0faa19eed1397e46a67e8793c5a27991ea9c1b) )
ROM_LOAD( "a8.bin", 0x7000, 0x1000, CRC(d26ab4c0) SHA1(8d92386e75114494d65df4cfebdbacd09fddb48e) )
ROM_REGION( 0x10000,"soundcpu", 0 ) /* Z80 (sound) cpu code */
ROM_REGION( 0x10000, "soundcpu", 0 ) /* Z80 (sound) cpu code */
ROM_LOAD( "15.bin", 0x0000, 0x2000, CRC(78964fcc) SHA1(a2c6119275d6291d82ac11dcffdaf2e8726e935a) )
ROM_LOAD( "16.bin", 0x2000, 0x2000, CRC(61232e29) SHA1(a9ef0fefb7250392ef51173b69a69c903ff91ee8) )
ROM_REGION( 0x10000,"mcu", 0 ) /* 64k for the custom CPU */
ROM_REGION( 0x10000, "mcu", 0 ) /* 64k for the custom CPU */
ROM_LOAD( "5.bin", 0xc000, 0x2000, CRC(9f375b27) SHA1(9666d1b20169d899176fbdf5954df41df06b4b82) )
ROM_LOAD( "6.bin", 0xe000, 0x2000, CRC(46a273b5) SHA1(ff862c9337b3eeadee5a3d3f0837931a7a71393e) )
ROM_REGION( 0xc000, "user1", 0 ) /* background data */
ROM_REGION( 0xc000, "background", 0 ) /* background data */
ROM_LOAD( "9.bin", 0x0000, 0x2000, CRC(fda355e0) SHA1(3270c65a4ee5d01388727f38691f7fe38f541031) )
ROM_LOAD( "10.bin", 0x2000, 0x2000, CRC(0ccb23b0) SHA1(71660a3476ed299684e5662058b8c40153d4a168) )
ROM_LOAD( "11.bin", 0x4000, 0x2000, CRC(f5d118e7) SHA1(a899bef3accef8995c457e8142a0001eed033fae) )
@ -1017,7 +1016,7 @@ ROM_START( tubepb )
ROM_LOAD( "13.bin", 0x8000, 0x2000, CRC(4dabea43) SHA1(72b9df9a3665baf34fb1f7301c5b9dd2619ed206) )
ROM_LOAD( "14.bin", 0xa000, 0x2000, CRC(01952144) SHA1(d1074c79b51d3e2c152c9f3df6892027fe3a0e00) )
ROM_REGION( 0x18000,"user2", 0 )
ROM_REGION( 0x18000, "sprites", 0 )
ROM_LOAD( "d1.bin", 0x0000, 0x1000, CRC(702348d7) SHA1(717e48d8c3529acb9a216b4e99df1599fb2e6b3b) )
ROM_LOAD( "d2.bin", 0x1000, 0x1000, CRC(47601e8b) SHA1(4e56fe72644a000648199e92b306365c100cca30) )
ROM_LOAD( "d3.bin", 0x2000, 0x1000, CRC(caad3ee2) SHA1(a99b8da36bf26a193d92fa807f168e60ed4bdce5) )
@ -1034,7 +1033,7 @@ ROM_START( tubepb )
ROM_LOAD( "d12.bin", 0xd000, 0x1000, CRC(77e72279) SHA1(594e8018d64fd9862f54de0152723e610163e1b8) )
ROM_LOAD( "d9.bin", 0xe000, 0x1000, CRC(7a0edea8) SHA1(ca98c35ef2007363ead3d24a8556e24df031308b) )
ROM_LOAD( "d10.bin", 0xf000, 0x1000, CRC(0c1c2cb1) SHA1(addc9cea5247b25c114b88e3e9e1804305aa53c8) )
ROM_LOAD( "4.bin", 0x10000, 0x1000, CRC(40a1fe00) SHA1(2e1e12efe8083bf96233016a7712e6e486d968e4) ) /* 2732 eprom is used, but the PCB is prepared for 2764 eproms */
ROM_LOAD( "4.bin", 0x10000, 0x1000, CRC(40a1fe00) SHA1(2e1e12efe8083bf96233016a7712e6e486d968e4) ) /* 2732 eprom is used, but the PCB is prepared for 2764 eproms */
ROM_RELOAD( 0x11000, 0x1000 )
ROM_LOAD( "1.bin", 0x12000, 0x1000, CRC(4a7407a2) SHA1(7ca4e03c637a6f1c338ca438a7ab9e4ba537fee0) )
ROM_LOAD( "2.bin", 0x13000, 0x1000, CRC(f0b26c2e) SHA1(54057c619675bb384035547becd2019974bf23fa) )
@ -1042,46 +1041,46 @@ ROM_START( tubepb )
ROM_LOAD( "7.bin", 0x14000, 0x2000, CRC(105cb9e4) SHA1(b9d8ffe35c1f66aa401e5d8e415bf7c016ff53bb) )
ROM_LOAD( "8.bin", 0x16000, 0x2000, CRC(27e5e6c1) SHA1(f3896d0006351d165e36bafa4340175077b3d6ba) )
ROM_REGION( 0x1000, "gfx1", 0 )
ROM_REGION( 0x1000, "text", 0 )
ROM_LOAD( "3.bin", 0x0000, 0x1000, CRC(657a465d) SHA1(848217c3b736550586e8e9ba7a6e99e884094066) ) /* text characters */
ROM_REGION( 0x40, "proms", 0 ) /* color proms */
ROM_REGION( 0x40, "proms", 0 ) /* color proms */
ROM_LOAD( "prom6331.b", 0x0000, 0x0020, CRC(ac7e582f) SHA1(9d8f9eda7130b49b91d9c63bafa119b2a91eeda0) ) /* text and sprites palette */
ROM_LOAD( "prom6331.a", 0x0020, 0x0020, CRC(cd0910d6) SHA1(1e6dae16115d5a03bbaf76c695327a06eb6da602) ) /* color control prom */
ROM_END
ROM_START( rjammer )
ROM_REGION( 0x10000,"maincpu", 0 ) /* Z80 (master) cpu code */
ROM_REGION( 0x10000, "maincpu", 0 ) /* Z80 (master) cpu code */
ROM_LOAD( "tp-p.1", 0x0000, 0x2000, CRC(93eeed67) SHA1(9ccfc49f42c6b451ff1c541d6487276f4bf9338e) )
ROM_LOAD( "tp-p.2", 0x2000, 0x2000, CRC(ed2830c4) SHA1(078046e88604617342d29f0f4a0473fe6d484b19) )
ROM_LOAD( "tp-p.3", 0x4000, 0x2000, CRC(e29f25e3) SHA1(21abf0e7c315fac15dd39355c16f9401c2cf4593) )
ROM_LOAD( "tp-p.4", 0x8000, 0x2000, CRC(6ed71fbc) SHA1(821506943b980077a9b4f309db095be7e952b13d) )
ROM_CONTINUE( 0x6000, 0x2000 )
ROM_REGION( 0x10000,"slave", 0 ) /* Z80 (slave) cpu code */
ROM_REGION( 0x10000, "slave", 0 ) /* Z80 (slave) cpu code */
ROM_LOAD( "tp-p.8", 0x0000, 0x2000, CRC(388b9c66) SHA1(6d3e614736a7f06c26191699e8a8a13b239b259f) )
ROM_LOAD( "tp-p.7", 0x2000, 0x2000, CRC(595030bb) SHA1(00dd0b3af965a2768c71297ba2a358050bdb8ef7) )
ROM_LOAD( "tp-p.6", 0x4000, 0x2000, CRC(b5aa0f89) SHA1(d7e8b7e76fe6e5ef1d9bcad8469d56b81c9509ac) )
ROM_LOAD( "tp-p.5", 0x6000, 0x2000, CRC(56eae9ac) SHA1(e5cd75df0c38021b81de2abf049b12c10db4f3cb) )
ROM_REGION( 0x10000,"soundcpu", 0 ) /* Z80 (sound) cpu code */
ROM_REGION( 0x10000, "soundcpu", 0 ) /* Z80 (sound) cpu code */
ROM_LOAD( "tp-b1.6d", 0x0000, 0x2000, CRC(b1c2525c) SHA1(7a184142e83982e33bc41cabae6fe804cec78748) )
ROM_LOAD( "tp-s3.4d", 0x2000, 0x2000, CRC(90c9d0b9) SHA1(8657ee93d7b67ba89848bf94e03b5c3bcace92c4) )
ROM_LOAD( "tp-s2.2d", 0x4000, 0x2000, CRC(444b6a1d) SHA1(1252b14d473d764a5326401aac782a1fa3419784) )
ROM_LOAD( "tp-s1.1d", 0x6000, 0x2000, CRC(391097cd) SHA1(d4b48a3f26044b131e65f74479bf1671ad677eb4) )
ROM_REGION( 0x10000,"mcu", 0 ) /* 64k for the custom CPU */
ROM_REGION( 0x10000, "mcu", 0 ) /* 64k for the custom CPU */
ROM_LOAD( "tp-g7.e1", 0xc000, 0x2000, CRC(9f375b27) SHA1(9666d1b20169d899176fbdf5954df41df06b4b82) )
ROM_LOAD( "tp-g8.d1", 0xe000, 0x2000, CRC(2e619fec) SHA1(d3d5fa708ca0097abf12d59ae41cb852278fe45d) )
ROM_REGION( 0x7000, "user1", 0 ) /* background data */
ROM_REGION( 0x7000, "background", 0 ) /* background data */
ROM_LOAD( "tp-b3.13d", 0x0000, 0x1000, CRC(b80ef399) SHA1(75fa17e1bb39363e194737a32db2d92e0cae5e79) )
ROM_LOAD( "tp-b5.11b", 0x1000, 0x2000, CRC(0f260bfe) SHA1(975b7837f6c3c9d743903910fbdc3111c18a5955) )
ROM_LOAD( "tp-b2.11d", 0x3000, 0x2000, CRC(8cd2c917) SHA1(472aceaf4a1050b2513d56b2703e556ac1e2a61a) )
ROM_LOAD( "tp-b4.19c", 0x5000, 0x2000, CRC(6600f306) SHA1(2e25790839a465f5f8729964cfe27a587eb663f5) )
ROM_REGION( 0x18000,"user2", 0 )
ROM_REGION( 0x18000, "sprites", 0 )
ROM_LOAD( "tp-c.8", 0x0000, 0x2000, CRC(9f31ecb5) SHA1(c4b979c7da096648d0c58b2c8a205e1622ee28e9) )
ROM_LOAD( "tp-c.7", 0x2000, 0x2000, CRC(cbf093f1) SHA1(128e01249165a87304eaf8003a9adf6f38d35d5e) )
ROM_LOAD( "tp-c.6", 0x4000, 0x2000, CRC(11f9752b) SHA1(11dcbbfe4e673e379afd67874b64b48cdafa00f5) )
@ -1097,10 +1096,10 @@ ROM_START( rjammer )
ROM_LOAD( "tp-g6.h2", 0x14000, 0x2000, CRC(105cb9e4) SHA1(b9d8ffe35c1f66aa401e5d8e415bf7c016ff53bb) )
ROM_LOAD( "tp-g5.i2", 0x16000, 0x2000, CRC(27e5e6c1) SHA1(f3896d0006351d165e36bafa4340175077b3d6ba) )
ROM_REGION( 0x1000, "gfx1", 0 )
ROM_REGION( 0x1000, "text", 0 )
ROM_LOAD( "tp-g4.c10", 0x0000, 0x1000, CRC(99e72549) SHA1(2509265c2d84ac6144aecd77f1b3f0d16bdcb572) ) /* text characters */
ROM_REGION( 0x40, "proms", 0 ) /* color proms */
ROM_REGION( 0x40, "proms", 0 ) /* color proms */
ROM_LOAD( "16b", 0x0000, 0x0020, CRC(9a12873a) SHA1(70f088b6eb5431e2ac6afcf15531eeb02a169442) ) /* text palette, sprites palette */
ROM_LOAD( "16a", 0x0020, 0x0020, CRC(90222a71) SHA1(c3fd49c8075b0af451f6d2a142a4c4a2e397ac08) ) /* background palette */
ROM_END

View File

@ -23,9 +23,12 @@ public:
m_mcu(*this, "mcu"),
m_soundlatch(*this, "soundlatch"),
m_screen(*this, "screen"),
m_bgram(*this, "bgram"),
m_sprite_cram(*this, "sprite_cram"),
m_textram(*this, "textram"),
m_backgroundram(*this, "backgroundram"),
m_sprite_colorsharedram(*this, "sprite_color")
m_bgrom(*this, "background"),
m_spriterom(*this, "sprites"),
m_textrom(*this, "text")
{ }
void tubepb(machine_config &config);
@ -81,9 +84,12 @@ protected:
required_device<m6802_cpu_device> m_mcu;
required_device<generic_latch_8_device> m_soundlatch;
required_device<screen_device> m_screen;
required_shared_ptr<uint8_t> m_bgram;
required_shared_ptr<uint8_t> m_sprite_cram;
required_shared_ptr<uint8_t> m_textram;
optional_shared_ptr<uint8_t> m_backgroundram;
required_shared_ptr<uint8_t> m_sprite_colorsharedram;
required_region_ptr<uint8_t> m_bgrom;
required_region_ptr<uint8_t> m_spriterom;
required_region_ptr<uint8_t> m_textrom;
emu_timer *m_interrupt_timer = nullptr;
emu_timer *m_sprite_timer = nullptr;
@ -119,8 +125,7 @@ public:
rjammer_state(const machine_config &mconfig, device_type type, const char *tag) :
tubep_state(mconfig, type, tag),
m_msm(*this, "msm"),
m_adpcm_mux(*this, "adpcm_mux"),
m_rjammer_backgroundram(*this, "rjammer_bgram")
m_adpcm_mux(*this, "adpcm_mux")
{ }
void rjammer(machine_config &config);
@ -157,7 +162,6 @@ private:
required_device<msm5205_device> m_msm;
required_device<ls157_device> m_adpcm_mux;
required_shared_ptr<uint8_t> m_rjammer_backgroundram;
bool m_msm5205_toggle = 0;
};

View File

@ -136,7 +136,6 @@
void tubep_state::palette_init(palette_device &palette)
{
const uint8_t *color_prom = memregion("proms")->base();
{
// text palette variables
static constexpr int resistors_txt_rg[3] = { 1000, 470, 220 };
@ -147,7 +146,7 @@ void tubep_state::palette_init(palette_device &palette)
compute_resistor_weights(0, 255, -1.0,
3, resistors_txt_rg, weights_txt_rg, 470, 0,
2, resistors_txt_b, weights_txt_b, 470, 0,
0, nullptr, nullptr, 0, 0 );
0, nullptr, nullptr, 0, 0);
// create text palette
for (int i = 0; i < 32; i++)
@ -258,67 +257,67 @@ void tubep_state::palette_init(palette_device &palette)
/* red component */
if (BIT(j, 0)) /* if LS368 @E9 is disabled */
{
for (int c=0; c<6; c++) bits_r[0 +c] = 0;
for (int c=0; c<6; c++) bits_r[0 + c] = 0;
//active_r-=6;
}
if (BIT(j, 1)) /* if LS368 @E10 is disabled */
{
for (int c=0; c<6; c++) bits_r[6 +c] = 0;
for (int c=0; c<6; c++) bits_r[6 + c] = 0;
//active_r-=6;
}
if (BIT(j, 2)) /* if LS368 @E11 is disabled */
{
for (int c=0; c<6; c++) bits_r[12 +c] = 0;
for (int c=0; c<6; c++) bits_r[12 + c] = 0;
//active_r-=6;
}
/* green component */
if (BIT(j, 3)) /* if LS368 @E12 is disabled */
{
for (int c=0; c<6; c++) bits_g[0 +c] = 0;
for (int c=0; c<6; c++) bits_g[0 + c] = 0;
//active_g-=6;
}
if (BIT(j, 4)) /* if LS368 @E13 is disabled */
{
for (int c=0; c<6; c++) bits_g[6 +c] = 0;
for (int c=0; c<6; c++) bits_g[6 + c] = 0;
//active_g-=6;
}
if (BIT(j, 5)) /* if LS368 @E14 is disabled */
{
for (int c=0; c<6; c++) bits_g[12+c] = 0;
for (int c=0; c<6; c++) bits_g[12+ c] = 0;
//active_g-=6;
}
/* blue component */
if (BIT(j, 6)) /* if LS368 @E15 is disabled */
{
for (int c=0; c<6; c++) bits_b[0 +c] = 0;
for (int c=0; c<6; c++) bits_b[0 + c] = 0;
//active_b-=6;
}
if (BIT(j, 7)) /* if LS368 @E16 is disabled */
{
for (int c=0; c<6; c++) bits_b[6 +c] = 0;
for (int c=0; c<6; c++) bits_b[6 + c] = 0;
//active_b-=6;
}
double out;
out = 0.0;
for (int c = 0; c < 3*6; c++) out += weights_r[c] * bits_r[c];
for (int c = 0; c < 3*6; c++) out += weights_r[c] * bits_r[c];
int const r = int(out + 0.5);
out = 0.0;
for (int c = 0; c < 3*6; c++) out += weights_g[c] * bits_g[c];
for (int c = 0; c < 3*6; c++) out += weights_g[c] * bits_g[c];
int const g = int(out + 0.5);
out = 0.0;
for (int c = 0; c < 2*6; c++) out += weights_b[c] * bits_b[c];
for (int c = 0; c < 2*6; c++) out += weights_b[c] * bits_b[c];
int const b = int(out + 0.5);
//logerror("Calculate [%x:%x] (active resistors:r=%i g=%i b=%i) = ", i, shade, active_r, active_g, active_b);
//logerror("r:%3i g:%3i b:%3i\n",r,g,b);
palette.set_pen_color(32+ i*0x40 + sh, rgb_t(r, g, b));
palette.set_pen_color(32 + i * 0x40 + sh, rgb_t(r, g, b));
}
}
}
@ -357,7 +356,7 @@ void tubep_state::video_start()
void tubep_state::video_reset()
{
memset(m_spritemap.get(),0,256*256*2);
memset(m_spritemap.get(), 0, 256*256*2);
m_romD_addr = 0;
m_romEF_addr = 0;
@ -425,65 +424,62 @@ void tubep_state::draw_sprite()
{
uint32_t XDOT;
uint32_t YDOT;
uint8_t * romCxx = memregion("user2")->base()+0x00000;
uint8_t * romD10 = romCxx+0x10000;
uint8_t * romEF13 = romCxx+0x12000;
uint8_t * romHI2 = romCxx+0x14000;
uint8_t * romCxx = m_spriterom;
uint8_t * romD10 = romCxx + 0x10000;
uint8_t * romEF13 = romCxx + 0x12000;
uint8_t * romHI2 = romCxx + 0x14000;
for (YDOT=0; (YDOT^m_YSize) != 0x00; YDOT++)
for (YDOT = 0; (YDOT ^ m_YSize) != 0x00; YDOT++)
{
/* upper part of the schematic */
uint32_t ls273_e12 = romD10[ m_romD_addr | YDOT ] & 0x7f;
uint32_t ls273_e12 = romD10[m_romD_addr | YDOT] & 0x7f;
uint32_t romEF_addr_now = m_romEF_addr | ls273_e12;
uint32_t E16_add_a = romEF13[ romEF_addr_now ] |
((romEF13[0x1000 + romEF_addr_now ]&0x0f)<<8);
uint32_t E16_add_a = romEF13[romEF_addr_now] | ((romEF13[0x1000 + romEF_addr_now] & 0x0f) << 8);
uint32_t F16_add_b = E16_add_a + m_E16_add_b;
/* lower part of the schematic */
uint32_t romHI_addr = (YDOT) | (m_romHI_addr_mid) | (((m_romHI_addr_msb + 0x800) )&0x1800);
uint32_t ls273_g4 = romHI2[ romHI_addr ];
uint32_t ls273_j4 = romHI2[0x2000+ romHI_addr ];
uint32_t romHI_addr = (YDOT) | (m_romHI_addr_mid) | (((m_romHI_addr_msb + 0x800)) & 0x1800);
uint32_t ls273_g4 = romHI2[romHI_addr];
uint32_t ls273_j4 = romHI2[0x2000 + romHI_addr];
uint32_t ls86_gh5 = ls273_g4 ^ m_VINV;
uint32_t ls86_ij5 = ls273_j4 ^ m_VINV;
uint32_t ls157_gh7= m_ls273_g6 | (m_mark_2);
uint32_t ls157_ij7= m_ls273_j6 | (m_mark_1);
uint32_t ls283_gh8= (m_VINV & 1) + ls86_gh5 + ((ls86_gh5 & 0x80)<<1) + ls157_gh7;
uint32_t ls283_ij8= (m_VINV & 1) + ls86_ij5 + ((ls86_ij5 & 0x80)<<1) + ls157_ij7;
uint32_t ls157_gh7 = m_ls273_g6 | (m_mark_2);
uint32_t ls157_ij7 = m_ls273_j6 | (m_mark_1);
uint32_t ls283_gh8 = (m_VINV & 1) + ls86_gh5 + ((ls86_gh5 & 0x80) << 1) + ls157_gh7;
uint32_t ls283_ij8 = (m_VINV & 1) + ls86_ij5 + ((ls86_ij5 & 0x80) << 1) + ls157_ij7;
uint32_t ls273_g9 = ls283_gh8;
uint32_t ls273_j9 = ls283_ij8;
for (XDOT=0; (XDOT^m_XSize) != 0x00; XDOT++)
for (XDOT = 0; (XDOT ^ m_XSize) != 0x00; XDOT++)
{
/* upper part of the schematic */
uint32_t romD10_out = romD10[ m_romD_addr | XDOT ];
uint32_t F16_add_a = (romD10_out & 0x7e) >>1;
uint32_t romCxx_addr = (F16_add_a + F16_add_b ) & 0xffff;
uint32_t romCxx_out = romCxx[ romCxx_addr ];
uint32_t romD10_out = romD10[m_romD_addr | XDOT];
uint32_t F16_add_a = (romD10_out & 0x7e) >> 1;
uint32_t romCxx_addr = (F16_add_a + F16_add_b) & 0xffff;
uint32_t romCxx_out = romCxx[romCxx_addr];
uint32_t colorram_addr_lo = (romD10_out&1) ? (romCxx_out>>4)&0x0f: (romCxx_out>>0)&0x0f;
uint32_t colorram_addr_lo = (romD10_out & 1) ? (romCxx_out >> 4) & 0x0f: (romCxx_out >> 0) & 0x0f;
uint8_t sp_data = m_sprite_colorsharedram[ m_colorram_addr_hi | colorram_addr_lo ] & 0x0f; /* 2114 4-bit RAM */
uint8_t sp_data = m_sprite_cram[m_colorram_addr_hi | colorram_addr_lo] & 0x0f; /* 2114 4-bit RAM */
/* lower part of the schematic */
romHI_addr = (XDOT) | (m_romHI_addr_mid) | (m_romHI_addr_msb);
ls273_g4 = romHI2[ romHI_addr ];
ls273_j4 = romHI2[0x2000+ romHI_addr ];
ls273_g4 = romHI2[romHI_addr];
ls273_j4 = romHI2[0x2000 + romHI_addr];
ls86_gh5 = ls273_g4 ^ m_HINV;
ls86_ij5 = ls273_j4 ^ m_HINV;
ls157_gh7= ls273_g9;
ls157_ij7= ls273_j9;
ls283_gh8= (m_HINV & 1) + ls86_gh5 + ((ls86_gh5 & 0x80)<<1) + ls157_gh7;
ls283_ij8= (m_HINV & 1) + ls86_ij5 + ((ls86_ij5 & 0x80)<<1) + ls157_ij7;
ls283_gh8= (m_HINV & 1) + ls86_gh5 + ((ls86_gh5 & 0x80) << 1) + ls157_gh7;
ls283_ij8= (m_HINV & 1) + ls86_ij5 + ((ls86_ij5 & 0x80) << 1) + ls157_ij7;
if ( !((ls283_gh8&256) | (ls283_ij8&256)) ) /* skip wrapped sprite area - PAL12L6 (PLA019 in Roller Jammer schematics)*/
if (!((ls283_gh8 & 0x100) | (ls283_ij8 & 0x100))) /* skip wrapped sprite area - PAL12L6 (PLA019 in Roller Jammer schematics)*/
{
if ( m_spritemap[ (ls283_gh8&255) + (ls283_ij8&255)*256 + m_DISP*256*256 ] == 0x0f )
m_spritemap[ (ls283_gh8&255) + (ls283_ij8&255)*256 + m_DISP*256*256 ] = sp_data;
if (m_spritemap[(ls283_gh8 & 0xff) + (ls283_ij8 & 0xff) * 256 + m_DISP * 256*256] == 0x0f)
m_spritemap[(ls283_gh8 & 0xff) + (ls283_ij8 & 0xff) * 256 + m_DISP * 256*256] = sp_data;
}
}
}
@ -497,19 +493,19 @@ void tubep_state::sprite_control_w(offs_t offset, uint8_t data)
switch(offset)
{
case 0: /*a*/
m_romEF_addr = (0x010 | (data & 0x0f))<<7; /*roms @F13, @E13 have A11 lines connected to +5V directly */
m_romEF_addr = (0x010 | (data & 0x0f)) << 7; /*roms @F13, @E13 have A11 lines connected to +5V directly */
m_HINV = (data & 0x10) ? 0xff: 0x00;
m_VINV = (data & 0x20) ? 0xff: 0x00;
break;
case 1: /*b: XSize-1 */
m_XSize = data & 0x7f;
m_mark_2 = (data&0x80)<<1;
m_mark_2 = (data & 0x80) << 1;
break;
case 2: /*c: YSize-1 */
m_YSize = data & 0x7f;
m_mark_1 = (data&0x80)<<1;
m_mark_1 = (data & 0x80) << 1;
break;
case 3: /*d*/
@ -521,12 +517,12 @@ void tubep_state::sprite_control_w(offs_t offset, uint8_t data)
break;
case 5: /*f*/
m_romHI_addr_mid = (data & 0x0f)<<7;
m_romHI_addr_msb = (data & 0x30)<<7;
m_romHI_addr_mid = (data & 0x0f) << 7;
m_romHI_addr_msb = (data & 0x30) << 7;
break;
case 6: /*g*/
m_romD_addr = (data & 0x3f)<<7;
m_romD_addr = (data & 0x3f) << 7;
break;
case 7: /*h: adder input LSB*/
@ -538,7 +534,7 @@ void tubep_state::sprite_control_w(offs_t offset, uint8_t data)
break;
case 9: /*K*/
/*write to: LS174 @J3 to set color bank (hi address lines to 2114 colorram @J1 ) */
/*write to: LS174 @J3 to set color bank (hi address lines to 2114 colorram @J1) */
m_colorram_addr_hi = (data & 0x3f) << 4;
/*write to: LS74 @D13 to clear the interrupt line /SINT
@ -548,7 +544,7 @@ void tubep_state::sprite_control_w(offs_t offset, uint8_t data)
m_mcu->set_input_line(0, CLEAR_LINE);
/* 2.assert /SINT again after this time */
m_sprite_timer->adjust(attotime::from_hz(19968000/8) * ((m_XSize+1)*(m_YSize+1)));
m_sprite_timer->adjust(attotime::from_hz(19968000 / 8) * ((m_XSize + 1) * (m_YSize + 1)));
/* 3.clear of /SINT starts sprite drawing circuit */
draw_sprite();
@ -562,24 +558,22 @@ void tubep_state::vblank_end()
m_DISP = m_DISP ^ 1;
/* logerror("EOF: DISP after this is=%i, and clearing it now.\n", m_DISP); */
/* clear the new frame (the one that was (just) displayed)*/
memset(m_spritemap.get()+m_DISP*256*256, 0x0f, 256*256);
memset(m_spritemap.get() + m_DISP * 256*256, 0x0f, 256*256);
}
uint32_t tubep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int DISP_ = m_DISP^1;
int DISP_ = m_DISP ^ 1;
pen_t pen_base = 32; //change it later
uint8_t *text_gfx_base = memregion("gfx1")->base();
uint8_t *romBxx = memregion("user1")->base() + 0x2000*m_background_romsel;
uint8_t *romBxx = m_bgrom + 0x2000 * m_background_romsel;
/* logerror(" update: from DISP=%i y_min=%3i y_max=%3i\n", DISP_, cliprect.min_y, cliprect.max_y+1); */
for (uint32_t v = cliprect.min_y; v <= cliprect.max_y; v++) /* only for current scanline */
{
uint32_t sp_data0=0,sp_data1=0,sp_data2=0;
uint32_t sp_data0 = 0, sp_data1 = 0, sp_data2 = 0;
// It appears there is a 1 pixel delay when renderer switches from background to sprite/text,
// this causes text and sprite layers to draw a drop shadow with 1 dot width to the left.
@ -596,11 +590,11 @@ uint32_t tubep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
sp_data2 = sp_data1;
sp_data1 = sp_data0;
sp_data0 = m_spritemap[ h + v*256 +(DISP_*256*256) ];
sp_data0 = m_spritemap[h + v * 256 + (DISP_ * 256*256)];
text_offs = ((v >> 3) << 6) | ((h >> 3) << 1);
text_code = m_textram[text_offs];
text_gfx_data = text_gfx_base[(text_code << 3) | (v & 0x07)];
text_gfx_data = m_textrom[(text_code << 3) | (v & 0x07)];
if (text_gfx_data & (0x80 >> (h & 0x07)))
{
@ -612,30 +606,30 @@ uint32_t tubep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
uint32_t bg_data;
uint32_t sp_data;
uint32_t romB_addr = (((h>>1)&0x3f)^((h&0x80)?0x00:0x3f)) | (((v&0x7f)^((v&0x80)?0x00:0x7f))<<6);
uint32_t romB_addr = (((h >> 1) & 0x3f) ^ ((h & 0x80) ? 0x00 : 0x3f)) | (((v & 0x7f) ^ ((v & 0x80) ? 0x00 : 0x7f)) << 6);
uint8_t rom_select = (h&0x01) ^ (((h&0x80)>>7)^1);
uint8_t rom_select = (h & 0x01) ^ (((h & 0x80) >> 7) ^ 1);
/* read from ROMs: B3/4 or B5/6 */
uint8_t romB_data_h = romBxx[ 0x4000 + 0x4000*rom_select + romB_addr ];
uint8_t romB_data_h = romBxx[0x4000 + 0x4000 * rom_select + romB_addr];
/* romB_data_h = output of LS374 @B3 or @B4 */
uint32_t VR_addr = ((romB_data_h + m_ls175_b7) & 0xfe) << 2;
/* VR_addr = output of LS157s @B1 and @B6 */
uint8_t xor_logic = (((h^v)&0x80)>>7) ^ (m_background_romsel & (((v&0x80)>>7)^1));
uint8_t xor_logic = (((h ^ v) & 0x80) >> 7) ^ (m_background_romsel & (((v & 0x80) >> 7) ^ 1));
/* read from ROMs: B1/2 */
uint8_t romB_data_l = romBxx[ romB_addr ] ^ (xor_logic?0xff:0x00);
uint8_t romB_data_l = romBxx[romB_addr] ^ (xor_logic ? 0xff : 0x00);
/* romB_data_l = output of LS273 @B10 */
uint8_t ls157_b11 = (romB_data_l >> ((rom_select==0)?4:0))&0x0f;
uint8_t ls157_b11 = (romB_data_l >> ((rom_select == 0) ? 4 : 0)) & 0x0f;
uint8_t ls283_b12 = (ls157_b11 + m_ls175_e8) & 0x0f;
VR_addr |= (ls283_b12>>1);
bg_data = m_backgroundram[ VR_addr ];
bg_data = m_bgram[VR_addr];
romB_data_h>>=2;
@ -650,7 +644,7 @@ uint32_t tubep_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
draw_text_or_sprite_pixel = true;
}
bitmap.pix(v, h) = pen_base + bg_data*64 + romB_data_h;
bitmap.pix(v, h) = pen_base + bg_data * 64 + romB_data_h;
}
// text and sprite drop shadow
@ -742,10 +736,9 @@ uint32_t rjammer_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
{
int DISP_ = m_DISP^1;
uint8_t *text_gfx_base = memregion("gfx1")->base();
uint8_t *rom13D = memregion("user1")->base();
uint8_t *rom11BD = rom13D+0x1000;
uint8_t *rom19C = rom13D+0x5000;
uint8_t *rom13D = m_bgrom;
uint8_t *rom11BD = rom13D + 0x1000;
uint8_t *rom19C = rom13D + 0x5000;
/* this can be optimized further by extracting constants out of the loop */
/* especially read from ROM19C can be done once per 8 pixels*/
@ -753,17 +746,17 @@ uint32_t rjammer_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
for (uint32_t v = cliprect.min_y; v <= cliprect.max_y; v++) /* only for current scanline */
{
uint32_t sp_data0=0,sp_data1=0,sp_data2=0;
uint32_t sp_data0 = 0, sp_data1 = 0, sp_data2 = 0;
uint8_t pal14h4_pin19;
uint8_t pal14h4_pin18;
uint8_t pal14h4_pin13;
uint32_t addr = (v*2) | m_page;
uint32_t ram_data = m_rjammer_backgroundram[ addr ] + 256*(m_rjammer_backgroundram[ addr+1 ]&0x2f);
uint32_t addr = (v * 2) | m_page;
uint32_t ram_data = m_bgram[addr] + 256 * (m_bgram[addr + 1] & 0x2f);
addr = (v>>3) | ((m_ls377_data&0x1f)<<5);
pal14h4_pin13 = (rom19C[addr] >> ((v&7)^7) ) &1;
pal14h4_pin19 = (ram_data>>13) & 1;
addr = (v >> 3) | ((m_ls377_data & 0x1f) << 5);
pal14h4_pin13 = (rom19C[addr] >> ((v & 7) ^ 7)) & 1;
pal14h4_pin19 = (ram_data >> 13) & 1;
for (uint32_t h = 0*8; h < 32*8; h++)
{
@ -773,11 +766,11 @@ uint32_t rjammer_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
sp_data2 = sp_data1;
sp_data1 = sp_data0;
sp_data0 = m_spritemap[ h + v*256 +(DISP_*256*256) ];
sp_data0 = m_spritemap[h + v * 256 + (DISP_ * 256*256)];
text_offs = ((v >> 3) << 6) | ((h >> 3) << 1);
text_code = m_textram[text_offs];
text_gfx_data = text_gfx_base[(text_code << 3) | (v & 0x07)];
text_gfx_data = m_textrom[(text_code << 3) | (v & 0x07)];
if (text_gfx_data & (0x80 >> (h & 0x07)))
bitmap.pix(v, h) = 0x10 | (m_textram[text_offs + 1] & 0x0f);
@ -798,25 +791,24 @@ uint32_t rjammer_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
uint8_t color_bank;
uint32_t ls283 = (ram_data & 0xfff) + h;
uint32_t rom13D_addr = ((ls283>>4)&0x00f) | (v&0x0f0) | (ls283&0xf00);
uint32_t rom13D_addr = ((ls283 >> 4) & 0x00f) | (v & 0x0f0) | (ls283 & 0xf00);
/* note: there is a jumper between bit 7 and bit 6 lines (bit 7 line is unused by default) */
/* default: bit 6 is rom select signal 0=rom @11B, 1=rom @11D */
uint32_t rom13D_data = rom13D[ rom13D_addr ] & 0x7f;
uint32_t rom13D_data = rom13D[rom13D_addr] & 0x7f;
/* rom13d_data is actually a content of LS377 @14C */
uint32_t rom11BD_addr = (rom13D_data << 7) | ((v & 0x0f) << 3) | ((ls283 >> 1) & 0x07);
uint32_t rom11_data = rom11BD[rom11BD_addr];
uint32_t rom11BD_addr = (rom13D_data<<7) | ((v&0x0f)<<3) | ((ls283>>1)&0x07);
uint32_t rom11_data = rom11BD[ rom11BD_addr];
if ((ls283&1)==0)
if ((ls283 & 1) == 0)
bg_data = rom11_data & 0x0f;
else
bg_data = (rom11_data>>4) & 0x0f;
bg_data = (rom11_data >> 4) & 0x0f;
addr = (h>>3) | (m_ls377_data<<5);
pal14h4_pin18 = (rom19C[addr] >> ((h&7)^7) ) &1;
addr = (h >> 3) | (m_ls377_data << 5);
pal14h4_pin18 = (rom19C[addr] >> ((h & 7) ^ 7)) & 1;
/*
PAL14H4 @15A funct
@ -841,10 +833,10 @@ uint32_t rjammer_state::screen_update(screen_device &screen, bitmap_ind16 &bitma
PIN16 = select prom @16A (active low)
PINs: 1,2,3,4,5 and 7,14 are used for priority system
*/
color_bank = (pal14h4_pin13 & ((bg_data&0x08)>>3) & ((bg_data&0x04)>>2) & (((bg_data&0x02)>>1)^1) & (bg_data&0x01) )
| (pal14h4_pin18 & ((bg_data&0x08)>>3) & ((bg_data&0x04)>>2) & ((bg_data&0x02)>>1) & ((bg_data&0x01)^1) )
| (pal14h4_pin19);
bitmap.pix(v, h) = 0x20 + color_bank*0x10 + bg_data;
color_bank = (pal14h4_pin13 & ((bg_data & 0x08) >> 3) & ((bg_data & 0x04) >> 2) & (((bg_data & 0x02) >> 1) ^ 1) & (bg_data & 0x01))
| (pal14h4_pin18 & ((bg_data & 0x08) >> 3) & ((bg_data & 0x04) >> 2) & ((bg_data & 0x02) >> 1) & ((bg_data & 0x01) ^ 1))
| (pal14h4_pin19);
bitmap.pix(v, h) = 0x20 + color_bank * 0x10 + bg_data;
}
}
}

View File

@ -224,7 +224,7 @@ void ddragon3_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec
}
}
}
source+=8;
source+=8;
}
}