Add Write and WriteShort to ROM class
This commit is contained in:
@@ -725,6 +725,13 @@ gfx::SNESPalette ROM::ReadPalette(int offset, int num_colors) {
|
|||||||
return palette;
|
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() {
|
void ROM::LoadAllPalettes() {
|
||||||
// 35 colors each, 7x5 (0,2 on grid)
|
// 35 colors each, 7x5 (0,2 on grid)
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
|
|||||||
@@ -96,6 +96,9 @@ class ROM {
|
|||||||
gfx::SNESColor ReadColor(int offset);
|
gfx::SNESColor ReadColor(int offset);
|
||||||
gfx::SNESPalette ReadPalette(int offset, int num_colors);
|
gfx::SNESPalette ReadPalette(int offset, int num_colors);
|
||||||
|
|
||||||
|
void Write(int addr, int value);
|
||||||
|
void WriteShort(int addr, int value);
|
||||||
|
|
||||||
void RenderBitmap(gfx::Bitmap* bitmap) const;
|
void RenderBitmap(gfx::Bitmap* bitmap) const;
|
||||||
|
|
||||||
absl::Status ApplyAssembly(const absl::string_view& filename,
|
absl::Status ApplyAssembly(const absl::string_view& filename,
|
||||||
|
|||||||
Reference in New Issue
Block a user