2012-02-29 12:59:48 +00:00
|
|
|
//ARMv3 (ARM6)
|
2012-02-26 07:59:44 +00:00
|
|
|
|
2012-05-09 23:35:29 +00:00
|
|
|
struct ArmDSP : Processor::ARM, Coprocessor {
|
Update to v086r15 release.
byuu says:
Most importantly ... I'm now using "st018.rom" which is the program ROM
+ data ROM in one "firmware" file. Since all three Seta DSPs have the
ST01N stamp, unlike some of the arcade variants, I'm just going to go
with ST01N from now on instead of ST-001N. I was using the latter as
that's what Overload called them.
Moving on ...
The memory map should match real hardware now, and I even match the open
bus read results.
I also return the funky 0x40404001 for 60000000-7fffffff, for whatever
that's worth.
The CPU-side registers are also mirrored correctly, as they were in the
last WIP, so we should be good there.
I also simulate the reset pulse now, and a 0->!0 transition of $3804
will destroy the ARM CPU thread.
It will wait until the value is set back to zero to resume execution.
At startup, the ARM CPU will sleep for a while, thus simulating the
reset delay behavior.
Still need to figure out the exact cycle length, but that's really not
important for emulation.
Note in registers.hpp, the |4 in status() is basically what allows the
CPU program to keep going, and hit the checkmate condition.
If we remove that, the CPU deadlocks. Still need to figure out how and
when d4 is set on $3804 reads.
I can run any test program on both real hardware and in my emulator and
compare results, so by all means ... if you can come up with a test,
I'll run it.
2012-03-02 11:07:17 +00:00
|
|
|
uint8 *programROM;
|
|
|
|
uint8 *dataROM;
|
|
|
|
uint8 *programRAM;
|
2012-02-26 07:59:44 +00:00
|
|
|
|
|
|
|
#include "registers.hpp"
|
|
|
|
|
|
|
|
static void Enter();
|
|
|
|
void enter();
|
2012-03-23 10:43:39 +00:00
|
|
|
|
|
|
|
void step(unsigned clocks);
|
2012-04-15 06:49:56 +00:00
|
|
|
void bus_idle(uint32 addr);
|
2012-03-23 10:43:39 +00:00
|
|
|
uint32 bus_read(uint32 addr, uint32 size);
|
|
|
|
void bus_write(uint32 addr, uint32 size, uint32 word);
|
|
|
|
|
|
|
|
uint8 mmio_read(unsigned addr);
|
|
|
|
void mmio_write(unsigned addr, uint8 data);
|
2012-02-26 07:59:44 +00:00
|
|
|
|
|
|
|
void init();
|
|
|
|
void load();
|
|
|
|
void unload();
|
|
|
|
void power();
|
|
|
|
void reset();
|
Update to v086r15 release.
byuu says:
Most importantly ... I'm now using "st018.rom" which is the program ROM
+ data ROM in one "firmware" file. Since all three Seta DSPs have the
ST01N stamp, unlike some of the arcade variants, I'm just going to go
with ST01N from now on instead of ST-001N. I was using the latter as
that's what Overload called them.
Moving on ...
The memory map should match real hardware now, and I even match the open
bus read results.
I also return the funky 0x40404001 for 60000000-7fffffff, for whatever
that's worth.
The CPU-side registers are also mirrored correctly, as they were in the
last WIP, so we should be good there.
I also simulate the reset pulse now, and a 0->!0 transition of $3804
will destroy the ARM CPU thread.
It will wait until the value is set back to zero to resume execution.
At startup, the ARM CPU will sleep for a while, thus simulating the
reset delay behavior.
Still need to figure out the exact cycle length, but that's really not
important for emulation.
Note in registers.hpp, the |4 in status() is basically what allows the
CPU program to keep going, and hit the checkmate condition.
If we remove that, the CPU deadlocks. Still need to figure out how and
when d4 is set on $3804 reads.
I can run any test program on both real hardware and in my emulator and
compare results, so by all means ... if you can come up with a test,
I'll run it.
2012-03-02 11:07:17 +00:00
|
|
|
void arm_reset();
|
|
|
|
|
2012-03-23 10:43:39 +00:00
|
|
|
void serialize(serializer&);
|
Update to v086r15 release.
byuu says:
Most importantly ... I'm now using "st018.rom" which is the program ROM
+ data ROM in one "firmware" file. Since all three Seta DSPs have the
ST01N stamp, unlike some of the arcade variants, I'm just going to go
with ST01N from now on instead of ST-001N. I was using the latter as
that's what Overload called them.
Moving on ...
The memory map should match real hardware now, and I even match the open
bus read results.
I also return the funky 0x40404001 for 60000000-7fffffff, for whatever
that's worth.
The CPU-side registers are also mirrored correctly, as they were in the
last WIP, so we should be good there.
I also simulate the reset pulse now, and a 0->!0 transition of $3804
will destroy the ARM CPU thread.
It will wait until the value is set back to zero to resume execution.
At startup, the ARM CPU will sleep for a while, thus simulating the
reset delay behavior.
Still need to figure out the exact cycle length, but that's really not
important for emulation.
Note in registers.hpp, the |4 in status() is basically what allows the
CPU program to keep going, and hit the checkmate condition.
If we remove that, the CPU deadlocks. Still need to figure out how and
when d4 is set on $3804 reads.
I can run any test program on both real hardware and in my emulator and
compare results, so by all means ... if you can come up with a test,
I'll run it.
2012-03-02 11:07:17 +00:00
|
|
|
ArmDSP();
|
|
|
|
~ArmDSP();
|
2012-02-26 07:59:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern ArmDSP armdsp;
|