diff --git a/src/devices/cpu/m6502/oxavix2000.lst b/src/devices/cpu/m6502/oxavix2000.lst index ec61ee4067a1c..f2e2b7a32f922 100644 --- a/src/devices/cpu/m6502/oxavix2000.lst +++ b/src/devices/cpu/m6502/oxavix2000.lst @@ -327,8 +327,10 @@ decpb_imp prefetch(); orapa_imp - fatalerror("unhandled opcode %02x%04x: %02x\n", m_codebank, PPC, inst_state); read_pc(); + TMP = read_full_data(m_pa); + A |= TMP; + set_nz(A); prefetch(); andpa_imp @@ -339,8 +341,10 @@ andpa_imp prefetch(); eorpa_imp - fatalerror("unhandled opcode %02x%04x: %02x\n", m_codebank, PPC, inst_state); read_pc(); + TMP = read_full_data(m_pa); + A ^= TMP; + set_nz(A); prefetch(); adcpa_imp @@ -366,18 +370,24 @@ sbcpa_imp prefetch(); orapb_imp - fatalerror("unhandled opcode %02x%04x: %02x\n", m_codebank, PPC, inst_state); read_pc(); + TMP = read_full_data(m_pb); + A |= TMP; + set_nz(A); prefetch(); andpb_imp - fatalerror("unhandled opcode %02x%04x: %02x\n", m_codebank, PPC, inst_state); read_pc(); + TMP = read_full_data(m_pb); + A &= TMP; + set_nz(A); prefetch(); eorpb_imp - fatalerror("unhandled opcode %02x%04x: %02x\n", m_codebank, PPC, inst_state); read_pc(); + TMP = read_full_data(m_pb); + A ^= TMP; + set_nz(A); prefetch(); adcpb_imp diff --git a/src/mame/mame.lst b/src/mame/mame.lst index b768d952096c0..f65d8b9feebd4 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -35814,6 +35814,7 @@ typo240 36pcase 168pcase 240in1ar +500in1hh a6plus d12power d9_500 @@ -35883,12 +35884,14 @@ pactin rbbrite rd5_240 red5mam +retro620 rtvgc300 rtvgc300cr rtvgc300fz rtvgc300pj s10_520 s10fake +s5_520 sealvt supr200 sy888b @@ -35913,6 +35916,7 @@ g6_666 g7_666 g9_666 gbox2019 +gbox2022 gprnrs1 gprnrs16 hhgc319 @@ -42022,6 +42026,7 @@ smspaln smssdisp @source:sega/sms_bootleg.cpp +atgsms smssgame smssgamea @@ -47795,6 +47800,8 @@ xavbowl xavbowlj xavbox xavcheck +xavgolf +xavgolfj xavjmat xavmusic xavpkjr diff --git a/src/mame/nintendo/nes_vt369_vtunknown.cpp b/src/mame/nintendo/nes_vt369_vtunknown.cpp index 1ec984237e703..d2eb514006507 100644 --- a/src/mame/nintendo/nes_vt369_vtunknown.cpp +++ b/src/mame/nintendo/nes_vt369_vtunknown.cpp @@ -1061,6 +1061,11 @@ ROM_START( vibes240 ) ROM_IGNORE(0x100) ROM_END +ROM_START( retro620 ) + ROM_REGION( 0x1000000, "mainrom", 0 ) + ROM_LOAD( "620in1_retrofc.bin", 0x00000, 0x1000000, CRC(2698f4e5) SHA1(8b9551c22071c48a7ebc1635ca37ebe7a3b33c4b) ) // BGA on subboard +ROM_END + ROM_START( t3_630 ) ROM_REGION( 0x2000000, "mainrom", 0 ) ROM_LOAD( "s29gl128n10tfi01.bin", 0x00000, 0x1000000, CRC(7458a598) SHA1(cd35dda56c4531095c7026c88e02e35b1aae730a) ) @@ -1203,6 +1208,16 @@ ROM_START( s10_520 ) ROM_FILL( 0x07f3d9, 1, 0x64 ) // bug in init code? how does this work on hardware ROM_END +ROM_START( s5_520 ) + ROM_REGION( 0x1000000, "mainrom", 0 ) + ROM_LOAD( "s5_520_gamebox.u4", 0x00000, 0x1000000, CRC(19a7608e) SHA1(e2560752be0eda30cb935d601ee96a41215a277c) ) +ROM_END + +ROM_START( 500in1hh ) + ROM_REGION( 0x1000000, "mainrom", 0 ) + ROM_LOAD( "500in1.bin", 0x00000, 0x1000000, CRC(50f44c1a) SHA1(8ba3d2b71d0619b3ae45bcbcc6d58162f93b1069) ) +ROM_END + ROM_START( f5_620 ) ROM_REGION( 0x1000000, "mainrom", 0 ) ROM_LOAD( "f5_620in1.u4", 0x00000, 0x1000000, CRC(e3ec27c8) SHA1(d377ccf9bdbe60f6d484360b4b13c3b132628676) ) @@ -1395,6 +1410,8 @@ CONS( 202?, t3_630, 0, 0, vt36x_vibesswap_16mb, vt369, vt36x_state, em CONS( 202?, zl383, 0, 0, vt36x_vibesswap_8mb, vt369, vt36x_state, empty_init, "", "ZL-383 400-in-1 Handheld Console", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) +CONS( 202?, retro620, 0, 0, vt36x_vibesswap_16mb, vt369, vt36x_state, empty_init, "", "Retro FC 620-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) + // has extra protection? CONS( 2018, rbbrite, 0, 0, vt369_unk_1mb, vt369, vt36x_state, empty_init, "Coleco", "Rainbow Brite (mini-arcade)", MACHINE_NOT_WORKING ) @@ -1407,6 +1424,10 @@ CONS( 2018, goretrop, 0, 0, vt369_unk_32mb, vt369, vt36x_state, empty_init, CONS( 202?, s10fake, 0, 0, vt36x_s10swap_8mb, vt369, vt36x_state, init_s10fake, "", "S10 Handheld Game Console (520-in-1, fake entries)", MACHINE_NOT_WORKING ) // different version, same packaging. Larger ROM, fewer duplicates etc. CONS( 202?, s10_520, 0, 0, vt36x_gbox2020_16mb, vt369, vt36x_state, empty_init, "", "S10 Handheld Game Console (520-in-1)", MACHINE_NOT_WORKING ) +// similar to above, but no scramble? +CONS( 202?, s5_520, 0, 0, vt36x_16mb, vt369, vt36x_state, empty_init, "", "S5 Game Box (520-in-1)", MACHINE_NOT_WORKING ) +// fewer games, but does have the scramble +CONS( 202?, 500in1hh, 0, 0, vt36x_gbox2020_16mb, vt369, vt36x_state, empty_init, "", "500-in-1 Handheld Game", MACHINE_NOT_WORKING ) // there were also 'F1' units, shaped like a car, ROM may or may not be the same CONS( 202?, f5_620, 0, 0, vt36x_16mb, vt369, vt36x_state, init_f5_620, "", "F5 Handheld Game Console (620-in-1)", MACHINE_NOT_WORKING ) diff --git a/src/mame/nintendo/nes_vt42xx.cpp b/src/mame/nintendo/nes_vt42xx.cpp index 5abedff16bd76..f48fd665dedfe 100644 --- a/src/mame/nintendo/nes_vt42xx.cpp +++ b/src/mame/nintendo/nes_vt42xx.cpp @@ -471,6 +471,11 @@ ROM_START( gbox2019 ) ROM_LOAD( "fgb2019.bin", 0x00000, 0x1000000, CRC(7ef130d5) SHA1(00f45974494707fdac78153b13d8cfb503716ad0) ) // flash ROM ROM_END +ROM_START( gbox2022 ) + ROM_REGION( 0x1000000, "mainrom", 0 ) + ROM_LOAD( "sup400.bin", 0x00000, 0x1000000, CRC(56ea270d) SHA1(0949ed9d2aacfaa46f7399fda6d4d29e903cbe61) ) +ROM_END + ROM_START( gprnrs1 ) ROM_REGION( 0x800000, "mainrom", 0 ) ROM_LOAD( "gprnrs1.bin", 0x00000, 0x800000, CRC(c3ffcec8) SHA1(313a790fb51d0b155257f9de84726ed67da43a8f) ) @@ -609,7 +614,9 @@ CONS( 201?, mc_hh210, 0, 0, nes_vt42xx_16mb, nes_vt42xx, nes_vt42xx_state, emp CONS( 201?, retro400, 0, 0, nes_vt42xx_16mb, nes_vt42xx, nes_vt42xx_state, empty_init, "", "Retro FC 400-in-1", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) -CONS( 2019, gbox2019, 0, 0, nes_vt42xx_16mb, nes_vt42xx, nes_vt42xx_state, empty_init, "Sup", "Game Box 400 in 1 (2019 PCB)", MACHINE_NOT_WORKING ) +CONS( 2019, gbox2019, 0, 0, nes_vt42xx_16mb, nes_vt42xx, nes_vt42xx_state, empty_init, "Sup", "Game Box 400 in 1 (2019 PCB)", MACHINE_NOT_WORKING ) +// ZY003-V8.9 090322 on PCB +CONS( 2022, gbox2022, gbox2019, 0, nes_vt42xx_16mb, nes_vt42xx, nes_vt42xx_state, empty_init, "Sup", "Game Box 400 in 1 (2022 PCB)", MACHINE_NOT_WORKING ) CONS( 200?, gprnrs1, 0, 0, nes_vt42xx_8mb, nes_vt42xx, nes_vt42xx_state, empty_init, "", "Game Prince RS-1", MACHINE_IMPERFECT_GRAPHICS ) CONS( 200?, gprnrs16, 0, 0, nes_vt42xx_gprnrs16_2x16mb, nes_vt42xx, nes_vt42xx_bitboy_state, empty_init, "", "Game Prince RS-16", MACHINE_IMPERFECT_GRAPHICS ) diff --git a/src/mame/sega/sms_bootleg.cpp b/src/mame/sega/sms_bootleg.cpp index e665e90b3115c..ecfb7980e80ca 100644 --- a/src/mame/sega/sms_bootleg.cpp +++ b/src/mame/sega/sms_bootleg.cpp @@ -520,8 +520,19 @@ ROM_START( smssgamea ) // ROM_FILL( 0x780000, 0x80000, 0xff) // ROM1 position not populated ROM_END +ROM_START( atgsms ) + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) + + ROM_REGION( 0x400000, "game_data", ROMREGION_ERASEFF ) + ROM_LOAD( "atgames_sms.u5", 0x000000, 0x400000, CRC(bf23cd7d) SHA1(185b8af5afc14615733475e927555e3f6bd28770) ) +ROM_END + } // Anonymous namespace GAME( 199?, smssgame, 0, sms_supergame, sms_supergame, smsbootleg_state, init_sms_supergame, ROT0, "Sono Corp Japan", "Super Game (Sega Master System Multi-game bootleg, 01 Final Bubble Bobble)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) GAME( 1990, smssgamea, smssgame, sms_supergame, sms_supergame, smsbootleg_a_state, init_sms_supergame, ROT0, "Seo Jin (TV-Tuning license)", "Super Game (Sega Master System Multi-game bootleg, 01 Tri Formation)", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // for German market? + +// should probably go in its own driver +// this was dumped from a silver / purple unit with a 'time' logo on it, software seems to be generic AtGames though +GAME( 200?, atgsms, 0, sms_supergame, sms_supergame, smsbootleg_state, empty_init, ROT0, "AtGames / time", "20 SEGA Master System & Game Gear Classics - Plug & Play on TV", MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) diff --git a/src/mame/tvgames/xavix.cpp b/src/mame/tvgames/xavix.cpp index 027d7f57673ca..128acc40c68f0 100644 --- a/src/mame/tvgames/xavix.cpp +++ b/src/mame/tvgames/xavix.cpp @@ -187,7 +187,7 @@ void xavix_state::xavix_lowbus_map(address_map &map) map(0x6fd0, 0x6fd7).rw(FUNC(xavix_state::tmap2_regs_r), FUNC(xavix_state::tmap2_regs_w)); // Sprite Registers - map(0x6fd8, 0x6fd8).w(FUNC(xavix_state::spriteregs_w)); + map(0x6fd8, 0x6fd8).rw(FUNC(xavix_state::spriteregs_r), FUNC(xavix_state::spriteregs_w)); // Sprite DMA map(0x6fe0, 0x6fe0).rw(FUNC(xavix_state::spritefragment_dma_status_r), FUNC(xavix_state::spritefragment_dma_trg_w)); // after writing to 6fe1/6fe2 and 6fe5/6fe6 rad_mtrk writes 0x43/0x44 here then polls on 0x40 (see function call at c273) write values are hardcoded, similar code at 18401 diff --git a/src/mame/tvgames/xavix.h b/src/mame/tvgames/xavix.h index e67524c26cf5a..0e88265cf5dc6 100644 --- a/src/mame/tvgames/xavix.h +++ b/src/mame/tvgames/xavix.h @@ -410,6 +410,7 @@ class xavix_state : public driver_device uint8_t tmap1_regs_r(offs_t offset); uint8_t tmap2_regs_r(offs_t offset); + uint8_t spriteregs_r(); void spriteregs_w(uint8_t data); uint8_t pal_ntsc_r(); @@ -577,6 +578,7 @@ class xavix_state : public driver_device bool m_disable_memory_bypass = false; bool m_disable_sprite_yflip = false; + bool m_disable_sprite_xflip = false; bool m_disable_tile_regs_flip = false; int m_video_hres_multiplier; }; @@ -602,7 +604,6 @@ class superxavix_state : public xavix_state superxavix_state(const machine_config &mconfig, device_type type, const char *tag) : xavix_state(mconfig, type, tag) , m_xavix2002io(*this, "xavix2002io") - , m_allow_superxavix_extra_rom_sprites(true) , m_sx_crtc_1(*this, "sx_crtc_1") , m_sx_crtc_2(*this, "sx_crtc_2") , m_sx_plt_loc(*this, "sx_plt_loc") @@ -632,8 +633,6 @@ class superxavix_state : public xavix_state virtual void get_tile_pixel_dat(uint8_t &dat, int bpp) override; - bool m_allow_superxavix_extra_rom_sprites; // config does not need saving - uint8_t superxavix_read_extended_io0(offs_t offset, uint8_t mem_mask) { logerror("%s: superxavix_read_extended_io0 (mask %02x)\n", machine().describe_context(), mem_mask); return m_exio[0]->read(); } uint8_t superxavix_read_extended_io1(offs_t offset, uint8_t mem_mask) { logerror("%s: superxavix_read_extended_io1 (mask %02x)\n", machine().describe_context(), mem_mask); return m_exio[1]->read(); } uint8_t superxavix_read_extended_io2(offs_t offset, uint8_t mem_mask) { logerror("%s: superxavix_read_extended_io2 (mask %02x)\n", machine().describe_context(), mem_mask); return m_exio[2]->read(); } @@ -713,8 +712,6 @@ class superxavix_state : public xavix_state optional_region_ptr m_extra; required_ioport_array<3> m_exio; - - bool m_use_superxavix_extra; // does not need saving }; diff --git a/src/mame/tvgames/xavix_2002.cpp b/src/mame/tvgames/xavix_2002.cpp index 84c2cc4d74478..ef7c993290e27 100644 --- a/src/mame/tvgames/xavix_2002.cpp +++ b/src/mame/tvgames/xavix_2002.cpp @@ -189,10 +189,10 @@ static INPUT_PORTS_START( xavix_jmat ) PORT_INCLUDE(xavix) PORT_MODIFY("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON4 ) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON3 ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON4 ) INPUT_PORTS_END @@ -703,6 +703,30 @@ ROM_START( xavbaseb ) ROM_LOAD( "xpbaseball.bin", 0x000000, 0x800000, CRC(e9ed692d) SHA1(537e390e972156dc7da66ee127ae4c8052038ee5) ) ROM_END +ROM_START( xavgolf ) + ROM_REGION( 0x800000, "temp", ROMREGION_ERASE00 ) + ROM_LOAD( "pglfa.u5", 0x000000, 0x800000, CRC(781399d6) SHA1(4797a978f00fc10a34a79a9a09a8355eb92283f2) ) + + // the glob seems to get split between the regular space, and the 'extra' space superxavix has + ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) + ROM_COPY( "temp", 0x000000, 0x000000, 0x400000 ) + + ROM_REGION( 0x0800000, "extra", ROMREGION_ERASE00 ) + ROM_COPY( "temp", 0x400000, 0x000000, 0x400000 ) +ROM_END + +ROM_START( xavgolfj ) + ROM_REGION( 0x800000, "temp", ROMREGION_ERASE00 ) + ROM_LOAD( "pglfj.u5", 0x000000, 0x800000, CRC(d3f23cfd) SHA1(ce2d204e9abeb82a5793a613429ead009989ecd4) ) + + // the glob seems to get split between the regular space, and the 'extra' space superxavix has + ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) + ROM_COPY( "temp", 0x000000, 0x000000, 0x400000 ) + + ROM_REGION( 0x0800000, "extra", ROMREGION_ERASE00 ) + ROM_COPY( "temp", 0x400000, 0x000000, 0x400000 ) +ROM_END + ROM_START( xavbowl ) ROM_REGION( 0x800000, "bios", ROMREGION_ERASE00 ) ROM_LOAD( "xpbowling.bin", 0x000000, 0x800000, CRC(2873460b) SHA1(ea8e2392f5a12961a23eb66dca8e07dec81ce8c8) ) @@ -786,7 +810,7 @@ ROM_START( domfitex ) ROM_REGION( 0x0800000, "bios", ROMREGION_ERASE00 ) ROM_LOAD( "u2", 0x0000000, 0x0800000, CRC(841fe3cd) SHA1(8678b8a0c5198b24169a84dbe3ae979bb0838f23) ) - ROM_REGION( 0x0800000, "extra_u3", ROMREGION_ERASE00 ) + ROM_REGION( 0x0800000, "extra", ROMREGION_ERASE00 ) ROM_LOAD( "u3", 0x0000000, 0x0800000, CRC(1dc844ea) SHA1(c23da9006227f7fe4982998c17759d403a47472a) ) ROM_END @@ -1001,9 +1025,9 @@ void superxavix_super_tv_pc_state::init_stvpc() void superxavix_i2c_jmat_state::init_xavmusic() { init_xavix(); - // is sprite yflip broken on (some?) revisions of SuperXaviX hardware, or is there a CPU bug causing this + // is sprite fliping broken on (some?) revisions of SuperXaviX hardware, or is there a CPU bug causing this m_disable_sprite_yflip = true; - m_allow_superxavix_extra_rom_sprites = false; + m_disable_sprite_xflip = true; } void superxavix_piano_pc_state::init_piano_pc() @@ -1027,6 +1051,8 @@ void superxavix_doradraw_state::init_doradraw() CONS( 2004, xavtenni, 0, 0, superxavix_i2c_24c04, xavix_i2c, superxavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Tennis (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) CONS( 2004, xavbaseb, 0, 0, superxavix_i2c_24c08, xavix_i2c, superxavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Baseball (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +CONS( 2005, xavgolf, 0, 0, superxavix_i2c_24c08, xavix_i2c, superxavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Golf (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +CONS( 2005, xavgolfj, xavgolf, 0, superxavix_i2c_24c08, xavix_i2c, superxavix_i2c_state, init_xavix, "SSD Company LTD", "XaviX Golf (XaviXPORT, Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) CONS( 2004, xavbowl, 0, 0, superxavix_i2c_24c04, xavix_bowl, superxavix_i2c_bowl_state, init_xavix, "SSD Company LTD", "XaviX Bowling (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // has IR 'Camera' CONS( 2005, xavbowlj, xavbowl, 0, superxavix_i2c_24c04, xavix_bowl, superxavix_i2c_bowl_state, init_xavix, "SSD Company LTD", "XaviX Bowling (XaviXPORT, PT2-BWL-11, Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // ^^ CONS( 2004, xavbox, 0, 0, superxavix_i2c_jmat, xavix, superxavix_i2c_jmat_state, init_xavix, "SSD Company LTD", "XaviX Boxing (XaviXPORT)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) // has IR 'Camera' diff --git a/src/mame/tvgames/xavix_v.cpp b/src/mame/tvgames/xavix_v.cpp index 73cfcc4aa0594..5dedca17dcd87 100644 --- a/src/mame/tvgames/xavix_v.cpp +++ b/src/mame/tvgames/xavix_v.cpp @@ -45,7 +45,24 @@ inline uint8_t superxavix_state::get_next_bit_sx() { if (m_tmp_databit == 0) { - m_bit = m_extra[m_tmp_dataaddress&0x7fffff]; + int address = m_tmp_dataaddress; + + // do the upper bits being set have some special meaning + // or have we missed some segment register use by the time we get here? + + // anpanmdx has this set, this is an alternative to the + // code to detect it in draw_bitmap_layer + if (address & 0x2000000) + { + address &= 0x1ffffff; + address ^= 0x0600000; + } + + // the higher bit set when accessing video expands the address space + if ((address & 0x1000000) && m_extra) + m_bit = m_extra[address & 0x7fffff]; + else + m_bit = read_full_data_sp_bypass(address); } uint8_t ret = m_bit >> m_tmp_databit; @@ -644,7 +661,6 @@ void xavix_state::draw_tilemap(screen_device &screen, bitmap_rgb32 &bitmap, cons void superxavix_state::draw_tilemap(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int which) { - m_use_superxavix_extra = false; xavix_state::draw_tilemap(screen, bitmap, cliprect, which); } @@ -992,11 +1008,7 @@ void xavix_state::draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, cons void superxavix_state::draw_sprites(screen_device& screen, bitmap_rgb32& bitmap, const rectangle& cliprect) { - if (m_extra && m_allow_superxavix_extra_rom_sprites) - m_use_superxavix_extra = true; - xavix_state::draw_sprites(screen, bitmap, cliprect); - m_use_superxavix_extra = false; } @@ -1007,10 +1019,12 @@ void xavix_state::draw_sprites_line(screen_device &screen, bitmap_rgb32 &bitmap, // some games have the top bit set, why? m_spritereg &= 0x7f; - if ((m_spritereg == 0x00) || (m_spritereg == 0x01)) + if ((m_spritereg == 0x00) || (m_spritereg == 0x01) || (m_spritereg == 0x05)) { // 8-bit addressing (Tile Number) // 16-bit addressing (Tile Number) (rad_rh) + + // xavgolf uses 0x05, how does it differ? alt_addressing = 1; } else if (m_spritereg == 0x02) @@ -1085,6 +1099,14 @@ void xavix_state::draw_sprites_line(screen_device &screen, bitmap_rgb32 &bitmap, if (m_disable_sprite_yflip) flipy = 0; + // many elements in xavmusic and xavjmat also require xflip to be disabled, maybe sprite flipping + // is broken on SuperXaviX? + // + // non-super games, such as Gururuin world, use sprite mode 4, and expect flipping to work + // while the SuperXaviX games use a mix of mode 4 and mode 7 and don't want it + if (m_disable_sprite_xflip) + flipx = 0; + int drawheight = 16; int drawwidth = 16; @@ -1256,19 +1278,9 @@ void xavix_state::get_tile_pixel_dat(uint8_t &dat, int bpp) void superxavix_state::get_tile_pixel_dat(uint8_t &dat, int bpp) { - if (m_use_superxavix_extra) - { - for (int i = 0; i < bpp; i++) - { - dat |= (get_next_bit_sx() << i); - } - } - else + for (int i = 0; i < bpp; i++) { - for (int i = 0; i < bpp; i++) - { - dat |= (get_next_bit() << i); - } + dat |= (get_next_bit_sx() << i); } } @@ -1436,10 +1448,34 @@ void superxavix_state::draw_bitmap_layer(screen_device &screen, bitmap_rgb32 &bi start, start * 0x800, step, size, unused); } + // xavgolf title is 308c (start) needs to be 188c + // xavgolf menu is 30fc (start) needs to be 18fc + + // xavbaseb xavix logo is 1500 + // title is 14e0 + + // 0x800 (offset multiplier) * 0x1000 = 0x800000 (24 bit address - usual xavix address space) + // 0x2000 being set implies address beyond 24-bit space = extended xavix modes + // anpanmdx title screen ends up with a seemingly incorrect value for start - // when it does the scroller. There is presumably an opcode or math bug causing this. - //if (start >= 0x7700) - /// start -= 0x3c00; + // when it does the scroller. + // It has values of 0x7xxx which has bits 0x2000 and 0x4000 set, pushing the addressing beyond + // even double the usual XaviX address space) + // + // maybe addresses above 24-bit present the ROM data to the system in an unusual order + // (this might also apply to sprites) + + // we currently detect this in get_next_bit_sx instead + /* + if (m_extra) + { + if (start & 0x4000) + { + start &= 0x3fff; + start ^= 0xc00; + } + } + */ int base = start * 0x800; int base2 = topadr * 0x8; @@ -1683,6 +1719,12 @@ void xavix_state::tmap2_regs_w(offs_t offset, uint8_t data, uint8_t mem_mask) COMBINE_DATA(&m_tmap2_regs[offset]); } +uint8_t xavix_state::spriteregs_r() +{ + // xavjmat relies on being able to read this back or the sprite addresses + // in some of the stages get calculated incorrectly + return m_spritereg; +} void xavix_state::spriteregs_w(uint8_t data) {