2012-03-26 10:13:02 +00:00
|
|
|
#include <processor/processor.hpp>
|
|
|
|
#include "upd96050.hpp"
|
|
|
|
|
|
|
|
namespace Processor {
|
|
|
|
|
2015-11-21 07:36:48 +00:00
|
|
|
#include "registers.cpp"
|
2012-03-26 10:13:02 +00:00
|
|
|
#include "instructions.cpp"
|
|
|
|
#include "memory.cpp"
|
|
|
|
#include "disassembler.cpp"
|
|
|
|
#include "serialization.cpp"
|
|
|
|
|
2015-11-21 07:36:48 +00:00
|
|
|
auto uPD96050::power() -> void {
|
2012-03-26 10:13:02 +00:00
|
|
|
if(revision == Revision::uPD7725) {
|
Update to v097r17 release.
byuu says:
Changelog:
- ruby: if DirectSoundCreate fails (no sound device present), return
false from init instead of crashing
- nall: improved edge case return values for
(basename,pathname,dirname,...)
- nall: renamed file_system_object class to inode
- nall: varuint_t replaced with VariadicNatural; which contains
.bit,.bits,.byte ala Natural/Integer
- nall: fixed boolean compilation error on Windows
- WS: popa should not restore SP
- GBA: rewrote the CPU/APU cores to use the .bit,.bits functions;
removed registers.cpp from each
Note that the GBA changes are extremely major. This is about five hours
worth of extremely delicate work. Any slight errors could break
emulation in extremely bad ways. Let's hold off on extensive testing
until the next WIP, after I do the same to the PPU.
So far ... endrift's SOUNDCNT_X I/O test is failing, although that code
didn't change, so clearly I messed up SOUNDCNT_H somehow ...
To compile on Windows:
1. change nall/string/platform.hpp line 47 to
return slice(result, 0, 3);
2. change ruby/video.wgl.cpp line 72 to
auto lock(uint32_t*& data, uint& pitch, uint width, uint height) -> bool {
3. add this line to the very top of hiro/windows/header.cpp:
#define boolean FuckYouMicrosoft
2016-02-23 11:08:44 +00:00
|
|
|
regs.pc.resize(11);
|
|
|
|
regs.rp.resize(10);
|
|
|
|
regs.dp.resize( 8);
|
2012-03-26 10:13:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(revision == Revision::uPD96050) {
|
Update to v097r17 release.
byuu says:
Changelog:
- ruby: if DirectSoundCreate fails (no sound device present), return
false from init instead of crashing
- nall: improved edge case return values for
(basename,pathname,dirname,...)
- nall: renamed file_system_object class to inode
- nall: varuint_t replaced with VariadicNatural; which contains
.bit,.bits,.byte ala Natural/Integer
- nall: fixed boolean compilation error on Windows
- WS: popa should not restore SP
- GBA: rewrote the CPU/APU cores to use the .bit,.bits functions;
removed registers.cpp from each
Note that the GBA changes are extremely major. This is about five hours
worth of extremely delicate work. Any slight errors could break
emulation in extremely bad ways. Let's hold off on extensive testing
until the next WIP, after I do the same to the PPU.
So far ... endrift's SOUNDCNT_X I/O test is failing, although that code
didn't change, so clearly I messed up SOUNDCNT_H somehow ...
To compile on Windows:
1. change nall/string/platform.hpp line 47 to
return slice(result, 0, 3);
2. change ruby/video.wgl.cpp line 72 to
auto lock(uint32_t*& data, uint& pitch, uint width, uint height) -> bool {
3. add this line to the very top of hiro/windows/header.cpp:
#define boolean FuckYouMicrosoft
2016-02-23 11:08:44 +00:00
|
|
|
regs.pc.resize(14);
|
|
|
|
regs.rp.resize(11);
|
|
|
|
regs.dp.resize(11);
|
2012-03-26 10:13:02 +00:00
|
|
|
}
|
|
|
|
|
2015-11-21 07:36:48 +00:00
|
|
|
for(auto n : range(16)) regs.stack[n] = 0x0000;
|
2012-03-26 10:13:02 +00:00
|
|
|
regs.pc = 0x0000;
|
|
|
|
regs.rp = 0x0000;
|
|
|
|
regs.dp = 0x0000;
|
|
|
|
regs.sp = 0x0;
|
|
|
|
regs.k = 0x0000;
|
|
|
|
regs.l = 0x0000;
|
|
|
|
regs.m = 0x0000;
|
|
|
|
regs.n = 0x0000;
|
|
|
|
regs.a = 0x0000;
|
|
|
|
regs.b = 0x0000;
|
|
|
|
regs.flaga = 0x00;
|
|
|
|
regs.flagb = 0x00;
|
|
|
|
regs.tr = 0x0000;
|
|
|
|
regs.trb = 0x0000;
|
|
|
|
regs.sr = 0x0000;
|
|
|
|
regs.dr = 0x0000;
|
|
|
|
regs.si = 0x0000;
|
|
|
|
regs.so = 0x0000;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|