2015-11-16 08:38:05 +00:00
|
|
|
enum class Input : uint {
|
2012-03-19 11:19:53 +00:00
|
|
|
A, B, Select, Start, Right, Left, Up, Down, R, L,
|
|
|
|
};
|
|
|
|
|
2012-04-14 07:26:45 +00:00
|
|
|
struct BIOS : Memory {
|
|
|
|
BIOS();
|
|
|
|
~BIOS();
|
2015-07-01 10:58:42 +00:00
|
|
|
|
2015-11-16 08:38:05 +00:00
|
|
|
auto read(uint mode, uint32 addr) -> uint32 override;
|
|
|
|
auto write(uint mode, uint32 addr, uint32 word) -> void override;
|
2015-07-01 10:58:42 +00:00
|
|
|
|
|
|
|
uint8* data = nullptr;
|
2015-11-16 08:38:05 +00:00
|
|
|
uint size = 0;
|
2015-07-01 10:58:42 +00:00
|
|
|
uint32 mdr = 0;
|
2012-04-14 07:26:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct System {
|
2015-11-16 08:38:05 +00:00
|
|
|
auto init() -> void;
|
|
|
|
auto term() -> void;
|
|
|
|
auto load() -> void;
|
|
|
|
auto power() -> void;
|
|
|
|
auto run() -> void;
|
|
|
|
auto runtosave() -> void;
|
|
|
|
auto runthreadtosave() -> void;
|
Update to v087r26 release.
byuu says:
Changelog:
- fixed FIFO[1] reset behavior (fixes audio in Sword of Mana)
- added FlashROM emulation (both sizes)
- GBA parses RAM settings from manifest.xml now
- save RAM is written to disk now
- added save state support (it's currently broken, though)
- fixed ROM/RAM access timings
- open bus should mostly work (we don't do the PC+12 stuff yet)
- emulated the undocumented memory control register (mirror IWRAM,
disable I+EWRAM, EWRAM wait state count)
- emulated keypad interrupts
- emulated STOP (freezes video, audio, DMA and timers; only breaks on
keypad IRQs)
- probably a lot more, it was a long night ...
Show stoppers, missing things, broken things, etc:
- ST018 is still completely broken
- GBC audio sequencer apparently needs work
- GBA audio FIFO buffer seems too quiet
- PHI / ROM prefetch needs to be emulated (no idea on how to do this,
especially PHI)
- SOUNDBIAS 64/128/256khz modes should output at that resolution
(really, we need to simulate PWM properly, no idea on how to do this)
- object mosaic top-left coordinates are wrong (minor, fixing will
actually make the effect look worse)
- need to emulate PPU greenswap and color palette distortion (no idea on
how do this)
- need GBA save type database (I would also LIKE to blacklist
/ patch-out trainers, but that's a discussion for another day.)
- some ARM ops advance the prefetch buffer, so you can read PC+12 in
some cases
2012-04-16 12:19:39 +00:00
|
|
|
|
2015-11-16 08:38:05 +00:00
|
|
|
auto serialize() -> serializer;
|
|
|
|
auto unserialize(serializer&) -> bool;
|
Update to v087r26 release.
byuu says:
Changelog:
- fixed FIFO[1] reset behavior (fixes audio in Sword of Mana)
- added FlashROM emulation (both sizes)
- GBA parses RAM settings from manifest.xml now
- save RAM is written to disk now
- added save state support (it's currently broken, though)
- fixed ROM/RAM access timings
- open bus should mostly work (we don't do the PC+12 stuff yet)
- emulated the undocumented memory control register (mirror IWRAM,
disable I+EWRAM, EWRAM wait state count)
- emulated keypad interrupts
- emulated STOP (freezes video, audio, DMA and timers; only breaks on
keypad IRQs)
- probably a lot more, it was a long night ...
Show stoppers, missing things, broken things, etc:
- ST018 is still completely broken
- GBC audio sequencer apparently needs work
- GBA audio FIFO buffer seems too quiet
- PHI / ROM prefetch needs to be emulated (no idea on how to do this,
especially PHI)
- SOUNDBIAS 64/128/256khz modes should output at that resolution
(really, we need to simulate PWM properly, no idea on how to do this)
- object mosaic top-left coordinates are wrong (minor, fixing will
actually make the effect look worse)
- need to emulate PPU greenswap and color palette distortion (no idea on
how do this)
- need GBA save type database (I would also LIKE to blacklist
/ patch-out trainers, but that's a discussion for another day.)
- some ARM ops advance the prefetch buffer, so you can read PC+12 in
some cases
2012-04-16 12:19:39 +00:00
|
|
|
|
2015-11-16 08:38:05 +00:00
|
|
|
auto serialize(serializer&) -> void;
|
|
|
|
auto serialize_all(serializer&) -> void;
|
|
|
|
auto serialize_init() -> void;
|
Update to v094r39 release.
byuu says:
Changelog:
- SNES mid-scanline BGMODE fixes finally merged (can run
atx2.zip{mode7.smc}+mtest(2).sfc properly now)
- Makefile now discards all built-in rules and variables
- switch on bool warning disabled for GCC now as well (was already
disabled for Clang)
- when loading a game, if any required files are missing, display
a warning message box (manifest.bml, program.rom, bios.rom, etc)
- when loading a game (or a game slot), if manifest.bml is missing, it
will invoke icarus to try and generate it
- if that fails (icarus is missing or the folder is bad), you will get
a warning telling you that the manifest can't be loaded
The warning prompt on missing files work for both games and the .sys
folders and their files. For some reason, failing to load the DMG/CGB
BIOS is causing a crash before I can display the modal dialog. I have no
idea why, and the stack frame backtrace is junk.
I also can't seem to abort the failed loading process. If I call
Program::unloadMedia(), I get a nasty segfault. Again with a really
nasty stack trace. So for now, it'll just end up sitting there emulating
an empty ROM (solid black screen.) In time, I'd like to fix that too.
Lastly, I need a better method than popen for Windows. popen is kind of
ugly and flashes a console window for a brief second even if the
application launched is linked with -mwindows. Not sure if there even is
one (I need to read the stdout result, so CreateProcess may not work
unless I do something nasty like "> %tmp%/temp") I'm also using the
regular popen instead of _wpopen, so for this WIP, it won't work if your
game folder has non-English letters in the path.
2015-08-04 09:00:55 +00:00
|
|
|
|
|
|
|
struct Information {
|
|
|
|
string manifest;
|
|
|
|
} information;
|
2015-11-16 08:38:05 +00:00
|
|
|
|
|
|
|
uint serialize_size;
|
2012-03-19 11:19:53 +00:00
|
|
|
};
|
|
|
|
|
2012-04-14 07:26:45 +00:00
|
|
|
extern BIOS bios;
|
2012-03-19 11:19:53 +00:00
|
|
|
extern System system;
|