summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/pc/teradrive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/pc/teradrive.cpp')
-rw-r--r--src/mame/pc/teradrive.cpp33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/mame/pc/teradrive.cpp b/src/mame/pc/teradrive.cpp
index 02ae194fd56..4663d63eb5d 100644
--- a/src/mame/pc/teradrive.cpp
+++ b/src/mame/pc/teradrive.cpp
@@ -1,6 +1,6 @@
// license:BSD-3-Clause
// copyright-holders: Angelo Salese
-// thanks-to: Mask of Destiny, Nemesis, Sik
+// thanks-to: Mask of Destiny, Nemesis, Sik, ICEknight
/**************************************************************************************************
Sega Teradrive
@@ -20,6 +20,7 @@ References (generic MD):
- https://segaretro.org/Sega_Mega_Drive/VDP_general_usage
- https://segaretro.org/Sega_Mega_Drive/Technical_specifications
- https://gendev.spritesmind.net/forum/viewtopic.php?p=37011#p37011
+- https://github.com/jsgroth/jgenesis/wiki/Tricky%E2%80%90to%E2%80%90Emulate-Games#genesis
NOTES (PC side):
- F1 at POST will bring a setup menu;
@@ -33,6 +34,7 @@ NOTES (MD side):
- has discrete YM3438 in place of YM2612
- Mega CD expansion port working with DIY extension cable, 32x needs at least a passive cart adapter
- focus 3 in debugger is the current default for MD side
+- bp ff0122,1,{fill 0xff8100,4,"SEGA";g} to bypass TMSS loading for games without a valid header
- MAME inability of handling differing refresh rates causes visible tearing in MD screen
(cfr. koteteik intro). A partial workaround is to use Video mode = composite, so that
VGA will downclock to ~60 Hz instead.
@@ -42,21 +44,29 @@ TODO:
- Quadtel EMM driver fails recognizing WD76C10 chipset with drv4;
- Cannot HDD format with floppy insthdd.bat, cannot boot from HDD (needs floppy first).
Attached disk is a WDL-330PS with no geometry info available;
-- MD side cart slot, expansion bay and VDP rewrites (WIP);
- TMSS unlock and respective x86<->MD bus grants are sketchy;
- SEGA TERADRIVE テラドライブ ユーザーズマニュアル known to exist (not scanned yet)
- "TIMER FAIL" when exiting from F1 setup menu (keyboard? reset from chipset?);
+- dual boot not yet handled;
+
+TODO (MD side):
+- some games (orunnersj, timekillu, rhythmld and late SGDK games) fails on Z80 bus request stuff;
+- dashdes: is a flickerfest during gameplay;
+- sonic2/combatca: no interlace support in 2-players mode;
+- dheadj: scrolling issues in stage 4-1 (blocks overflowing with );
+- shangon/skitchin: one line off during gameplay;
+- caesar: no sound;
+- gynougj: stray tile on top-left of title screen;
**************************************************************************************************/
#include "emu.h"
-#include "bus/generic/carts.h"
-#include "bus/generic/slot.h"
-
#include "bus/isa/isa.h"
#include "bus/isa/isa_cards.h"
#include "bus/isa/svga_paradise.h"
+#include "bus/megadrive/cart/options.h"
+#include "bus/megadrive/cart/slot.h"
#include "bus/pc_kbd/keyboards.h"
#include "bus/pc_kbd/pc_kbdc.h"
#include "bus/sms_ctrl/controllers.h"
@@ -465,7 +475,7 @@ private:
required_device<screen_device> m_mdscreen;
required_memory_bank m_tmss_bank;
memory_view m_tmss_view;
- required_device<generic_slot_device> m_md_cart;
+ required_device<megadrive_cart_slot_device> m_md_cart;
required_device<ym7101_device> m_md_vdp;
required_device<ym_generic_device> m_opn;
memory_view m_md_68k_sound_view;
@@ -536,7 +546,8 @@ void teradrive_state::md_68k_map(address_map &map)
// m_cart_view[1](0x400000, 0x400fff).view(m_tmss_view);
// m_tmss_view[0](0x400000, 0x400fff).rom().region("tmss", 0);
- map(0x000000, 0x3fffff).r(m_md_cart, FUNC(generic_slot_device::read_rom));
+ // TODO: implement bus conflict for 0x40'0000,0x7f'ffff area (if expansion port attached)
+ map(0x000000, 0x7fffff).rw(m_md_cart, FUNC(megadrive_cart_slot_device::base_r), FUNC(megadrive_cart_slot_device::base_w));
map(0x000000, 0x000fff).view(m_tmss_view);
m_tmss_view[0](0x000000, 0x000fff).bankr(m_tmss_bank);
@@ -598,7 +609,7 @@ void teradrive_state::md_68k_map(address_map &map)
// map(0xa11400, 0xa1dfff) <unmapped> (no DTACK generation, freezes machine without additional HW)
// map(0xa12000, 0xa120ff).m(m_exp, FUNC(...::fdc_map));
-// map(0xa13000, 0xa130ff).m(m_cart, FUNC(...::time_map));
+ map(0xa13000, 0xa130ff).rw(m_md_cart, FUNC(megadrive_cart_slot_device::time_r), FUNC(megadrive_cart_slot_device::time_w));
// map(0xa14000, 0xa14003) TMSS lock
// map(0xa15100, 0xa153ff) 32X registers if present, <unmapped> otherwise
// map(0xae0000, 0xae0003) Teradrive bus switch registers
@@ -1026,11 +1037,7 @@ void teradrive_state::teradrive(machine_config &config)
m_md_ioports[N]->set_out_handler(m_md_ctrl_ports[N], FUNC(sms_control_port_device::out_w));
}
- // TODO: vestigial
- GENERIC_CARTSLOT(config, m_md_cart, generic_plain_slot, "megadriv_cart");
- m_md_cart->set_width(GENERIC_ROM16_WIDTH);
- // TODO: generic_cartslot has issues with softlisted endianness (use loose for now)
- m_md_cart->set_endian(ENDIANNESS_BIG);
+ MEGADRIVE_CART_SLOT(config, m_md_cart, md_master_xtal / 7, megadrive_cart_options, nullptr).set_must_be_loaded(false);
SPEAKER(config, "md_speaker", 2).front();