mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
start looking at the extra opcodes in the SSD 2000 type XaviX chip (s… (#3514)
* start looking at the extra opcodes in the SSD 2000 type XaviX chip (seems some undocumented 6502 opcodes are replaced with more custom ones) * (nw) * the xavix memory mapping gets stranger with each piece of new evidence (nw)
This commit is contained in:
parent
1b686eb6b1
commit
6627a9e480
@ -1366,6 +1366,7 @@ end
|
||||
--@src/devices/cpu/m6502/m3745x.h,CPUS["M6502"] = true
|
||||
--@src/devices/cpu/m6502/m5074x.h,CPUS["M6502"] = true
|
||||
--@src/devices/cpu/m6502/xavix.h,CPUS["XAVIX"] = true
|
||||
--@src/devices/cpu/m6502/xavix.h,CPUS["XAVIX2000"] = true
|
||||
|
||||
--------------------------------------------------
|
||||
|
||||
@ -1409,6 +1410,8 @@ if (CPUS["M6502"]~=null) then
|
||||
MAME_DIR .. "src/devices/cpu/m6502/m5074x.h",
|
||||
MAME_DIR .. "src/devices/cpu/m6502/xavix.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/m6502/xavix.h",
|
||||
MAME_DIR .. "src/devices/cpu/m6502/xavix2000.cpp",
|
||||
MAME_DIR .. "src/devices/cpu/m6502/xavix2000.h",
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
@ -1423,6 +1426,7 @@ if (CPUS["M6502"]~=null) then
|
||||
{ MAME_DIR .. "src/devices/cpu/m6502/om740.lst" , GEN_DIR .. "emu/cpu/m6502/m740.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dm740.lst" }, {"@echo Generating m740 disassembler source file...", PYTHON .. " $(1) s m740 $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/devices/cpu/m6502/dr65c02.lst", GEN_DIR .. "emu/cpu/m6502/r65c02.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", }, {"@echo Generating r65c02 disassembler source file...", PYTHON .. " $(1) s r65c02 - $(<) $(@)" }},
|
||||
{ MAME_DIR .. "src/devices/cpu/m6502/oxavix.lst", GEN_DIR .. "emu/cpu/m6502/xavix.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dxavix.lst" }, {"@echo Generating xavix disassembler source file...", PYTHON .. " $(1) s xavix $(<) $(2) $(@)" }},
|
||||
{ MAME_DIR .. "src/devices/cpu/m6502/oxavix2000.lst", GEN_DIR .. "emu/cpu/m6502/xavix2000.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dxavix2000.lst" }, {"@echo Generating xavix2000 disassembler source file...", PYTHON .. " $(1) s xavix2000 $(<) $(2) $(@)" }},
|
||||
}
|
||||
|
||||
dependency {
|
||||
@ -1437,6 +1441,7 @@ if (CPUS["M6502"]~=null) then
|
||||
{ MAME_DIR .. "src/devices/cpu/m6502/r65c02.cpp", GEN_DIR .. "emu/cpu/m6502/r65c02.hxx" },
|
||||
{ MAME_DIR .. "src/devices/cpu/m6502/m740.cpp", GEN_DIR .. "emu/cpu/m6502/m740.hxx" },
|
||||
{ MAME_DIR .. "src/devices/cpu/m6502/xavix.cpp", GEN_DIR .. "emu/cpu/m6502/xavix.hxx" },
|
||||
{ MAME_DIR .. "src/devices/cpu/m6502/xavix2000.cpp", GEN_DIR .. "emu/cpu/m6502/xavix2000.hxx" },
|
||||
}
|
||||
end
|
||||
|
||||
@ -1452,6 +1457,7 @@ if (CPUS["M6502"]~=null or _OPTIONS["with-tools"]) then
|
||||
table.insert(disasm_custombuildtask, { MAME_DIR .. "src/devices/cpu/m6502/om740.lst" , GEN_DIR .. "emu/cpu/m6502/m740d.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dm740.lst" }, {"@echo Generating m740 disassembler source file...", PYTHON .. " $(1) d m740 $(<) $(2) $(@)" }})
|
||||
table.insert(disasm_custombuildtask, { MAME_DIR .. "src/devices/cpu/m6502/dr65c02.lst", GEN_DIR .. "emu/cpu/m6502/r65c02d.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", }, {"@echo Generating r65c02 disassembler source file...", PYTHON .. " $(1) d r65c02 - $(<) $(@)" }})
|
||||
table.insert(disasm_custombuildtask, { MAME_DIR .. "src/devices/cpu/m6502/oxavix.lst", GEN_DIR .. "emu/cpu/m6502/xavixd.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dxavix.lst" }, {"@echo Generating xavix disassembler source file...", PYTHON .. " $(1) d xavix $(<) $(2) $(@)" }})
|
||||
table.insert(disasm_custombuildtask, { MAME_DIR .. "src/devices/cpu/m6502/oxavix2000.lst", GEN_DIR .. "emu/cpu/m6502/xavix2000d.hxx", { MAME_DIR .. "src/devices/cpu/m6502/m6502make.py", MAME_DIR .. "src/devices/cpu/m6502/dxavix2000.lst" }, {"@echo Generating xavix2000 disassembler source file...", PYTHON .. " $(1) d xavix2000 $(<) $(2) $(@)" }})
|
||||
|
||||
table.insert(disasm_dependency, { MAME_DIR .. "src/devices/cpu/m6502/deco16d.cpp", GEN_DIR .. "emu/cpu/m6502/deco16d.hxx" })
|
||||
table.insert(disasm_dependency, { MAME_DIR .. "src/devices/cpu/m6502/m4510d.cpp", GEN_DIR .. "emu/cpu/m6502/m4510d.hxx" })
|
||||
@ -1464,6 +1470,7 @@ if (CPUS["M6502"]~=null or _OPTIONS["with-tools"]) then
|
||||
table.insert(disasm_dependency, { MAME_DIR .. "src/devices/cpu/m6502/r65c02d.cpp", GEN_DIR .. "emu/cpu/m6502/r65c02d.hxx" })
|
||||
table.insert(disasm_dependency, { MAME_DIR .. "src/devices/cpu/m6502/m740d.cpp", GEN_DIR .. "emu/cpu/m6502/m740d.hxx" })
|
||||
table.insert(disasm_dependency, { MAME_DIR .. "src/devices/cpu/m6502/xavixd.cpp", GEN_DIR .. "emu/cpu/m6502/xavixd.hxx" })
|
||||
table.insert(disasm_dependency, { MAME_DIR .. "src/devices/cpu/m6502/xavix2000d.cpp", GEN_DIR .. "emu/cpu/m6502/xavix2000d.hxx" })
|
||||
|
||||
table.insert(disasm_files, MAME_DIR .. "src/devices/cpu/m6502/deco16d.cpp")
|
||||
table.insert(disasm_files, MAME_DIR .. "src/devices/cpu/m6502/deco16d.h")
|
||||
@ -1487,6 +1494,8 @@ if (CPUS["M6502"]~=null or _OPTIONS["with-tools"]) then
|
||||
table.insert(disasm_files, MAME_DIR .. "src/devices/cpu/m6502/r65c02d.h")
|
||||
table.insert(disasm_files, MAME_DIR .. "src/devices/cpu/m6502/xavixd.cpp")
|
||||
table.insert(disasm_files, MAME_DIR .. "src/devices/cpu/m6502/xavixd.h")
|
||||
table.insert(disasm_files, MAME_DIR .. "src/devices/cpu/m6502/xavix2000d.cpp")
|
||||
table.insert(disasm_files, MAME_DIR .. "src/devices/cpu/m6502/xavix2000d.h")
|
||||
end
|
||||
|
||||
--------------------------------------------------
|
||||
|
20
src/devices/cpu/m6502/dxavix2000.lst
Normal file
20
src/devices/cpu/m6502/dxavix2000.lst
Normal file
@ -0,0 +1,20 @@
|
||||
# license:BSD-3-Clause
|
||||
# copyright-holders:David Haywood
|
||||
# XaviX (SSD 2000) - m6502 with custom opcodes
|
||||
brk_xav_imp ora_idx kil_non slo_idx nop_zpg ora_zpg asl_zpg unk07_imp php_imp ora_imm asl_acc anc_imm nop_aba ora_aba asl_aba slo_aba
|
||||
bpl_rel ora_idy phx_imp slo_idy nop_zpx ora_zpx asl_zpx slo_zpx clc_imp ora_aby nop_imp unk1b_imp nop_abx ora_abx asl_abx slo_abx
|
||||
jsr_adr and_idx callf_xa3 rla_idx bit_zpg and_zpg rol_zpg rla_zpg plp_imp and_imm rol_acc anc_imm bit_aba and_aba rol_aba rla_aba
|
||||
bmi_rel and_idy plx_imp rla_idy nop_zpx and_zpx rol_zpx rla_zpx sec_imp and_aby nop_imp rla_aby nop_abx and_abx rol_abx rla_abx
|
||||
rti_xav_imp eor_idx kil_non sre_idx nop_zpg eor_zpg lsr_zpg sre_zpg pha_imp eor_imm lsr_acc asr_imm jmp_adr eor_aba lsr_aba sre_aba
|
||||
bvc_rel eor_idy phy_imp sre_idy nop_zpx eor_zpx lsr_zpx sre_zpx cli_imp eor_aby nop_imp unk5b_imp nop_abx eor_abx lsr_abx sre_abx
|
||||
rts_imp adc_idx kil_non rra_idx nop_zpg adc_zpg ror_zpg rra_zpg pla_imp adc_imm ror_acc arr_imm jmp_ind adc_aba ror_aba rra_aba
|
||||
bvs_rel adc_idy ply_imp unk73_imp nop_zpx adc_zpx ror_zpx rra_zpx sei_imp adc_aby nop_imp rra_aby nop_abx adc_abx ror_abx rra_abx
|
||||
retf_imp sta_idx nop_imm unk83_imm sty_zpg sta_zpg stx_zpg unk87_imm dey_imp nop_imm txa_imp ane_imm sty_aba sta_aba stx_aba sax_aba
|
||||
bcc_rel sta_idy kil_non sha_idy sty_zpx sta_zpx stx_zpy sax_zpy tya_imp sta_aby txs_imp unk9b_imp shy_abx sta_abx shx_aby sha_aby
|
||||
ldy_imm lda_idx ldx_imm unka3_imp ldy_zpg lda_zpg ldx_zpg unka7_imp tay_imp lda_imm tax_imp lxa_imm ldy_aba lda_aba ldx_aba lax_aba
|
||||
bcs_rel lda_idy unkb2_imp lax_idy ldy_zpx lda_zpx ldx_zpy lax_zpy clv_imp lda_aby tsx_imp las_aby ldy_abx lda_abx ldx_aby lax_aby
|
||||
cpy_imm cmp_idx nop_imm dcp_idx cpy_zpg cmp_zpg dec_zpg dcp_zpg iny_imp cmp_imm dex_imp sbx_imm cpy_aba cmp_aba dec_aba dcp_aba
|
||||
bne_rel cmp_idy kil_non dcp_idy nop_zpx cmp_zpx dec_zpx dcp_zpx cld_imp cmp_aby nop_imp dcp_aby nop_abx cmp_abx dec_abx dcp_abx
|
||||
cpx_imm sbc_idx nop_imm isb_idx cpx_zpg sbc_zpg inc_zpg isb_zpg inx_imp sbc_imm nop_imp sbc_imm cpx_aba sbc_aba inc_aba isb_aba
|
||||
beq_rel sbc_idy kil_non isb_idy nop_zpx sbc_zpx inc_zpx isb_zpx sed_imp sbc_aby nop_imp isb_aby nop_abx sbc_abx inc_abx isb_abx
|
||||
reset
|
59
src/devices/cpu/m6502/oxavix2000.lst
Normal file
59
src/devices/cpu/m6502/oxavix2000.lst
Normal file
@ -0,0 +1,59 @@
|
||||
# license:BSD-3-Clause
|
||||
# copyright-holders:David Haywood
|
||||
# xavix2000 opcodes
|
||||
|
||||
plx_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
phx_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
ply_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
phy_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unk1b_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unk5b_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unk9b_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unka3_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unka7_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unk07_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unkb2_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unk73_imp
|
||||
read_pc_noinc();
|
||||
prefetch();
|
||||
|
||||
unk87_imm
|
||||
read_pc();
|
||||
prefetch();
|
||||
|
||||
unk83_imm
|
||||
read_pc();
|
||||
prefetch();
|
@ -2,7 +2,13 @@
|
||||
// copyright-holders:David Haywood
|
||||
/***************************************************************************
|
||||
|
||||
xavix.c
|
||||
xavix.cpp
|
||||
|
||||
The dies for these are marked
|
||||
|
||||
SSD 97 PA7270-107 (only seen on Ping Pong)
|
||||
SSD 98 PA7351-107
|
||||
SSD 98 PL7351-181
|
||||
|
||||
6502 with custom opcodes
|
||||
integrated gfx / sound
|
||||
@ -15,14 +21,14 @@
|
||||
0x00ff contains the DATA bank, set manually in code
|
||||
0x00fe appears to be the current CODE bank, set with either the
|
||||
custom opcodes, or manually (if running from lowbus only?)
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "xavix.h"
|
||||
#include "xavixd.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(XAVIX, xavix_device, "xavix", "XaviX")
|
||||
DEFINE_DEVICE_TYPE(XAVIX, xavix_device, "xavix", "XaviX (SSD 97 / SSD 98)")
|
||||
|
||||
xavix_device::xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
m6502_device(mconfig, XAVIX, tag, owner, clock),
|
||||
@ -34,6 +40,17 @@ xavix_device::xavix_device(const machine_config &mconfig, const char *tag, devic
|
||||
sprogram_config.m_logaddr_width = 24;
|
||||
}
|
||||
|
||||
xavix_device::xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
|
||||
m6502_device(mconfig, type, tag, owner, clock),
|
||||
XPC(0)
|
||||
{
|
||||
program_config.m_addr_width = 24;
|
||||
program_config.m_logaddr_width = 24;
|
||||
sprogram_config.m_addr_width = 24;
|
||||
sprogram_config.m_logaddr_width = 24;
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::unique_ptr<util::disasm_interface> xavix_device::create_disassembler()
|
||||
{
|
||||
@ -166,7 +183,4 @@ inline uint8_t xavix_device::get_databank()
|
||||
return m_databank;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#include "cpu/m6502/xavix.hxx"
|
||||
|
@ -18,6 +18,7 @@
|
||||
class xavix_device : public m6502_device {
|
||||
public:
|
||||
xavix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
xavix_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
|
||||
virtual void do_exec_full() override;
|
||||
@ -71,7 +72,7 @@ protected:
|
||||
virtual void device_reset() override;
|
||||
virtual offs_t pc_to_external(u16 pc) override;
|
||||
|
||||
private:
|
||||
protected:
|
||||
xavix_interrupt_vector_delegate m_vector_callback;
|
||||
|
||||
void set_codebank(uint8_t bank);
|
||||
|
102
src/devices/cpu/m6502/xavix2000.cpp
Normal file
102
src/devices/cpu/m6502/xavix2000.cpp
Normal file
@ -0,0 +1,102 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
/***************************************************************************
|
||||
|
||||
xavix2000.cpp
|
||||
|
||||
The dies for these are marked
|
||||
|
||||
SSD 2000 NEC 85605-621
|
||||
and possibly
|
||||
SSD 2002 NEC 85054-611 (although this might use even more opcodes and need it's own file)
|
||||
|
||||
6502 with custom opcodes
|
||||
integrated gfx / sound
|
||||
|
||||
special notes
|
||||
|
||||
see xavix.cpp for basic notes
|
||||
|
||||
the machines using the '2000' series chips seem to have more extra
|
||||
opcodes, so presumably these were only available in those models.
|
||||
of note, push x / push y and pull x / pull y
|
||||
|
||||
Dirt Rebel MX, which is confirmed as 2000 type however seems to require
|
||||
some of the documented but 'undocumented' opcodes on the 6502 to have additonal
|
||||
meaning for one specific function on startup
|
||||
|
||||
01BC37: A0 3F ldy #$3f
|
||||
01BC39: B2 ??
|
||||
01BC3A: 1B ??
|
||||
9B ??
|
||||
-- outer loop
|
||||
01BC3C: 98 tya
|
||||
01BC3D: 5B (has to be 1 byte?)
|
||||
-- inner loop
|
||||
01BC3E: A3 (has to be 1 byte)
|
||||
73 (could be 3 byte?)
|
||||
01BC40: 83 FB presumably fb is the address
|
||||
01BC42: A7 (presumably 1 byte)
|
||||
73 (could be 3 byte?)
|
||||
01BC44: 87 FB presumably fb is the address
|
||||
01BC46: D0 F6 bne $1bc3e
|
||||
01BC48: 88 dey
|
||||
01BC49: 10 F1 bpl $1bc3c
|
||||
01BC4B: 8D FB 00 sta $00fb
|
||||
01BC4E: A3 ??
|
||||
01BC4F: 8D FA 00 sta $00fa
|
||||
01BC52: 07 ??
|
||||
--
|
||||
01BC53: D0 03 bne $1bc58
|
||||
01BC55: CE fa 00 dec $00fa
|
||||
01BC58: 80 retf
|
||||
|
||||
this is presumably meant to be similar to the function found in Namco
|
||||
Nostalgia 2
|
||||
|
||||
09FFD8: A9 3F lda #$3f
|
||||
09FFDA: 85 01 sta $01
|
||||
09FFDC: A0 00 ldy #$00
|
||||
09FFDE: AD FA 00 lda $00fa
|
||||
09FFE1: 71 00 adc ($00), y
|
||||
09FFE3: 8D FA 00 sta $00fa
|
||||
09FFE6: C8 iny
|
||||
09FFE7: AD FB 00 lda $00fb
|
||||
09FFEA: 71 00 adc ($00), y
|
||||
09FFEC: 8D FB 00 sta $00fb
|
||||
09FFEF: C8 iny
|
||||
09FFF0: D0 EC bne $c
|
||||
09FFF2: C6 01 dec $01
|
||||
09FFF4: 10 E8 bpl $9ffde
|
||||
09FFF6: 0D FA 00 ora $00fa
|
||||
--
|
||||
09FFF9: D0 03 bne $9fffe
|
||||
09FFFB: CE FA 00 dec $00fa
|
||||
09FFFE: 80 retf
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "xavix2000.h"
|
||||
#include "xavix2000d.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE(XAVIX2000, xavix2000_device, "xavix2000", "XaviX (SSD 2000 / 2002)")
|
||||
|
||||
xavix2000_device::xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
|
||||
xavix_device(mconfig, XAVIX2000, tag, owner, clock)
|
||||
{
|
||||
program_config.m_addr_width = 24;
|
||||
program_config.m_logaddr_width = 24;
|
||||
sprogram_config.m_addr_width = 24;
|
||||
sprogram_config.m_logaddr_width = 24;
|
||||
}
|
||||
|
||||
|
||||
std::unique_ptr<util::disasm_interface> xavix2000_device::create_disassembler()
|
||||
{
|
||||
return std::make_unique<xavix2000_disassembler>();
|
||||
}
|
||||
|
||||
|
||||
#include "cpu/m6502/xavix2000.hxx"
|
52
src/devices/cpu/m6502/xavix2000.h
Normal file
52
src/devices/cpu/m6502/xavix2000.h
Normal file
@ -0,0 +1,52 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
/***************************************************************************
|
||||
|
||||
xavix2000.h
|
||||
|
||||
***************************************************************************/
|
||||
#ifndef MAME_CPU_M6502_XAVIX2000_H
|
||||
#define MAME_CPU_M6502_XAVIX2000_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "xavix.h"
|
||||
|
||||
#define MCFG_XAVIX2000_VECTOR_CALLBACK(_class, _method) \
|
||||
downcast<xavix2000_device &>(*device).set_vector_callback(xavix2000_device::xavix2000_interrupt_vector_delegate(&_class::_method, #_class "::" #_method, this));
|
||||
|
||||
class xavix2000_device : public xavix_device {
|
||||
public:
|
||||
xavix2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
virtual std::unique_ptr<util::disasm_interface> create_disassembler() override;
|
||||
virtual void do_exec_full() override;
|
||||
virtual void do_exec_partial() override;
|
||||
|
||||
#define O(o) void o ## _full(); void o ## _partial()
|
||||
|
||||
// xaviv opcodes
|
||||
O(phx_imp);
|
||||
O(phy_imp);
|
||||
O(plx_imp);
|
||||
O(ply_imp);
|
||||
O(unk1b_imp);
|
||||
O(unk5b_imp);
|
||||
O(unk9b_imp);
|
||||
O(unka3_imp);
|
||||
O(unka7_imp);
|
||||
O(unkb2_imp);
|
||||
O(unk07_imp);
|
||||
O(unk73_imp);
|
||||
|
||||
O(unk83_imm);
|
||||
O(unk87_imm);
|
||||
|
||||
|
||||
#undef O
|
||||
|
||||
};
|
||||
|
||||
DECLARE_DEVICE_TYPE(XAVIX2000, xavix2000_device)
|
||||
|
||||
#endif // MAME_CPU_M6502_XAVIX2000_H
|
15
src/devices/cpu/m6502/xavix2000d.cpp
Normal file
15
src/devices/cpu/m6502/xavix2000d.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
/***************************************************************************
|
||||
|
||||
xavix2000d.cpp
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "xavix2000d.h"
|
||||
#include "cpu/m6502/xavix2000d.hxx"
|
||||
|
||||
xavix2000_disassembler::xavix2000_disassembler() : m6502_base_disassembler(disasm_entries)
|
||||
{
|
||||
}
|
26
src/devices/cpu/m6502/xavix2000d.h
Normal file
26
src/devices/cpu/m6502/xavix2000d.h
Normal file
@ -0,0 +1,26 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:David Haywood
|
||||
/***************************************************************************
|
||||
|
||||
xavix2000d.h
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef MAME_CPU_M6502_XAVIX2000D_H
|
||||
#define MAME_CPU_M6502_XAVIX2000D_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "m6502d.h"
|
||||
|
||||
class xavix2000_disassembler : public m6502_base_disassembler
|
||||
{
|
||||
public:
|
||||
xavix2000_disassembler();
|
||||
virtual ~xavix2000_disassembler() = default;
|
||||
|
||||
private:
|
||||
static const disasm_entry disasm_entries[0x100];
|
||||
};
|
||||
|
||||
#endif
|
@ -233,11 +233,54 @@ WRITE8_MEMBER(xavix_state::main_w)
|
||||
}
|
||||
}
|
||||
|
||||
/* rad_madf has callf #$8f3f21 in various places, and expects to jump to code in ROM, it is unclear how things map in this case, as presumably
|
||||
the CPU 0 page memory and stack are still at 0 but ROM must be in the 3xxx range (game hasn't got far enough to call this yet to help either)
|
||||
|
||||
the maximum romsize appears to be 0x800000 so presumably the high bit being set has some additional meaning
|
||||
|
||||
for now treat it as a swapped arrangement vs. the reads from the lower range, except where page 0 ram would map, it's also possible that
|
||||
vram etc. is completely unavailable if executing from these addresses, there isn't much evidence at the moment
|
||||
|
||||
note, many DMA operations and tile bank redirects etc. have the high bit set too, so that could be significant if it defines how it accesses
|
||||
memory in those cases too
|
||||
|
||||
*/
|
||||
READ8_MEMBER(xavix_state::main2_r)
|
||||
{
|
||||
if (offset & 0x8000)
|
||||
{
|
||||
return m_lowbus->read8(space, offset&0x7fff);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset>0x200)
|
||||
return m_rgn[(offset) & (m_rgnlen - 1)];
|
||||
else
|
||||
return m_lowbus->read8(space, offset&0x7fff);
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(xavix_state::main2_w)
|
||||
{
|
||||
if (offset & 0x8000)
|
||||
{
|
||||
m_lowbus->write8(space, offset & 0x7fff, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (offset>0x200)
|
||||
logerror("write to ROM area?\n");
|
||||
else
|
||||
m_lowbus->write8(space, offset & 0x7fff, data);
|
||||
}
|
||||
}
|
||||
|
||||
// DATA reads from 0x8000-0xffff are banked by byte 0xff of 'ram' (this is handled in the CPU core)
|
||||
|
||||
void xavix_state::xavix_map(address_map &map)
|
||||
{
|
||||
map(0x000000, 0xffffff).rw(this, FUNC(xavix_state::main_r), FUNC(xavix_state::main_w));
|
||||
map(0x000000, 0x7fffff).rw(this, FUNC(xavix_state::main_r), FUNC(xavix_state::main_w));
|
||||
map(0x800000, 0xffffff).rw(this, FUNC(xavix_state::main2_r), FUNC(xavix_state::main2_w));
|
||||
}
|
||||
|
||||
void xavix_state::xavix_lowbus_map(address_map &map)
|
||||
@ -629,6 +672,20 @@ MACHINE_CONFIG_START(xavix_state::xavixp)
|
||||
MCFG_SCREEN_REFRESH_RATE(50)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_CONFIG_START(xavix_state::xavix2000)
|
||||
xavix(config);
|
||||
|
||||
MCFG_DEVICE_REMOVE("maincpu")
|
||||
|
||||
MCFG_CPU_ADD("maincpu",XAVIX2000,MAIN_CLOCK)
|
||||
MCFG_CPU_PROGRAM_MAP(xavix_map)
|
||||
MCFG_M6502_DISABLE_DIRECT()
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", xavix_state, interrupt)
|
||||
MCFG_XAVIX_VECTOR_CALLBACK(xavix_state, get_vectors)
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
DRIVER_INIT_MEMBER(xavix_state, xavix)
|
||||
{
|
||||
m_rgnlen = memregion("bios")->bytes();
|
||||
@ -869,9 +926,9 @@ ROM_START( drgqst )
|
||||
ROM_END
|
||||
|
||||
|
||||
CONS( 2004, xavtenni, 0, 0, xavix, xavix, xavix_state, xavix, "SSD Company LTD", "XaviX Tennis (XaviXPORT)", MACHINE_IS_SKELETON )
|
||||
CONS( 2004, xavtenni, 0, 0, xavix2000, xavix, xavix_state, xavix, "SSD Company LTD", "XaviX Tennis (XaviXPORT)", MACHINE_IS_SKELETON )
|
||||
|
||||
CONS( 2005, ttv_sw, 0, 0, xavix, xavix, xavix_state, xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_IS_SKELETON )
|
||||
CONS( 2005, ttv_lotr, 0, 0, xavix, xavix, xavix_state, xavix, "Tiger / SSD Company LTD", "Lord Of The Rings - Warrior of Middle-Earth", MACHINE_IS_SKELETON )
|
||||
CONS( 2005, ttv_mx, 0, 0, xavix, xavix, xavix_state, xavix, "Tiger / SSD Company LTD", "MX Dirt Rebel", MACHINE_IS_SKELETON )
|
||||
CONS( 2003, drgqst, 0, 0, xavix, xavix, xavix_state, xavix, "Square Enix / SSD Company LTD", "Kenshin Dragon Quest: Yomigaerishi Densetsu no Ken", MACHINE_IS_SKELETON )
|
||||
CONS( 2005, ttv_sw, 0, 0, xavix2000, xavix, xavix_state, xavix, "Tiger / SSD Company LTD", "Star Wars Saga Edition - Lightsaber Battle Game", MACHINE_IS_SKELETON )
|
||||
CONS( 2005, ttv_lotr, 0, 0, xavix2000, xavix, xavix_state, xavix, "Tiger / SSD Company LTD", "Lord Of The Rings - Warrior of Middle-Earth", MACHINE_IS_SKELETON )
|
||||
CONS( 2005, ttv_mx, 0, 0, xavix2000, xavix, xavix_state, xavix, "Tiger / SSD Company LTD", "MX Dirt Rebel", MACHINE_IS_SKELETON )
|
||||
CONS( 2003, drgqst, 0, 0, xavix2000, xavix, xavix_state, xavix, "Square Enix / SSD Company LTD", "Kenshin Dragon Quest: Yomigaerishi Densetsu no Ken", MACHINE_IS_SKELETON )
|
||||
|
@ -4,6 +4,7 @@
|
||||
#define MAME_INCLUDES_XAVIX_H
|
||||
|
||||
#include "cpu/m6502/xavix.h"
|
||||
#include "cpu/m6502/xavix2000.h"
|
||||
#include "machine/timer.h"
|
||||
#include "screen.h"
|
||||
#include "speaker.h"
|
||||
@ -41,6 +42,7 @@ public:
|
||||
|
||||
void xavix(machine_config &config);
|
||||
void xavixp(machine_config &config);
|
||||
void xavix2000(machine_config &config);
|
||||
|
||||
void xavix_map(address_map &map);
|
||||
void xavix_lowbus_map(address_map &map);
|
||||
@ -63,6 +65,8 @@ private:
|
||||
|
||||
DECLARE_READ8_MEMBER(main_r);
|
||||
DECLARE_WRITE8_MEMBER(main_w);
|
||||
DECLARE_READ8_MEMBER(main2_r);
|
||||
DECLARE_WRITE8_MEMBER(main2_w);
|
||||
|
||||
DECLARE_WRITE8_MEMBER(xavix_7900_w);
|
||||
DECLARE_WRITE8_MEMBER(xavix_7901_w);
|
||||
|
@ -75,6 +75,7 @@ using util::BIT;
|
||||
#include "cpu/m6502/m65ce02d.h"
|
||||
#include "cpu/m6502/m740d.h"
|
||||
#include "cpu/m6502/xavixd.h"
|
||||
#include "cpu/m6502/xavix2000d.h"
|
||||
#include "cpu/m6800/6800dasm.h"
|
||||
#include "cpu/m68000/m68kdasm.h"
|
||||
#include "cpu/m6805/6805dasm.h"
|
||||
@ -485,6 +486,7 @@ static const dasm_table_entry dasm_table[] =
|
||||
{ "x86_32", le, 0, []() -> util::disasm_interface * { i386_unidasm.mode = 32; return new i386_disassembler(&i386_unidasm); } },
|
||||
{ "x86_64", le, 0, []() -> util::disasm_interface * { i386_unidasm.mode = 64; return new i386_disassembler(&i386_unidasm); } },
|
||||
{ "xavix", le, 0, []() -> util::disasm_interface * { return new xavix_disassembler; } },
|
||||
{ "xavix2000", le, 0, []() -> util::disasm_interface * { return new xavix2000_disassembler; } },
|
||||
{ "z180", le, 0, []() -> util::disasm_interface * { return new z180_disassembler; } },
|
||||
{ "z8", be, 0, []() -> util::disasm_interface * { return new z8_disassembler; } },
|
||||
{ "z80", le, 0, []() -> util::disasm_interface * { return new z80_disassembler; } },
|
||||
|
Loading…
Reference in New Issue
Block a user