Add Write and WriteShort to ROM class

This commit is contained in:
scawful
2023-01-10 13:46:18 -06:00
parent 539a2d24c6
commit 3c0e1b9323
2 changed files with 10 additions and 0 deletions

View File

@@ -725,6 +725,13 @@ gfx::SNESPalette ROM::ReadPalette(int offset, int num_colors) {
return palette;
}
void ROM::Write(int addr, int value) { rom_data_[addr] = value; }
void ROM::WriteShort(int addr, int value) {
rom_data_[addr] = (uchar)(value & 0xFF);
rom_data_[addr + 1] = (uchar)((value >> 8) & 0xFF);
}
void ROM::LoadAllPalettes() {
// 35 colors each, 7x5 (0,2 on grid)
for (int i = 0; i < 6; i++) {