2017-07-26 12:42:06 +00:00
|
|
|
struct TAMA : Mapper {
|
|
|
|
auto second() -> void;
|
|
|
|
auto read(uint16 address) -> uint8;
|
|
|
|
auto write(uint16 address, uint8 data) -> void;
|
|
|
|
auto power() -> void;
|
|
|
|
auto serialize(serializer&) -> void;
|
|
|
|
|
|
|
|
struct IO {
|
|
|
|
uint1 ready;
|
|
|
|
uint4 select;
|
|
|
|
uint3 mode;
|
|
|
|
uint5 index;
|
|
|
|
uint8 input;
|
|
|
|
uint8 output;
|
|
|
|
struct ROM {
|
|
|
|
uint5 bank;
|
|
|
|
} rom;
|
|
|
|
} io;
|
Update to v103r22 release.
byuu says:
Changelog:
- ruby: ported all remaining drivers to new API¹
- ruby/wasapi: fix for dropping one sample per period [SuperMikeMan]
- gb: emulated most of the TAMA RTC; but RTC state is still volatile²
¹: the new ports are:
- audio/{directsound, alsa, pulseaudio, pulseaudiosimple, ao}
- input/{udev, quartz, carbon}
It's pretty much guaranteed many of them will have compilation errors.
Please paste the error logs and I'll try to fix them up. It may take a
WIP or two to get there.
It's also possible things broke from the updates. If so, I could use
help comparing the old file to the new file, looking for mistakes, since
I can't test on these platforms apart from audio/directsound.
Please report working drivers in this list, so we can mark them off the
list. I'll need both macOS and Linux testers.
audio/directsound.cpp:112:
if(DirectSoundCreate(0, &_interface, 0) != DS_OK) return terminate(), false;
²: once I get this working, I'll add load/save support for the RTC
values. For now, the RTC data will be lost when you close the emulator.
Right now, you can set the date/time in real-time mode, and when you
start the game, the time will be correct, and the time will tick
forward. Note that it runs off emulated time instead of actual real
time, so if you fast-forward to 300%, one minute will be 20 seconds.
The really big limitation right now is that when you exit the game, and
restart it, and resume a new game, the hour spot gets corrupted, and
this seems to instantly kill your pet. Fun. This is crazy because the
commands the game sends to the TAMA interface are identical between
starting a new game and getting in-game versus loading a game.
It's likely going to require disassembling the game's code and seeing
what in the hell it's doing, but I am extremely bad at LR35092 assembly.
Hopefully endrift can help here :|
2017-07-28 11:42:24 +00:00
|
|
|
|
|
|
|
struct RTC {
|
|
|
|
uint8 year; //0 - 99
|
|
|
|
uint8 month; //1 - 12
|
|
|
|
uint8 day; //1 - 31
|
|
|
|
uint8 hour; //0 - 23
|
|
|
|
uint8 minute; //0 - 59
|
|
|
|
uint8 second; //0 - 59
|
|
|
|
uint1 meridian; //0 = AM; 1 = PM
|
|
|
|
uint2 leapYear; //0 = leap year; 1-3 = non-leap year
|
|
|
|
uint1 hourMode; //0 = 12-hour; 1 = 24-hour
|
|
|
|
uint4 test;
|
|
|
|
uint8 index;
|
|
|
|
} rtc;
|
2017-07-26 12:42:06 +00:00
|
|
|
} tama;
|