2012-04-29 06:16:44 +00:00
|
|
|
#include <sfc/sfc.hpp>
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2012-04-26 10:51:13 +00:00
|
|
|
namespace SuperFamicom {
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
SA1 sa1;
|
|
|
|
|
|
|
|
#include "serialization.cpp"
|
|
|
|
#include "bus/bus.cpp"
|
|
|
|
#include "dma/dma.cpp"
|
|
|
|
#include "memory/memory.cpp"
|
|
|
|
#include "mmio/mmio.cpp"
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::Enter() -> void { sa1.enter(); }
|
2010-08-09 13:28:56 +00:00
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::enter() -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
while(true) {
|
|
|
|
if(scheduler.sync == Scheduler::SynchronizeMode::All) {
|
|
|
|
scheduler.exit(Scheduler::ExitReason::SynchronizeEvent);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(mmio.sa1_rdyb || mmio.sa1_resb) {
|
|
|
|
//SA-1 co-processor is asleep
|
|
|
|
tick();
|
2015-12-14 09:41:06 +00:00
|
|
|
synchronizeCPU();
|
2010-08-09 13:28:56 +00:00
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(status.interrupt_pending) {
|
|
|
|
status.interrupt_pending = false;
|
2011-09-27 11:55:02 +00:00
|
|
|
op_irq();
|
|
|
|
continue;
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
Update to v094r29 release.
byuu says:
Note: for Windows users, please go to nall/intrinsics.hpp line 60 and
correct the typo from "DISPLAY_WINDOW" to "DISPLAY_WINDOWS" before
compiling, otherwise things won't work at all.
This will be a really major WIP for the core SNES emulation, so please
test as thoroughly as possible.
I rewrote the 65816 CPU core's dispatcher from a jump table to a switch
table. This was so that I could pass class variables as parameters to
opcodes without crazy theatrics.
With that, I killed the regs.r[N] stuff, the flag_t operator|=, &=, ^=
stuff, and all of the template versions of opcodes.
I also removed some stupid pointless flag tests in xcn and pflag that
would always be true.
I sure hope that AWJ is happy with this; because this change was so that
my flag assignments and branch tests won't need to build regs.P into
a full 8-bit variable anymore.
It does of course incur a slight performance hit when you pass in
variables by-value to functions, but it should help with binary size
(and thus cache) by reducing a lot of extra functions. (I know I could
have used template parameters for some things even with a switch table,
but chose not to for the aforementioned reasons.)
Overall, it's about a ~1% speedup from the previous build. The CPU core
instructions were never a bottleneck, but I did want to fix the P flag
building stuff because that really was a dumb mistake v_v'
2015-06-22 13:31:49 +00:00
|
|
|
op_exec();
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::op_irq() -> void {
|
Update to v083r08 release.
byuu says:
Fixed SA-1 IRQ regression for Super Mario RPG
Added turbo B,A to NES+GB; B,A,X,Y to SNES (please don't ask for turbo
L,R; you never use those keys rapidly.)
Re-added video color adjustments, which are now done in full 8-bit
colorspace for more precision
Gamma ramp option is gone. It's now the gamma option, which now only
affects the lower-half of the colors.
A value of 1.0 gives you the original, washed out colors. 1.75 is what
the gamma ramp checkbox used to do (roughly).
The new default is 1.5, which still prevents color washout, but isn't as
overly dark as before.
I wanted to make the core/interface stuff abstract the complexity of
setting up a new C++ class, but it really didn't make anything easier.
It was all one-line stubs to internal functions, and there was just too
many platform-specific things that needed to be captured, so I did away
with that. Made a base class for the ui/interface stuff to get rid of
a lot of switch(mode()) stuff, still a work in progress.
2011-10-29 07:32:20 +00:00
|
|
|
op_read(regs.pc.d);
|
|
|
|
op_io();
|
|
|
|
if(!regs.e) op_writestack(regs.pc.b);
|
|
|
|
op_writestack(regs.pc.h);
|
|
|
|
op_writestack(regs.pc.l);
|
|
|
|
op_writestack(regs.e ? (regs.p & ~0x10) : regs.p);
|
|
|
|
regs.pc.w = regs.vector;
|
|
|
|
regs.pc.b = 0x00;
|
|
|
|
regs.p.i = 1;
|
|
|
|
regs.p.d = 0;
|
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::last_cycle() -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
if(mmio.sa1_nmi && !mmio.sa1_nmicl) {
|
|
|
|
status.interrupt_pending = true;
|
Update to v083r08 release.
byuu says:
Fixed SA-1 IRQ regression for Super Mario RPG
Added turbo B,A to NES+GB; B,A,X,Y to SNES (please don't ask for turbo
L,R; you never use those keys rapidly.)
Re-added video color adjustments, which are now done in full 8-bit
colorspace for more precision
Gamma ramp option is gone. It's now the gamma option, which now only
affects the lower-half of the colors.
A value of 1.0 gives you the original, washed out colors. 1.75 is what
the gamma ramp checkbox used to do (roughly).
The new default is 1.5, which still prevents color washout, but isn't as
overly dark as before.
I wanted to make the core/interface stuff abstract the complexity of
setting up a new C++ class, but it really didn't make anything easier.
It was all one-line stubs to internal functions, and there was just too
many platform-specific things that needed to be captured, so I did away
with that. Made a base class for the ui/interface stuff to get rid of
a lot of switch(mode()) stuff, still a work in progress.
2011-10-29 07:32:20 +00:00
|
|
|
regs.vector = mmio.cnv;
|
2010-08-09 13:28:56 +00:00
|
|
|
mmio.sa1_nmifl = true;
|
|
|
|
mmio.sa1_nmicl = 1;
|
|
|
|
regs.wai = false;
|
|
|
|
} else if(!regs.p.i) {
|
|
|
|
if(mmio.timer_irqen && !mmio.timer_irqcl) {
|
|
|
|
status.interrupt_pending = true;
|
Update to v083r08 release.
byuu says:
Fixed SA-1 IRQ regression for Super Mario RPG
Added turbo B,A to NES+GB; B,A,X,Y to SNES (please don't ask for turbo
L,R; you never use those keys rapidly.)
Re-added video color adjustments, which are now done in full 8-bit
colorspace for more precision
Gamma ramp option is gone. It's now the gamma option, which now only
affects the lower-half of the colors.
A value of 1.0 gives you the original, washed out colors. 1.75 is what
the gamma ramp checkbox used to do (roughly).
The new default is 1.5, which still prevents color washout, but isn't as
overly dark as before.
I wanted to make the core/interface stuff abstract the complexity of
setting up a new C++ class, but it really didn't make anything easier.
It was all one-line stubs to internal functions, and there was just too
many platform-specific things that needed to be captured, so I did away
with that. Made a base class for the ui/interface stuff to get rid of
a lot of switch(mode()) stuff, still a work in progress.
2011-10-29 07:32:20 +00:00
|
|
|
regs.vector = mmio.civ;
|
2010-08-09 13:28:56 +00:00
|
|
|
mmio.timer_irqfl = true;
|
|
|
|
regs.wai = false;
|
|
|
|
} else if(mmio.dma_irqen && !mmio.dma_irqcl) {
|
|
|
|
status.interrupt_pending = true;
|
Update to v083r08 release.
byuu says:
Fixed SA-1 IRQ regression for Super Mario RPG
Added turbo B,A to NES+GB; B,A,X,Y to SNES (please don't ask for turbo
L,R; you never use those keys rapidly.)
Re-added video color adjustments, which are now done in full 8-bit
colorspace for more precision
Gamma ramp option is gone. It's now the gamma option, which now only
affects the lower-half of the colors.
A value of 1.0 gives you the original, washed out colors. 1.75 is what
the gamma ramp checkbox used to do (roughly).
The new default is 1.5, which still prevents color washout, but isn't as
overly dark as before.
I wanted to make the core/interface stuff abstract the complexity of
setting up a new C++ class, but it really didn't make anything easier.
It was all one-line stubs to internal functions, and there was just too
many platform-specific things that needed to be captured, so I did away
with that. Made a base class for the ui/interface stuff to get rid of
a lot of switch(mode()) stuff, still a work in progress.
2011-10-29 07:32:20 +00:00
|
|
|
regs.vector = mmio.civ;
|
2010-08-09 13:28:56 +00:00
|
|
|
mmio.dma_irqfl = true;
|
|
|
|
regs.wai = false;
|
|
|
|
} else if(mmio.sa1_irq && !mmio.sa1_irqcl) {
|
|
|
|
status.interrupt_pending = true;
|
Update to v083r08 release.
byuu says:
Fixed SA-1 IRQ regression for Super Mario RPG
Added turbo B,A to NES+GB; B,A,X,Y to SNES (please don't ask for turbo
L,R; you never use those keys rapidly.)
Re-added video color adjustments, which are now done in full 8-bit
colorspace for more precision
Gamma ramp option is gone. It's now the gamma option, which now only
affects the lower-half of the colors.
A value of 1.0 gives you the original, washed out colors. 1.75 is what
the gamma ramp checkbox used to do (roughly).
The new default is 1.5, which still prevents color washout, but isn't as
overly dark as before.
I wanted to make the core/interface stuff abstract the complexity of
setting up a new C++ class, but it really didn't make anything easier.
It was all one-line stubs to internal functions, and there was just too
many platform-specific things that needed to be captured, so I did away
with that. Made a base class for the ui/interface stuff to get rid of
a lot of switch(mode()) stuff, still a work in progress.
2011-10-29 07:32:20 +00:00
|
|
|
regs.vector = mmio.civ;
|
2010-08-09 13:28:56 +00:00
|
|
|
mmio.sa1_irqfl = true;
|
|
|
|
regs.wai = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::interrupt_pending() -> bool {
|
2010-08-09 13:28:56 +00:00
|
|
|
return status.interrupt_pending;
|
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::tick() -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
step(2);
|
2015-12-14 09:41:06 +00:00
|
|
|
if(++status.tick_counter == 0) synchronizeCPU();
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
//adjust counters:
|
|
|
|
//note that internally, status counters are in clocks;
|
|
|
|
//whereas MMIO register counters are in dots (4 clocks = 1 dot)
|
|
|
|
if(mmio.hvselb == 0) {
|
|
|
|
//HV timer
|
|
|
|
status.hcounter += 2;
|
|
|
|
if(status.hcounter >= 1364) {
|
|
|
|
status.hcounter = 0;
|
|
|
|
if(++status.vcounter >= status.scanlines) status.vcounter = 0;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
//linear timer
|
|
|
|
status.hcounter += 2;
|
|
|
|
status.vcounter += (status.hcounter >> 11);
|
|
|
|
status.hcounter &= 0x07ff;
|
|
|
|
status.vcounter &= 0x01ff;
|
|
|
|
}
|
|
|
|
|
|
|
|
//test counters for timer IRQ
|
|
|
|
switch((mmio.ven << 1) + (mmio.hen << 0)) {
|
2013-05-05 09:21:30 +00:00
|
|
|
case 0: break;
|
|
|
|
case 1: if(status.hcounter == (mmio.hcnt << 2)) trigger_irq(); break;
|
|
|
|
case 2: if(status.vcounter == mmio.vcnt && status.hcounter == 0) trigger_irq(); break;
|
Update to v094r17 release.
byuu says:
This updates higan to use the new Markup::Node changes. This is a really
big change, and one slight typo anywhere could break certain classes of
games from playing.
I don't have ananke hooked up again yet, so I don't have the ability to
test this much. If anyone with some v094 game folders wouldn't mind
testing, I'd help out a great deal.
I'm most concerned about testing one of each SNES special chip game.
Most notably, systems like the SA-1, HitachiDSP and NEC-DSP were using
the fancier lookups, eg node["rom[0]/name"], which I had to convert to
a rather ugly node["rom"].at(0)["name"], which I'm fairly confident
won't work. I'm going to blame that on the fumes from the shelves I just
stained >.> Might work with node.find("rom[0]/name")(0) though ...? But
so ugly ... ugh.
That aside, this WIP adds the accuracy-PPU inlining, so the accuracy
profile should run around 7.5% faster than before.
2015-05-02 13:05:46 +00:00
|
|
|
case 3: if(status.vcounter == mmio.vcnt && status.hcounter == (mmio.hcnt << 2)) trigger_irq(); break;
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::trigger_irq() -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
mmio.timer_irqfl = true;
|
|
|
|
if(mmio.timer_irqen) mmio.timer_irqcl = 0;
|
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::init() -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::load() -> void {
|
Update to v075 release.
byuu says:
This release brings improved Super Game Boy emulation, the final SHA256
hashes for the DSP-(1,1B,2,3,4) and ST-(0010,0011) coprocessors, user
interface improvements, and major internal code restructuring.
Changelog (since v074):
- completely rewrote memory sub-system to support 1-byte granularity in
XML mapping
- removed Memory inheritance and MMIO class completely, any address can
be mapped to any function now
- SuperFX: removed SuperFXBus : Bus, now implemented manually
- SA-1: removed SA1Bus : Bus, now implemented manually
- entire bus mapping is now static, happens once on cartridge load
- as a result, read/write handlers now handle MMC mapping; slower
average case, far faster worst case
- namespace memory is no more, RAM arrays are stored inside the chips
they are owned by now
- GameBoy: improved CPU HALT emulation, fixes Zelda: Link's Awakening
scrolling
- GameBoy: added serial emulation (cannot connect to another GB yet),
fixes Shin Megami Tensei - Devichil
- GameBoy: improved LCD STAT emulation, fixes Sagaia
- ui: added fullscreen support (F11 key), video settings allows for
three scale settings
- ui: fixed brightness, contrast, gamma, audio volume, input frequency
values on program startup
- ui: since Qt is dead, config file becomes bsnes.cfg once again
- Super Game Boy: you can now load the BIOS without a game inserted to
see a pretty white box
- ui-gameboy: can be built without SNES components now
- libsnes: now a UI target, compile with 'make ui=ui-libsnes'
- libsnes: added WRAM, APURAM, VRAM, OAM, CGRAM access (cheat search,
etc)
- source: removed launcher/, as the Qt port is now gone
- source: Makefile restructuring to better support new ui targets
- source: lots of other internal code cleanup work
2011-01-27 08:52:34 +00:00
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::unload() -> void {
|
2012-07-08 02:57:34 +00:00
|
|
|
rom.reset();
|
|
|
|
iram.reset();
|
|
|
|
bwram.reset();
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::power() -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
regs.a = regs.x = regs.y = 0x0000;
|
|
|
|
regs.s = 0x01ff;
|
|
|
|
}
|
|
|
|
|
2015-11-14 00:52:51 +00:00
|
|
|
auto SA1::reset() -> void {
|
2015-11-10 11:02:29 +00:00
|
|
|
create(SA1::Enter, system.cpuFrequency());
|
2010-08-09 13:28:56 +00:00
|
|
|
|
Update to v074r11 release.
byuu says:
Changelog:
- debugger compiles on all three profiles
- libsnes compiles on all three platforms (no API changes to libsnes)
- memory.cpp : namespace memory removed (wram -> cpu, apuram -> smp,
vram, oam, cgram -> ppu)
- sa1.cpp : namespace memory removed (SA-1 specific functions merged
inline to SA1::bus_read,write)
- GameBoy: added serial link support with interrupts and proper 8192hz
timing, but obviously it acts as if no other GB is connected to it
- GameBoy: added STAT OAM interrupt, and better STAT d1,d0 mode values
- UI: since Qt is dead, I've renamed the config files back to bsnes.cfg
and bsnes-geometry.cfg
- SA1: IRAM was not syncing to CPU on SA-1 side
- PPU/Accuracy and PPU/Performance needed Sprite oam renamed to Sprite
sprite; so that I could add uint8 oam[544]
- makes more sense anyway, OAM = object attribute memory, obj or
sprite are better names for Sprite rendering class
- more cleanup
2011-01-24 09:03:17 +00:00
|
|
|
cpubwram.dma = false;
|
2015-11-14 00:52:51 +00:00
|
|
|
for(auto addr : range(iram.size())) {
|
Update to v074r11 release.
byuu says:
Changelog:
- debugger compiles on all three profiles
- libsnes compiles on all three platforms (no API changes to libsnes)
- memory.cpp : namespace memory removed (wram -> cpu, apuram -> smp,
vram, oam, cgram -> ppu)
- sa1.cpp : namespace memory removed (SA-1 specific functions merged
inline to SA1::bus_read,write)
- GameBoy: added serial link support with interrupts and proper 8192hz
timing, but obviously it acts as if no other GB is connected to it
- GameBoy: added STAT OAM interrupt, and better STAT d1,d0 mode values
- UI: since Qt is dead, I've renamed the config files back to bsnes.cfg
and bsnes-geometry.cfg
- SA1: IRAM was not syncing to CPU on SA-1 side
- PPU/Accuracy and PPU/Performance needed Sprite oam renamed to Sprite
sprite; so that I could add uint8 oam[544]
- makes more sense anyway, OAM = object attribute memory, obj or
sprite are better names for Sprite rendering class
- more cleanup
2011-01-24 09:03:17 +00:00
|
|
|
iram.write(addr, 0x00);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2011-09-27 11:55:02 +00:00
|
|
|
regs.pc.d = 0x000000;
|
|
|
|
regs.x.h = 0x00;
|
|
|
|
regs.y.h = 0x00;
|
|
|
|
regs.s.h = 0x01;
|
|
|
|
regs.d = 0x0000;
|
|
|
|
regs.db = 0x00;
|
|
|
|
regs.p = 0x34;
|
|
|
|
regs.e = 1;
|
|
|
|
regs.mdr = 0x00;
|
|
|
|
regs.wai = false;
|
|
|
|
regs.vector = 0x0000;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
status.tick_counter = 0;
|
|
|
|
|
|
|
|
status.interrupt_pending = false;
|
|
|
|
|
|
|
|
status.scanlines = (system.region() == System::Region::NTSC ? 262 : 312);
|
|
|
|
status.vcounter = 0;
|
|
|
|
status.hcounter = 0;
|
|
|
|
|
|
|
|
dma.line = 0;
|
|
|
|
|
|
|
|
//$2200 CCNT
|
|
|
|
mmio.sa1_irq = false;
|
|
|
|
mmio.sa1_rdyb = false;
|
|
|
|
mmio.sa1_resb = true;
|
|
|
|
mmio.sa1_nmi = false;
|
|
|
|
mmio.smeg = 0;
|
|
|
|
|
|
|
|
//$2201 SIE
|
|
|
|
mmio.cpu_irqen = false;
|
|
|
|
mmio.chdma_irqen = false;
|
|
|
|
|
|
|
|
//$2202 SIC
|
|
|
|
mmio.cpu_irqcl = false;
|
|
|
|
mmio.chdma_irqcl = false;
|
|
|
|
|
|
|
|
//$2203,$2204 CRV
|
|
|
|
mmio.crv = 0x0000;
|
|
|
|
|
|
|
|
//$2205,$2206 CNV
|
|
|
|
mmio.cnv = 0x0000;
|
|
|
|
|
|
|
|
//$2207,$2208 CIV
|
|
|
|
mmio.civ = 0x0000;
|
|
|
|
|
|
|
|
//$2209 SCNT
|
|
|
|
mmio.cpu_irq = false;
|
|
|
|
mmio.cpu_ivsw = false;
|
|
|
|
mmio.cpu_nvsw = false;
|
|
|
|
mmio.cmeg = 0;
|
|
|
|
|
|
|
|
//$220a CIE
|
|
|
|
mmio.sa1_irqen = false;
|
|
|
|
mmio.timer_irqen = false;
|
|
|
|
mmio.dma_irqen = false;
|
|
|
|
mmio.sa1_nmien = false;
|
|
|
|
|
|
|
|
//$220b CIC
|
|
|
|
mmio.sa1_irqcl = false;
|
|
|
|
mmio.timer_irqcl = false;
|
|
|
|
mmio.dma_irqcl = false;
|
|
|
|
mmio.sa1_nmicl = false;
|
|
|
|
|
|
|
|
//$220c,$220d SNV
|
|
|
|
mmio.snv = 0x0000;
|
|
|
|
|
|
|
|
//$220e,$220f SIV
|
|
|
|
mmio.siv = 0x0000;
|
|
|
|
|
|
|
|
//$2210
|
|
|
|
mmio.hvselb = false;
|
|
|
|
mmio.ven = false;
|
|
|
|
mmio.hen = false;
|
|
|
|
|
|
|
|
//$2212,$2213 HCNT
|
|
|
|
mmio.hcnt = 0x0000;
|
|
|
|
|
|
|
|
//$2214,$2215 VCNT
|
|
|
|
mmio.vcnt = 0x0000;
|
|
|
|
|
|
|
|
//$2220-2223 CXB, DXB, EXB, FXB
|
2012-05-12 02:34:35 +00:00
|
|
|
mmio.cbmode = 0;
|
|
|
|
mmio.dbmode = 0;
|
|
|
|
mmio.ebmode = 0;
|
|
|
|
mmio.fbmode = 0;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
mmio.cb = 0x00;
|
|
|
|
mmio.db = 0x01;
|
2012-05-12 02:34:35 +00:00
|
|
|
mmio.eb = 0x02;
|
|
|
|
mmio.fb = 0x03;
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
//$2224 BMAPS
|
|
|
|
mmio.sbm = 0x00;
|
|
|
|
|
|
|
|
//$2225 BMAP
|
|
|
|
mmio.sw46 = false;
|
|
|
|
mmio.cbm = 0x00;
|
|
|
|
|
|
|
|
//$2226 SWBE
|
|
|
|
mmio.swen = false;
|
|
|
|
|
|
|
|
//$2227 CWBE
|
|
|
|
mmio.cwen = false;
|
|
|
|
|
|
|
|
//$2228 BWPA
|
|
|
|
mmio.bwp = 0x0f;
|
|
|
|
|
|
|
|
//$2229 SIWP
|
|
|
|
mmio.siwp = 0x00;
|
|
|
|
|
|
|
|
//$222a CIWP
|
|
|
|
mmio.ciwp = 0x00;
|
|
|
|
|
|
|
|
//$2230 DCNT
|
|
|
|
mmio.dmaen = false;
|
|
|
|
mmio.dprio = false;
|
|
|
|
mmio.cden = false;
|
|
|
|
mmio.cdsel = false;
|
|
|
|
mmio.dd = 0;
|
|
|
|
mmio.sd = 0;
|
|
|
|
|
|
|
|
//$2231 CDMA
|
|
|
|
mmio.chdend = false;
|
|
|
|
mmio.dmasize = 0;
|
|
|
|
mmio.dmacb = 0;
|
|
|
|
|
|
|
|
//$2232-$2234 SDA
|
|
|
|
mmio.dsa = 0x000000;
|
|
|
|
|
|
|
|
//$2235-$2237 DDA
|
|
|
|
mmio.dda = 0x000000;
|
|
|
|
|
|
|
|
//$2238,$2239 DTC
|
|
|
|
mmio.dtc = 0x0000;
|
|
|
|
|
|
|
|
//$223f BBF
|
|
|
|
mmio.bbf = 0;
|
|
|
|
|
|
|
|
//$2240-$224f BRF
|
|
|
|
for(unsigned i = 0; i < 16; i++) {
|
|
|
|
mmio.brf[i] = 0x00;
|
|
|
|
}
|
|
|
|
|
|
|
|
//$2250 MCNT
|
|
|
|
mmio.acm = 0;
|
|
|
|
mmio.md = 0;
|
|
|
|
|
|
|
|
//$2251,$2252 MA
|
|
|
|
mmio.ma = 0x0000;
|
|
|
|
|
|
|
|
//$2253,$2254 MB
|
|
|
|
mmio.mb = 0x0000;
|
|
|
|
|
|
|
|
//$2258 VBD
|
|
|
|
mmio.hl = false;
|
|
|
|
mmio.vb = 16;
|
|
|
|
|
|
|
|
//$2259-$225b
|
|
|
|
mmio.va = 0x000000;
|
|
|
|
mmio.vbit = 0;
|
|
|
|
|
|
|
|
//$2300 SFR
|
|
|
|
mmio.cpu_irqfl = false;
|
|
|
|
mmio.chdma_irqfl = false;
|
|
|
|
|
|
|
|
//$2301 CFR
|
|
|
|
mmio.sa1_irqfl = false;
|
|
|
|
mmio.timer_irqfl = false;
|
|
|
|
mmio.dma_irqfl = false;
|
|
|
|
mmio.sa1_nmifl = false;
|
|
|
|
|
|
|
|
//$2302,$2303 HCR
|
|
|
|
mmio.hcr = 0x0000;
|
|
|
|
|
|
|
|
//$2304,$2305 VCR
|
|
|
|
mmio.vcr = 0x0000;
|
|
|
|
|
|
|
|
//$2306-$230a MR
|
|
|
|
mmio.mr = 0;
|
|
|
|
|
|
|
|
//$230b
|
|
|
|
mmio.overflow = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|