diff options
-rw-r--r-- | src/devices/cpu/g65816/g65816.cpp | 27 | ||||
-rw-r--r-- | src/devices/cpu/g65816/g65816.h | 8 | ||||
-rw-r--r-- | src/devices/cpu/g65816/g65816op.h | 2 | ||||
-rw-r--r-- | src/mame/drivers/novag_cforte.cpp | 8 | ||||
-rw-r--r-- | src/mame/drivers/novag_sexpert.cpp | 9 |
5 files changed, 37 insertions, 17 deletions
diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp index 56883b90e6e..7ecc352b09a 100644 --- a/src/devices/cpu/g65816/g65816.cpp +++ b/src/devices/cpu/g65816/g65816.cpp @@ -88,6 +88,10 @@ TODO general: - Add 1 cycle in Emulation mode (E=1) for (dir),y; abs,x; and abs,y addressing modes. + - Rename g65* to w65*? (including filenames) + + - Any difference between W65C8* and G65SC8*? + */ /* ======================================================================== */ /* ================================= DATA ================================= */ @@ -97,27 +101,34 @@ TODO general: #include "g65816.h" -DEFINE_DEVICE_TYPE(G65816, g65816_device, "g65c816", "Western Design Center G65C816") +DEFINE_DEVICE_TYPE(G65816, g65816_device, "w65c816", "WDC W65C816") +DEFINE_DEVICE_TYPE(G65802, g65802_device, "w65c802", "WDC W65C802") DEFINE_DEVICE_TYPE(_5A22, _5a22_device, "5a22", "Ricoh 5A22") enum { - CPU_TYPE_G65816 = 0, - CPU_TYPE_5A22 = 1 + CPU_TYPE_W65C816 = 0, + CPU_TYPE_W65C802 = 1, + CPU_TYPE_5A22 = 2 }; g65816_device::g65816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : g65816_device(mconfig, G65816, tag, owner, clock, CPU_TYPE_G65816, address_map_constructor()) + : g65816_device(mconfig, G65816, tag, owner, clock, CPU_TYPE_W65C816, address_map_constructor()) +{ +} + +g65802_device::g65802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : g65816_device(mconfig, G65802, tag, owner, clock, CPU_TYPE_W65C802, address_map_constructor()) { } g65816_device::g65816_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cpu_type, address_map_constructor internal) : cpu_device(mconfig, type, tag, owner, clock) - , m_program_config("program", ENDIANNESS_LITTLE, 8, 24, 0, internal) - , m_data_config("data", ENDIANNESS_LITTLE, 8, 24, 0, internal) - , m_opcode_config("opcodes", ENDIANNESS_LITTLE, 8, 24, 0, internal) + , m_program_config("program", ENDIANNESS_LITTLE, 8, (cpu_type == CPU_TYPE_W65C802) ? 16 : 24, 0, internal) + , m_data_config("data", ENDIANNESS_LITTLE, 8, (cpu_type == CPU_TYPE_W65C802) ? 16 : 24, 0, internal) + , m_opcode_config("opcodes", ENDIANNESS_LITTLE, 8, (cpu_type == CPU_TYPE_W65C802) ? 16 : 24, 0, internal) , m_vector_config("vectors", ENDIANNESS_LITTLE, 8, 5, 0) , m_wdm_w(*this) , m_cpu_type(cpu_type) @@ -1023,7 +1034,7 @@ SNES specific, used to handle master cycles, based off byuu's BSNES code int g65816_device::bus_5A22_cycle_burst(unsigned addr) { - if(m_cpu_type == CPU_TYPE_G65816) + if(m_cpu_type != CPU_TYPE_5A22) return 0; if(addr & 0x408000) { diff --git a/src/devices/cpu/g65816/g65816.h b/src/devices/cpu/g65816/g65816.h index 5f0c5183ea7..7d12db2a995 100644 --- a/src/devices/cpu/g65816/g65816.h +++ b/src/devices/cpu/g65816/g65816.h @@ -1540,6 +1540,13 @@ protected: }; +class g65802_device : public g65816_device +{ +public: + g65802_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +}; + + class _5a22_device : public g65816_device { public: @@ -1571,6 +1578,7 @@ protected: DECLARE_DEVICE_TYPE(G65816, g65816_device) +DECLARE_DEVICE_TYPE(G65802, g65802_device) DECLARE_DEVICE_TYPE(_5A22, _5a22_device) diff --git a/src/devices/cpu/g65816/g65816op.h b/src/devices/cpu/g65816/g65816op.h index 727117c0f29..9f3923be7b2 100644 --- a/src/devices/cpu/g65816/g65816op.h +++ b/src/devices/cpu/g65816/g65816op.h @@ -1854,7 +1854,7 @@ TABLE_FUNCTION(void, set_line, (int line, int state)) return; } - LINE_IRQ=1; + LINE_IRQ=1; // FIXME: this can't be right } diff --git a/src/mame/drivers/novag_cforte.cpp b/src/mame/drivers/novag_cforte.cpp index 5f5aa1465d2..a6673585ae6 100644 --- a/src/mame/drivers/novag_cforte.cpp +++ b/src/mame/drivers/novag_cforte.cpp @@ -81,16 +81,12 @@ private: u8 input1_r(); u8 input2_r(); - u8 m_inp_mux; - u8 m_led_select; + u8 m_inp_mux = 0; + u8 m_led_select = 0; }; void cforte_state::machine_start() { - // zerofill - m_inp_mux = 0; - m_led_select = 0; - // register for savestates save_item(NAME(m_inp_mux)); save_item(NAME(m_led_select)); diff --git a/src/mame/drivers/novag_sexpert.cpp b/src/mame/drivers/novag_sexpert.cpp index 6751d82cfe4..29965252515 100644 --- a/src/mame/drivers/novag_sexpert.cpp +++ b/src/mame/drivers/novag_sexpert.cpp @@ -6,7 +6,7 @@ Novag Super Expert (model 878/886/887/902) / Novag Super Forte Hardware notes (Super Expert) -- 65C02 @ 5MHz or 6MHz (10MHz or 12MHz XTAL) +- R65C02P4 or W65C802P-6 @ 5MHz/6MHz (10MHz/12MHz XTAL) - 8KB RAM battery-backed, 3*32KB ROM - HD44780 LCD controller (16x1) - beeper(32KHz/32), IRQ(32KHz/128) via MC14060 @@ -26,6 +26,11 @@ To distinguish between versions, press the Set Level button. Note that the H8 option doesn't appear to work with sexperta1, but when doing a hex compare with sexperta, the program differences are minor. +TODO: +- use W65C802 device for version B/C? it works ok but this cpu core emulation is + not as accurate, and the program doesn't enable extended mode (in other words, + it always runs in W65C02 emulation mode) + ******************************************************************************/ #include "emu.h" @@ -568,7 +573,7 @@ ROM_END CONS( 1988, sexperta, 0, 0, sexpert, sexpert, sexpert_state, init_sexpert, "Novag", "Super Expert (version A, set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // 886 CONS( 1987, sexperta1, sexperta, 0, sexpert, sexpert, sexpert_state, init_sexpert, "Novag", "Super Expert (version A, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // 878 CONS( 1987, sexperta2, sexperta, 0, sexpert, sexpert, sexpert_state, init_sexpert, "Novag", "Super Expert (version A, set 3)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // 878 -CONS( 1988, sexpertb, sexperta, 0, sexpert, sexpert, sexpert_state, init_sexpert, "Novag", "Super Expert (version B)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1988, sexpertb, sexperta, 0, sexpert, sexpert, sexpert_state, init_sexpert, "Novag", "Super Expert (version B)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // 887 CONS( 1990, sexpertc, sexperta, 0, sexpert, sexpert, sexpert_state, init_sexpert, "Novag", "Super Expert (version C, V3.6)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1990, sexpertc1, sexperta, 0, sexpert, sexpert, sexpert_state, init_sexpert, "Novag", "Super Expert (version C, V3.0)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // 902 |