2019-01-21 05:27:24 +00:00
|
|
|
struct CPU : Processor::TLCS900H, Thread {
|
|
|
|
Emulator::Memory::Writable<uint8> ram;
|
|
|
|
|
|
|
|
//cpu.cpp
|
|
|
|
static auto Enter() -> void;
|
|
|
|
auto main() -> void;
|
|
|
|
auto step(uint clocks) -> void override;
|
|
|
|
auto power() -> void;
|
|
|
|
|
Update to v106r85 release.
byuu says:
The bad instruction was due to the instruction before it fetching one
too many bytes. Didn't notice right away as the disassembler got it
right.
The register map was incorrect on the active 16-bit flags.
I fixed and improved some other things along those lines. Hooked up some
basic KnGE (VPU) timings, made it print out VRAM and some of the WRAM
onto the screen each frame, tried to drive Vblank and Hblank IRQs, but
... I don't know for sure what vector addresses they belong to.
MAME says "INT4" for Vblank, and says nothing for Hblank. I am wildly
guessing INT4==SWI 4==0xffff10, but ... I have no idea. I'm also not
emulating the interrupts properly based on line levels, I'm just firing
on the 0→1 transitions. Sounds like Vblank is more nuanced too, but I
guess we'll see.
Emulation is running further along now, even to the point of it
successfully enabling the KnGE IRQs, but VRAM doesn't appear to get much
useful stuff written into it yet.
I reverted the nall/primitive changes, so request for testing is I guess
rescinded, for whatever it was worth.
2019-01-22 00:26:20 +00:00
|
|
|
auto setInterruptHblank(boolean line) -> void;
|
|
|
|
auto setInterruptVblank(boolean line) -> void;
|
|
|
|
|
2019-01-21 05:27:24 +00:00
|
|
|
//memory.cpp
|
|
|
|
auto read(uint24 address) -> uint8 override;
|
|
|
|
auto write(uint24 address, uint8 data) -> void override;
|
|
|
|
|
|
|
|
//serialization.cpp
|
|
|
|
auto serialize(serializer&) -> void;
|
Update to v106r85 release.
byuu says:
The bad instruction was due to the instruction before it fetching one
too many bytes. Didn't notice right away as the disassembler got it
right.
The register map was incorrect on the active 16-bit flags.
I fixed and improved some other things along those lines. Hooked up some
basic KnGE (VPU) timings, made it print out VRAM and some of the WRAM
onto the screen each frame, tried to drive Vblank and Hblank IRQs, but
... I don't know for sure what vector addresses they belong to.
MAME says "INT4" for Vblank, and says nothing for Hblank. I am wildly
guessing INT4==SWI 4==0xffff10, but ... I have no idea. I'm also not
emulating the interrupts properly based on line levels, I'm just firing
on the 0→1 transitions. Sounds like Vblank is more nuanced too, but I
guess we'll see.
Emulation is running further along now, even to the point of it
successfully enabling the KnGE IRQs, but VRAM doesn't appear to get much
useful stuff written into it yet.
I reverted the nall/primitive changes, so request for testing is I guess
rescinded, for whatever it was worth.
2019-01-22 00:26:20 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
struct IO {
|
|
|
|
struct IRQ {
|
|
|
|
boolean hblank;
|
|
|
|
boolean vblank;
|
|
|
|
} irq;
|
|
|
|
} io;
|
2019-01-21 05:27:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern CPU cpu;
|