mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-04-02 10:42:14 -04:00
Time for another (hopefully) stable release. The changelog has all updates since the last stable release. Most notably, this release features substantial accuracy improvements all around. Almost all of them represent brand new findings never before seen in any SNES emulator. Changelog: - fixed off-by-one buffer size issue in S-PPU RTO calculations [PiCiJi] - added XML parser - added XML-based memory mapping system - moved header-based memory mapping code into snesreader library - added some linker flags for Fedora [belegdol] - added cheat code database; with codes for over 1,500 games [mightymo] - fixed a bug where S-CPU IRQs were being tested one cycle early on direct page indexed read opcodes - added global cheat system enable/disable checkbox to cheat code editor - fixed bug in overflow calculation of S-CPU ADC and SBC opcodes in BCD mode [blargg] - emulated the S-CPU ALU MUL and DIV hardware delays with partial result calculation steps [blargg] - controller port read now returns real-time results of B button when strobe latch is raised - major improvements to emulation of the S-SMP TEST register [blargg, byuu] - fixed DSP2 memory map [Overload] - "Apply Patch" checkbox will now scan UPS patch folder if one is set in the paths section - fixed S-CPU TSC negative flag calculation in emulation mode [address] - added "make uninstall" command to Makefile for Linux users - S-CPU (H)DMA now updates the S-CPU MDR; fixes a freeze in Speedy Gonzales - Stage 6-1 - very substantial code cleanups and optimizations as a result of moving from C++98 to C++0x
103 lines
1.9 KiB
C++
103 lines
1.9 KiB
C++
class XML {
|
|
public:
|
|
void generate(nall::string &xml, const uint8_t *data, unsigned size);
|
|
|
|
private:
|
|
void read_header(const uint8_t *data, unsigned size);
|
|
unsigned find_header(const uint8_t *data, unsigned size) const;
|
|
unsigned score_header(const uint8_t *data, unsigned size, unsigned addr) const;
|
|
|
|
unsigned gameboy_ram_size(const uint8_t *data, unsigned size) const;
|
|
bool gameboy_has_rtc(const uint8_t *data, unsigned size) const;
|
|
|
|
enum HeaderField {
|
|
CartName = 0x00,
|
|
Mapper = 0x15,
|
|
RomType = 0x16,
|
|
RomSize = 0x17,
|
|
RamSize = 0x18,
|
|
CartRegion = 0x19,
|
|
Company = 0x1a,
|
|
Version = 0x1b,
|
|
Complement = 0x1c, //inverse checksum
|
|
Checksum = 0x1e,
|
|
ResetVector = 0x3c,
|
|
};
|
|
|
|
enum Mode {
|
|
ModeNormal,
|
|
ModeBsxSlotted,
|
|
ModeBsx,
|
|
ModeSufamiTurbo,
|
|
ModeSuperGameBoy,
|
|
};
|
|
|
|
enum Type {
|
|
TypeNormal,
|
|
TypeBsxSlotted,
|
|
TypeBsxBios,
|
|
TypeBsx,
|
|
TypeSufamiTurboBios,
|
|
TypeSufamiTurbo,
|
|
TypeSuperGameBoy1Bios,
|
|
TypeSuperGameBoy2Bios,
|
|
TypeGameBoy,
|
|
TypeUnknown,
|
|
};
|
|
|
|
enum Region {
|
|
NTSC,
|
|
PAL,
|
|
};
|
|
|
|
enum MemoryMapper {
|
|
LoROM,
|
|
HiROM,
|
|
ExLoROM,
|
|
ExHiROM,
|
|
SuperFXROM,
|
|
SA1ROM,
|
|
SPC7110ROM,
|
|
BSCLoROM,
|
|
BSCHiROM,
|
|
BSXROM,
|
|
STROM,
|
|
};
|
|
|
|
enum DSP1MemoryMapper {
|
|
DSP1Unmapped,
|
|
DSP1LoROM1MB,
|
|
DSP1LoROM2MB,
|
|
DSP1HiROM,
|
|
};
|
|
|
|
bool loaded; //is a base cartridge inserted?
|
|
unsigned crc32; //crc32 of all cartridges (base+slot(s))
|
|
unsigned rom_size;
|
|
unsigned ram_size;
|
|
|
|
Mode mode;
|
|
Type type;
|
|
Region region;
|
|
MemoryMapper mapper;
|
|
DSP1MemoryMapper dsp1_mapper;
|
|
|
|
bool has_bsx_slot;
|
|
bool has_superfx;
|
|
bool has_sa1;
|
|
bool has_srtc;
|
|
bool has_sdd1;
|
|
bool has_spc7110;
|
|
bool has_spc7110rtc;
|
|
bool has_cx4;
|
|
bool has_dsp1;
|
|
bool has_dsp2;
|
|
bool has_dsp3;
|
|
bool has_dsp4;
|
|
bool has_obc1;
|
|
bool has_st010;
|
|
bool has_st011;
|
|
bool has_st018;
|
|
};
|
|
|
|
extern XML xml;
|