2016-01-27 11:31:39 +00:00
|
|
|
struct IO {
|
Update to v097r26 release.
byuu says:
Changelog:
- WS: fixed 8-bit sign-extended imul (fixes Star Hearts completely,
Final Fantasy world map)
- WS: fixed rcl/rcr carry shifting (fixes Crazy Climber, others)
- WS: added sound DMA emulation (Star Hearts rain sound for one example)
- WS: added OAM caching, but it's forced every line for now because
otherwise there are too many sprite glitches
- WS: use headphoneEnable bit instead of speakerEnable bit (fixes muted
audio in games)
- WS: various code cleanups (I/O mapping, audio channel naming, etc)
The hypervoice channel doesn't sound all that great just yet. But I'm
not sure how it's supposed to sound. I need a better example of some
more complex music.
What's left are some unknown register status bits (especially in the
sound area), keypad interrupts, RTC emulation, CPU prefetch emulation.
And then it's all just bugs. Lots and lots of bugs that need to be
fixed.
EDIT: oops, bad typo in the code.
ws/ppu/ppu.cpp line 20: change range(256) to range(224).
Also, delete the r.speed stuff from channel5.cpp to make the rain sound
a lot better in Star Hearts. Apparently that's outdated and not what the
bits really do.
2016-03-17 11:28:15 +00:00
|
|
|
virtual auto portRead(uint16 addr) -> uint8 = 0;
|
|
|
|
virtual auto portWrite(uint16 addr, uint8 data) -> void = 0;
|
2016-01-27 11:31:39 +00:00
|
|
|
};
|
|
|
|
|
2016-03-08 11:34:00 +00:00
|
|
|
struct InternalRAM {
|
|
|
|
auto power() -> void;
|
|
|
|
|
|
|
|
auto read(uint16 addr, uint size = Byte) -> uint32;
|
|
|
|
auto write(uint16 addr, uint8 data) -> void;
|
|
|
|
|
|
|
|
private:
|
|
|
|
uint8 memory[65536];
|
|
|
|
};
|
|
|
|
|
2016-01-27 11:31:39 +00:00
|
|
|
struct Bus {
|
Update to v097r26 release.
byuu says:
Changelog:
- WS: fixed 8-bit sign-extended imul (fixes Star Hearts completely,
Final Fantasy world map)
- WS: fixed rcl/rcr carry shifting (fixes Crazy Climber, others)
- WS: added sound DMA emulation (Star Hearts rain sound for one example)
- WS: added OAM caching, but it's forced every line for now because
otherwise there are too many sprite glitches
- WS: use headphoneEnable bit instead of speakerEnable bit (fixes muted
audio in games)
- WS: various code cleanups (I/O mapping, audio channel naming, etc)
The hypervoice channel doesn't sound all that great just yet. But I'm
not sure how it's supposed to sound. I need a better example of some
more complex music.
What's left are some unknown register status bits (especially in the
sound area), keypad interrupts, RTC emulation, CPU prefetch emulation.
And then it's all just bugs. Lots and lots of bugs that need to be
fixed.
EDIT: oops, bad typo in the code.
ws/ppu/ppu.cpp line 20: change range(256) to range(224).
Also, delete the r.speed stuff from channel5.cpp to make the rain sound
a lot better in Star Hearts. Apparently that's outdated and not what the
bits really do.
2016-03-17 11:28:15 +00:00
|
|
|
auto power() -> void;
|
|
|
|
|
2016-01-27 11:31:39 +00:00
|
|
|
auto read(uint20 addr) -> uint8;
|
|
|
|
auto write(uint20 addr, uint8 data) -> void;
|
Update to v097r26 release.
byuu says:
Changelog:
- WS: fixed 8-bit sign-extended imul (fixes Star Hearts completely,
Final Fantasy world map)
- WS: fixed rcl/rcr carry shifting (fixes Crazy Climber, others)
- WS: added sound DMA emulation (Star Hearts rain sound for one example)
- WS: added OAM caching, but it's forced every line for now because
otherwise there are too many sprite glitches
- WS: use headphoneEnable bit instead of speakerEnable bit (fixes muted
audio in games)
- WS: various code cleanups (I/O mapping, audio channel naming, etc)
The hypervoice channel doesn't sound all that great just yet. But I'm
not sure how it's supposed to sound. I need a better example of some
more complex music.
What's left are some unknown register status bits (especially in the
sound area), keypad interrupts, RTC emulation, CPU prefetch emulation.
And then it's all just bugs. Lots and lots of bugs that need to be
fixed.
EDIT: oops, bad typo in the code.
ws/ppu/ppu.cpp line 20: change range(256) to range(224).
Also, delete the r.speed stuff from channel5.cpp to make the rain sound
a lot better in Star Hearts. Apparently that's outdated and not what the
bits really do.
2016-03-17 11:28:15 +00:00
|
|
|
|
|
|
|
auto map(IO* io, uint16_t lo, maybe<uint16_t> hi = nothing) -> void;
|
|
|
|
auto portRead(uint16 addr) -> uint8;
|
|
|
|
auto portWrite(uint16 addr, uint8 data) -> void;
|
|
|
|
|
|
|
|
private:
|
|
|
|
IO* port[64 * 1024] = {nullptr};
|
2016-01-27 11:31:39 +00:00
|
|
|
};
|
|
|
|
|
2016-03-08 11:34:00 +00:00
|
|
|
extern InternalRAM iram;
|
2016-01-27 11:31:39 +00:00
|
|
|
extern Bus bus;
|