2017-07-26 12:42:06 +00:00
|
|
|
//U1: TAMA7: Mask ROM (512KB)
|
|
|
|
//U2: TAMA5: Game Boy cartridge connector interface
|
|
|
|
//U3: TAMA6: Toshiba TMP47C243M (4-bit MCU)
|
|
|
|
//U4: RTC: Toshiba TC8521AM
|
|
|
|
|
|
|
|
//note: the TMP47C243M's 2048 x 8-bit program ROM is currently undumped
|
|
|
|
//as such, high level emulation is used as a necessary evil
|
|
|
|
|
|
|
|
auto Cartridge::TAMA::second() -> void {
|
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
|
|
|
if(++rtc.second >= 60) {
|
|
|
|
rtc.second = 0;
|
|
|
|
|
|
|
|
if(++rtc.minute >= 60) {
|
|
|
|
rtc.minute = 0;
|
|
|
|
|
|
|
|
if(rtc.hourMode == 0 && ++rtc.hour >= 12) {
|
|
|
|
rtc.hour = 0;
|
|
|
|
rtc.meridian++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(rtc.hourMode == 1 && ++rtc.hour >= 24) {
|
|
|
|
rtc.hour = 0;
|
|
|
|
rtc.meridian = rtc.hour >= 12;
|
|
|
|
}
|
|
|
|
|
|
|
|
if((rtc.hourMode == 0 && rtc.hour == 0 && rtc.meridian == 0)
|
|
|
|
|| (rtc.hourMode == 1 && rtc.hour == 0)
|
|
|
|
) {
|
|
|
|
uint days[12] = {31, 28, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31};
|
|
|
|
if(rtc.leapYear == 0) days[1] = 29; //extra day in February for leap years
|
|
|
|
|
|
|
|
if(++rtc.day > days[(rtc.month - 1) % 12]) {
|
|
|
|
rtc.day = 1;
|
|
|
|
|
|
|
|
if(++rtc.month > 12) {
|
|
|
|
rtc.month = 1;
|
|
|
|
rtc.leapYear++;
|
|
|
|
|
|
|
|
if(++rtc.year >= 100) {
|
|
|
|
rtc.year = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-07-26 12:42:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
auto Cartridge::TAMA::read(uint16 address) -> uint8 {
|
|
|
|
if((address & 0xc000) == 0x0000) { //$0000-3fff
|
|
|
|
return cartridge.rom.read(address.bits(0,13));
|
|
|
|
}
|
|
|
|
|
|
|
|
if((address & 0xc000) == 0x4000) { //$4000-7fff
|
|
|
|
return cartridge.rom.read(io.rom.bank << 14 | address.bits(0,13));
|
|
|
|
}
|
|
|
|
|
|
|
|
if((address & 0xe001) == 0xa000) { //$a000-bfff (even)
|
|
|
|
if(io.select == 0x0a) {
|
|
|
|
return 0xf0 | io.ready;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
if(io.mode == 0 || io.mode == 1) {
|
|
|
|
if(io.select == 0x0c) {
|
|
|
|
return 0xf0 | io.output.bits(0,3);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.select == 0x0d) {
|
|
|
|
return 0xf0 | io.output.bits(4,7);
|
|
|
|
}
|
2017-07-26 12:42:06 +00:00
|
|
|
}
|
|
|
|
|
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
|
|
|
if(io.mode == 2 || io.mode == 4) {
|
|
|
|
if(io.select == 0x0c || io.select == 0x0d) {
|
|
|
|
uint4 data;
|
|
|
|
if(rtc.index == 0) data = rtc.minute % 10;
|
|
|
|
if(rtc.index == 1) data = rtc.minute / 10;
|
|
|
|
if(rtc.index == 2) data = rtc.hour % 10;
|
|
|
|
if(rtc.index == 3) data = rtc.hour / 10;
|
|
|
|
if(rtc.index == 4) data = rtc.day / 10;
|
|
|
|
if(rtc.index == 5) data = rtc.day % 10;
|
|
|
|
if(rtc.index == 6) data = rtc.month / 10;
|
|
|
|
if(rtc.index == 7) data = rtc.month % 10;
|
|
|
|
rtc.index++;
|
|
|
|
return 0xf0 | data;
|
|
|
|
}
|
2017-07-26 12:42:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0xff;
|
|
|
|
}
|
|
|
|
|
|
|
|
if((address & 0xe001) == 0xa001) { //$a000-bfff (odd)
|
|
|
|
return 0xff;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0xff;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto Cartridge::TAMA::write(uint16 address, uint8 data) -> void {
|
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
|
|
|
auto toBCD = [](uint8 data) -> uint8 { return (data / 10) * 16 + (data % 10); };
|
|
|
|
auto fromBCD = [](uint8 data) -> uint8 { return (data / 16) * 10 + (data % 16); };
|
|
|
|
|
2017-07-26 12:42:06 +00:00
|
|
|
if((address & 0xe001) == 0xa000) { //$a000-bfff (even)
|
|
|
|
if(io.select == 0x00) {
|
|
|
|
io.rom.bank.bits(0,3) = data.bits(0,3);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.select == 0x01) {
|
|
|
|
io.rom.bank.bit(4) = data.bit(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.select == 0x04) {
|
|
|
|
io.input.bits(0,3) = data.bits(0,3);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.select == 0x05) {
|
|
|
|
io.input.bits(4,7) = data.bits(0,3);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.select == 0x06) {
|
|
|
|
io.index.bit(4) = data.bit(0);
|
|
|
|
io.mode = data.bits(1,3);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.select == 0x07) {
|
|
|
|
io.index.bits(0,3) = data.bits(0,3);
|
|
|
|
|
|
|
|
if(io.mode == 0) {
|
|
|
|
cartridge.ram.write(io.index, io.input);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 1) {
|
|
|
|
io.output = cartridge.ram.read(io.index);
|
|
|
|
}
|
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
|
|
|
|
|
|
|
if(io.mode == 2 && io.index == 0x04) {
|
|
|
|
rtc.minute = fromBCD(io.input);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 2 && io.index == 0x05) {
|
|
|
|
rtc.hour = fromBCD(io.input);
|
|
|
|
rtc.meridian = rtc.hour >= 12;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 4 && io.index == 0x00 && io.input.bits(0,3) == 0x7) {
|
|
|
|
uint8 day = toBCD(rtc.day);
|
|
|
|
day.bits(0,3) = io.input.bits(4,7);
|
|
|
|
rtc.day = fromBCD(day);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 4 && io.index == 0x00 && io.input.bits(0,3) == 0x8) {
|
|
|
|
uint8 day = toBCD(rtc.day);
|
|
|
|
day.bits(4,7) = io.input.bits(4,7);
|
|
|
|
rtc.day = fromBCD(day);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 4 && io.index == 0x00 && io.input.bits(0,3) == 0x9) {
|
|
|
|
uint8 month = toBCD(rtc.month);
|
|
|
|
month.bits(0,3) = io.input.bits(4,7);
|
|
|
|
rtc.month = fromBCD(month);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 4 && io.index == 0x00 && io.input.bits(0,3) == 0xa) {
|
|
|
|
uint8 month = toBCD(rtc.month);
|
|
|
|
month.bits(4,7) = io.input.bits(4,7);
|
|
|
|
rtc.month = fromBCD(month);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 4 && io.index == 0x00 && io.input.bits(0,3) == 0xb) {
|
|
|
|
uint8 year = toBCD(rtc.year);
|
|
|
|
year.bits(0,3) = io.input.bits(4,7);
|
|
|
|
rtc.year = fromBCD(year);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 4 && io.index == 0x00 && io.input.bits(0,3) == 0xc) {
|
|
|
|
uint8 year = toBCD(rtc.year);
|
|
|
|
year.bits(4,7) = io.input.bits(4,7);
|
|
|
|
rtc.year = fromBCD(year);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 4 && io.index == 0x02 && io.input.bits(0,3) == 0xa) {
|
|
|
|
rtc.hourMode = io.input.bit(4);
|
|
|
|
rtc.second = 0; //hack: unclear where this is really being set (if it is at all)
|
|
|
|
}
|
|
|
|
|
Update to v103r23 release.
byuu says:
Changelog:
- gb: added accelerometer X-axis, Y-Axis inputs¹
- gb: added rumble input¹
- gb/mbc5: added rumble support²
- gb/mbc6: added skeleton driver, but it doesn't boot Net de Get
- gb/mbc7: added mostly complete driver (only missing EEPROM), but it
doesn't boot Kirby Tilt 'n' Tumble
- gb/tama: added leap year assignment
- tomoko: fixed macOS compilation [MerryMage]
- hiro/cocoa: fix table cell redrawing on updates and automatic column
resizing [ncbncb]
- hiro/cocoa: fix some weird issue with clicking table view checkboxes
on Retina displays [ncbncb]
- icarus: enhance Game Boy heuristics³
- nall: fix three missing return statements [Jonas Quinn]
- ruby: hopefully fixed all compilation errors reported by Screwtape
et al⁴
¹: because there's no concept of a controller for cartridge inputs,
I'm attaching to the base platform for now. An idea I had was to make
separate ports for each cartridge type ... but this would duplicate the
rumble input between MBC5 and MBC7. And would also be less discoverable.
But it would be more clean in that users wouldn't think the Game Boy
hardware had this functionality. I'll think about it.
²: it probably won't work yet. Rumble isn't documented anywhere, but
I dug through an emulator named GEST and discovered that it seems to use
bit 3 of the RAM bank select to be rumble. I don't know if it sets the
bit for rumbling, then clears when finished, or if it sets it and then
after a few milliseconds it stops rumbling. I couldn't test on my
FreeBSD box because SDL 1.2 doesn't support rumble, udev doesn't exist
on FreeBSD, and nobody has ever posted any working code for how to use
evdev (or whatever it's called) on FreeBSD.
³: I'm still thinking about specifying the MBC7 RAM as EEPROM, since
it's not really static RAM.
⁴: if possible, please test all drivers if you can. I want to ensure
they're all working. Especially let me know if the following work:
macOS: input.carbon Linux: audio.pulseaudiosimple, audio.ao (libao)
If I can confirm these are working, I'm going to then remove them from
being included with stock higan builds.
I'm also considering dropping SDL video on Linux/BSD. XShm is much
faster and supports blurring. I may also drop SDL input on Linux, since
udev works better. That will free a dependency on SDL 1.2 for building
higan. FreeBSD is still going to need it for joypad support, however.
2017-07-30 13:00:31 +00:00
|
|
|
if(io.mode == 4 && io.index == 0x02 && io.input.bits(0,3) == 0xb) {
|
|
|
|
rtc.leapYear = data.bits(4,5);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
if(io.mode == 4 && io.index == 0x02 && io.input.bits(0,3) == 0xe) {
|
|
|
|
rtc.test = io.input.bits(4,7);
|
|
|
|
}
|
|
|
|
|
|
|
|
if(io.mode == 2 && io.index == 0x06) {
|
|
|
|
rtc.index = 0;
|
|
|
|
}
|
2017-07-26 12:42:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if((address & 0xe001) == 0xa001) { //$a000-bfff (odd)
|
|
|
|
io.select = data.bits(0,3);
|
|
|
|
|
|
|
|
if(io.select == 0x0a) {
|
|
|
|
io.ready = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto Cartridge::TAMA::power() -> void {
|
|
|
|
io = {};
|
|
|
|
}
|
|
|
|
|
|
|
|
auto Cartridge::TAMA::serialize(serializer& s) -> void {
|
|
|
|
s.integer(io.ready);
|
|
|
|
s.integer(io.select);
|
|
|
|
s.integer(io.mode);
|
|
|
|
s.integer(io.index);
|
|
|
|
s.integer(io.input);
|
|
|
|
s.integer(io.output);
|
|
|
|
s.integer(io.rom.bank);
|
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
|
|
|
|
|
|
|
s.integer(rtc.year);
|
|
|
|
s.integer(rtc.month);
|
|
|
|
s.integer(rtc.day);
|
|
|
|
s.integer(rtc.hour);
|
|
|
|
s.integer(rtc.minute);
|
|
|
|
s.integer(rtc.second);
|
|
|
|
s.integer(rtc.meridian);
|
|
|
|
s.integer(rtc.leapYear);
|
|
|
|
s.integer(rtc.hourMode);
|
|
|
|
s.integer(rtc.test);
|
2017-07-26 12:42:06 +00:00
|
|
|
}
|