mirror of
https://github.com/kirjavascript/trueLMAO.git
synced 2024-06-02 19:47:21 -04:00
video region mode
This commit is contained in:
parent
6114b38013
commit
cfedc981db
|
@ -109,7 +109,7 @@ impl Megadrive {
|
||||||
|
|
||||||
self.core.execute(3420-588);
|
self.core.execute(3420-588);
|
||||||
|
|
||||||
for _ in screen_height..262 {
|
for _ in screen_height..262 { // TODO: PAL scanlines
|
||||||
self.core.execute(3420);
|
self.core.execute(3420);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ impl Mem {
|
||||||
0xA11100..=0xA112FF => self.z80.ctrl_read(address) as _,
|
0xA11100..=0xA112FF => self.z80.ctrl_read(address) as _,
|
||||||
0xC00000..=0xDFFFFF => self.vdp.read(address),
|
0xC00000..=0xDFFFFF => self.vdp.read(address),
|
||||||
0xFF0000..=0xFFFFFF => self.ram[address as usize & 0xFFFF] as _,
|
0xFF0000..=0xFFFFFF => self.ram[address as usize & 0xFFFF] as _,
|
||||||
_ => todo!("read byte {:X}", address),
|
_ => 0, //todo!("read byte {:X}", address),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn read_u16(&self, address: u32) -> u32 {
|
pub fn read_u16(&self, address: u32) -> u32 {
|
||||||
|
@ -67,7 +67,7 @@ impl Mem {
|
||||||
0xFF0000..=0xFFFFFF => {
|
0xFF0000..=0xFFFFFF => {
|
||||||
self.ram[address as usize & 0xFFFF] = value as u8;
|
self.ram[address as usize & 0xFFFF] = value as u8;
|
||||||
},
|
},
|
||||||
_ => todo!("write byte {:X} {:X}", address, value),
|
_ => (), //todo!("write byte {:X} {:X}", address, value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn write_u16(&mut self, address: u32, value: u32) {
|
pub fn write_u16(&mut self, address: u32, value: u32) {
|
||||||
|
|
|
@ -39,5 +39,6 @@ impl ROM {
|
||||||
pub fn serial_number(&self) -> String { self.read_string(0x180..0x18E) }
|
pub fn serial_number(&self) -> String { self.read_string(0x180..0x18E) }
|
||||||
pub fn checksum(&self) -> u16 { self.read_word(0x18E) }
|
pub fn checksum(&self) -> u16 { self.read_word(0x18E) }
|
||||||
pub fn device_support(&self) -> String { self.read_string(0x190..0x1A0) }
|
pub fn device_support(&self) -> String { self.read_string(0x190..0x1A0) }
|
||||||
|
pub fn region(&self) -> String { self.read_string(0x1F0..0x1F3) }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,9 @@ impl MDEmu {
|
||||||
#[wasm_bindgen(constructor)]
|
#[wasm_bindgen(constructor)]
|
||||||
pub fn new() -> MDEmu {
|
pub fn new() -> MDEmu {
|
||||||
MDEmu(Megadrive::new(
|
MDEmu(Megadrive::new(
|
||||||
include_bytes!("/home/cake/sonic/roms/s1p.bin").to_vec()
|
// include_bytes!("/home/cake/sonic/roms/s1p.bin").to_vec()
|
||||||
|
// include_bytes!("/home/cake/sonic/roms/s2.bin").to_vec()
|
||||||
|
include_bytes!("/home/cake/Genesis/Sonic The Hedgehog 3 (E) [!].bin").to_vec()
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue