diff --git a/src/frontend/sdl.rs b/src/frontend/sdl.rs index 44c8686..f3ab252 100644 --- a/src/frontend/sdl.rs +++ b/src/frontend/sdl.rs @@ -89,8 +89,8 @@ impl Renderer for SDLRenderer { let window = video_subsystem .window( "Siena SNES emulator", - (width * 3).try_into()?, - (height * 3).try_into()?, + (width * 2).try_into()?, + (height * 2).try_into()?, ) .position_centered() .build()?; diff --git a/src/snes/ppu/ppu.rs b/src/snes/ppu/ppu.rs index 8ae5245..45c8297 100644 --- a/src/snes/ppu/ppu.rs +++ b/src/snes/ppu/ppu.rs @@ -15,8 +15,8 @@ use std::sync::Arc; use std::thread::sleep; use std::time::{Duration, Instant}; -pub const SCREEN_WIDTH: usize = 8 * 32; -pub const SCREEN_HEIGHT: usize = 8 * 28; +pub const SCREEN_WIDTH: usize = 512; +pub const SCREEN_HEIGHT: usize = 448; // The entire screen should be shifted up by 1 scanline const SCANLINE_OUTPUT_OFFSET: isize = -1; @@ -185,19 +185,24 @@ where pub fn render_scanline(&mut self, scanline: usize, output_offset: isize) { let output_line = usize::try_from((scanline as isize) + output_offset).unwrap(); - if output_line >= SCREEN_HEIGHT { - return; - } + let upper_line = output_line * 2; + let lower_line = upper_line + 1; + let mut t_state = self.state.clone(); let t_buffer = self.renderer.as_mut().unwrap().get_buffer(); self.pool.execute(move || { let line = t_state.render_scanline(scanline); for (x, color) in line.into_iter().enumerate() { - let idx = ((output_line * SCREEN_WIDTH) + x) * 4; - t_buffer[idx].store(color.2.into(), Ordering::Release); - t_buffer[idx + 1].store(color.1.into(), Ordering::Release); - t_buffer[idx + 2].store(color.0.into(), Ordering::Release); + let idx_upper = ((upper_line * SCREEN_WIDTH) + x) * 4; + t_buffer[idx_upper].store(color.2.into(), Ordering::Release); + t_buffer[idx_upper + 1].store(color.1.into(), Ordering::Release); + t_buffer[idx_upper + 2].store(color.0.into(), Ordering::Release); + + let idx_lower = ((lower_line * SCREEN_WIDTH) + x) * 4; + t_buffer[idx_lower].store(color.2.into(), Ordering::Release); + t_buffer[idx_lower + 1].store(color.1.into(), Ordering::Release); + t_buffer[idx_lower + 2].store(color.0.into(), Ordering::Release); } }); } diff --git a/src/snes/ppu/render.rs b/src/snes/ppu/render.rs index 5df3ae7..e9bcaf9 100644 --- a/src/snes/ppu/render.rs +++ b/src/snes/ppu/render.rs @@ -169,10 +169,11 @@ impl PPUState { let bghofs = self.bgxhofs[bg] as usize; let bgvofs = self.bgxvofs[bg] as usize; - let tilesize = self.get_bg_tile_size(bg); + let (tilewidth, tileheight) = self.get_bg_tile_size(bg); + let scale = self.get_screen_mode_scale_bg(); let mut x = 0; - 'line: while x < SCREEN_WIDTH { + 'line: while x < (SCREEN_WIDTH / scale) { // Get adjusted offsets for offset-per-tile (if applicable) let (thofs, tvofs) = self.adjust_offsets_opt(bg, x, bghofs, bgvofs); @@ -190,8 +191,8 @@ impl PPUState { // Determine coordinates within the tile. This is // a full tile (so either 8x8 or 16x16). - let px_x = (x + thofs) % tilesize; - let px_y = (scanline + tvofs) % tilesize; + let px_x = (x + thofs) % tilewidth; + let px_y = (scanline + tvofs) % tileheight; // get_bg_tile will select the sub-tile (for 16x16). let tile = self.get_bg_tile(bg, &entry, px_x, px_y); @@ -246,6 +247,8 @@ impl PPUState { // This is also why scanline 0 is never rendered. let scanline = scanline - 1; + let scale = self.get_screen_mode_scale_sprites(); + for idx in 0..OAM_ENTRIES { let prio_idx = if self.oam_priority { // Priority rotation enabled @@ -261,7 +264,7 @@ impl PPUState { if (e.y..(e.y + e.height)).contains(&scanline) { for x in e.x..(e.x + e.width as i32) { - if x >= state.idx.len() as i32 || x < 0 { + if (x * scale as i32) >= state.idx.len() as i32 || x < 0 { // Outside of visible area. continue; } @@ -284,7 +287,7 @@ impl PPUState { ((scanline - e.y) / TILE_HEIGHT) as usize, ); // Should be positive from here on - let x = x as usize; + let x = (x as usize) * scale; let sprite = self.get_sprite_tile(&e, t_x, t_y); @@ -292,10 +295,13 @@ impl PPUState { if coloridx == 0 || state.idx[x] != 0 { continue; } - state.idx[x] = coloridx; - state.palette[x] = sprite.oam.palette(); - state.paletted[x] = self.sprite_cindex_to_color(&sprite, coloridx); - state.layer[x] = LAYER_SPRITES; + + for ix in x..(x + scale) { + state.idx[ix] = coloridx; + state.palette[ix] = sprite.oam.palette(); + state.paletted[ix] = self.sprite_cindex_to_color(&sprite, coloridx); + state.layer[ix] = LAYER_SPRITES; + } } } } @@ -507,10 +513,11 @@ impl PPUState { ); // Send line to screen buffer + let scale = self.get_screen_mode_scale_bg(); let brightness = (self.inidisp & 0x0F) as usize; let mut out: ArrayVec = ArrayVec::new(); - for x in 0..SCREEN_WIDTH { + for x in 0..(SCREEN_WIDTH / scale) { if brightness == 0 || self.inidisp & 0x80 != 0 { // Force blank or no brightness out.push(SnesColor::BLACK.to_native()); @@ -531,7 +538,9 @@ impl PPUState { }; // Apply master brightness and output - out.push(pixel.apply_brightness(brightness).to_native()); + for _ in 0..scale { + out.push(pixel.apply_brightness(brightness).to_native()); + } } out diff --git a/src/snes/ppu/state.rs b/src/snes/ppu/state.rs index 0648179..33a2437 100644 --- a/src/snes/ppu/state.rs +++ b/src/snes/ppu/state.rs @@ -271,10 +271,31 @@ impl PPUState { TilemapEntry(self.vram[self.get_tilemap_offset(bg, tileidx)]) } + /// Returns the active PPU mode. pub(super) fn get_screen_mode(&self) -> u8 { self.bgmode & 0x07 } + /// Returns the horizontal scaling factor of the active PPU mode, + /// for backgrounds, based on the full resolution (512). + /// Does not look at pseudo high res. + pub(super) fn get_screen_mode_scale_bg(&self) -> usize { + match self.get_screen_mode() { + 5 | 6 => 1, + _ => 2, + } + } + + /// Returns the horizontal scaling factor of the active PPU mode, + /// for sprites, based on the full resolution (512). + /// Does not look at pseudo high res. + pub(super) fn get_screen_mode_scale_sprites(&self) -> usize { + match self.get_screen_mode() { + 5 | 6 => 2, + _ => 1, + } + } + pub(super) fn get_tilemap_dimensions(&self, bg: usize) -> TilemapDimensions { TilemapDimensions::from_u8(self.bgxsc[bg] & 0x03).unwrap() } @@ -289,7 +310,7 @@ impl PPUState { ) -> TilemapEntry { debug_assert!(self.get_screen_mode() != 7); - let tilesize = self.get_bg_tile_size(bg); + let (tilewidth, tileheight) = self.get_bg_tile_size(bg); // AA BB CC DD, size = 0x800 per sub-map // 00 32x32 AA @@ -306,8 +327,8 @@ impl PPUState { TilemapDimensions::D64x32 => (true, false), TilemapDimensions::D64x64 => (true, true), }; - let tm_x = (bghofs + x) / tilesize; - let tm_y = (bgvofs + y) / tilesize; + let tm_x = (bghofs + x) / tilewidth; + let tm_y = (bgvofs + y) / tileheight; // 32 tiles per row in the sub-map, 0-31 let mut idx = ((tm_y & 0x1F) << 5) + (tm_x & 0x1F); @@ -406,10 +427,11 @@ impl PPUState { // T+00 T+01 // T+16 T+17 let mut tilenr = entry.charnr() as usize; - if self.get_bg_tile_size(bg) == 16 && (px_x >= TILE_WIDTH) == !entry.flip_x() { + let (tilewidth, tileheight) = self.get_bg_tile_size(bg); + if tilewidth == 16 && (px_x >= TILE_WIDTH) == !entry.flip_x() { tilenr += 1; } - if self.get_bg_tile_size(bg) == 16 && (px_y >= TILE_HEIGHT) == !entry.flip_y() { + if tileheight == 16 && (px_y >= TILE_HEIGHT) == !entry.flip_y() { tilenr += 16; } @@ -421,11 +443,15 @@ impl PPUState { } } - pub(super) fn get_bg_tile_size(&self, bg: usize) -> usize { - if self.bgmode & (1 << (4 + bg)) != 0 { - 16 - } else { - 8 + /// Returns the size in pixels (width, height) of a bg tile + pub(super) fn get_bg_tile_size(&self, bg: usize) -> (usize, usize) { + match self.get_screen_mode() { + 0..=5 if self.bgmode & (1 << (4 + bg)) != 0 => (16, 16), + 0..=4 => (8, 8), + 5 => (16, 8), + 6 => (16, 16), + 7 => (8, 8), + _ => unreachable!(), } } } diff --git a/src/test/peterlemon_65816.rs b/src/test/peterlemon_65816.rs index aff8d29..ff3ed3a 100644 --- a/src/test/peterlemon_65816.rs +++ b/src/test/peterlemon_65816.rs @@ -27,55 +27,55 @@ macro_rules! test { test!( ADC, - "90c7029b247df20706c49d7fe590c2f37be0438fd7d6463084aa840e9cc1a61a" + "09e1e039d4ce04db11444c391dce4278fd9454a156ac00550c0e67a809afb0f4" ); test!( AND, - "a07825d3bf9a4a5d138ff131877e976e640a055a2c37872a14f971bda49207ae" + "5883aff6b941092a4537000267f39c85d2e98a276d65346b992f92b185d836ab" ); test!( ASL, - "5173b94d17861fc73c3225ca62718f3c6575892b305486aade1f175f8e28afde" + "4c8fb96e050fbefbc8b34891ba2d7a62ba60390291542674b3aadb20d2e28bd9" ); test!( BIT, - "b6d935d42a4034d337a5e9993920b9923195892e9a85dfd32a765854b9af17e5" + "6b979e59f0b84c114a78eecd5dc1be918ded4273d955a0c1cfd4782091a57fba" ); test!( BRA, - "9a92b3f53290c22c2df30ab91de88f2697a66c07ac9362e726c3c1dca2e3011d" + "855ad6b651be7bc54a79ca05ba5b3026527aab37c4f11112a17a2f3e3e535917" ); test!( CMP, - "f212561a035b42936b3a495457c1a09d6dfc93990a9a82b02996b089ebe9026e" + "f1d0681e1a5784a04be5e2c7dec14ef7eb2f440de68f834f8fb3d0e155e5a522" ); test!( DEC, - "d78763079aec92e7340f896f3fea58477e933c8a5c7a2ba61bae5e6832aeaeb4" + "bded97b61ade7ddc4c04f056d32fa161ee202388adbd09fdc7ffcaf17edb248d" ); test!( EOR, - "87e9f07695a9945da509f578a5ddb4b8ef8aebc6365a99b47f282d6d07a5efcd" + "f93f0d8d4c4a82f015f54437bcb70f76c1c7404ac4c691291e05fdf3f4522690" ); test!( INC, - "ee5fd161a95a36104e00f7ef5c410de585205ac9c47504419a329fd87516de12" + "66a3ad9b024c502fb57a6dbe84a48e771b38c790289935d9f0aca403de787edd" ); test!( JMP, - "0107a1e933c74b74a1fc7f2bea324c7437e86e4ab66b3b1e9577f62e59875a4b" + "99a7d5e4b8d6d3a2a3e9a913ff6ade1e36f8dc1ba9aa7b966c921947becfa64c" ); test!( LDR, - "94d2b2d46228116116fca7b51f2ac3381a4a84b8b39df2a5c383fbe4d6d15c10" + "b17468cc1c7cd6585fd022247af8ad2d45f50b048f47930893464dce46e93ac1" ); test!( LSR, - "4f3154db684d2f03d0b2d5f96e78c34794134d77a628d67311d7129dab1805f7" + "231b26a5f0f68adf5c43e99cf556482e38aa51a89b400729d6036de372903206" ); test!( MOV, - "396113963ba0219f88e7f0dc3c2dff0362511c755e36c6522f63f80a4ad89c39" + "a935507f18286e8527a0a056ec0ac5f482daa1b13fefa9e5d5580a1ebe216f4a" ); //test!( // MSC, @@ -83,37 +83,37 @@ test!( //); test!( ORA, - "5cb7b05939edf71c82f4c1f8f9bc3ec75b561ca2c8499804c188bcb723f77d46" + "7c4c14dab0163ab0c05adf114f741bae6344973cb8636571cdbd8850f9c9caad" ); test!( PHL, - "c93495aafedc6d6b789ec760dbe57a20077be87bcd4493cd393e209890b2cc38" + "ccd2830e7da40fe7ee4ff45fa96d579508868bf93956fbc0039c1c2118c910b5" ); test!( PSR, - "3ec1f1d7c405eebef52eb3c8755f2987377f35d4f7b60671e127b2a734d23d3b" + "2cc82ca6150945d6e6e54b2726e17f27f2b7c3e8aeede349dcca5032d5e1208f" ); test!( RET, - "9a16006eadafef71059192295cc791239deeafd1008eed2e7296b2481692e93f" + "60ff23a891458de47c736cab93b1da275045809f314ad8bb034475dfdb82ad88" ); test!( ROL, - "387d2e971dff021feaee18bf71879561948afc285e409b2de34b5c70451cd043" + "c340d41e39c8818c10d329556d96a790a6661c3d834984f81396215f0ce706f5" ); test!( ROR, - "409f998b8fec3eb0e7c04a67734311ab04dad48a3f6b12194cacf09c5ca299a0" + "cbec3c3ad79e4ce60068b99d1733ac8aecebd3f24a491179644c5462a1a986e8" ); test!( SBC, - "0319caa2c83fad543bfe4826aa454f514fc5e9089b9c981601e0fa8f56f37285" + "a379af0bad0687a51f7aefd2887dda837508b2fa50ab8b61db3f8dcff15bb184" ); test!( STR, - "920b22b58157811affcea80730cfd3bf9dd83a8453896e0f2e60e47c8c15aaef" + "aa0a524afd646b589f83dabd2fc4d94ca941ea4ecdb69a29ff88705b75582df5" ); test!( TRN, - "58354be3f8257551b7a71991f535dedd80afb4c8a344f40147cd1deac1cd7775" + "d29eb5016ffff391324c79d7a4cd1f52cda2e811ce8cbbd35775b313370b5671" ); diff --git a/src/test/peterlemon_bank.rs b/src/test/peterlemon_bank.rs index 65e7646..b5a9709 100644 --- a/src/test/peterlemon_bank.rs +++ b/src/test/peterlemon_bank.rs @@ -36,25 +36,25 @@ macro_rules! hirom_test { hirom_test!( BANKHiROMFastROM, "HiROMFastROM/BANKHiROMFastROM.sfc", - "2ab4871e60935c6fcaf06a40849912f7b8ad23f8e850bb0f03d2576e96664536" + "d777408bf78b94b7cde5331f9b2669de066b4df1f744751c1aff4205f290f35a" ); hirom_test!( BANKHiROMSlowROM, "HiROMSlowROM/BANKHiROMSlowROM.sfc", - "36ab039767172d7a452d6337f7703627e912e8ffc833b10e3eb3467b1cc38e60" + "af47aefcfd6f0a0842d7ef117d4539d8d3c1ae1e97ea713df8167fce8b81458c" ); lorom_test!( BANKLoROMFastROM, "LoROMFastROM/BANKLoROMFastROM.sfc", - "1f2385252686bc02246eed8d670ee46d1bd01e25ad3c0a217dcb84a180e2f045" + "ba0b954785794fd831d84de131fb022b252aceab6fe1d2dbf154fcbab9ac0f41" ); lorom_test!( BANKLoROMSlowROM, "LoROMSlowROM/BANKLoROMSlowROM.sfc", - "89b0ae2ce790bceaa0ea97f780b78e69546e812c0539a39b810d6e87f7d2f379" + "09e7951a9d0ccee76f6e7c388a452d7e107a46703ae61e1272af661e1540973c" ); lorom_test!( BANKWRAM, "WRAM/BANKWRAM.sfc", - "c54861d958c14c00b9eadfe2727b0ce9c4b6e25411cf1b833efe337714b61a6c" + "fa69f0d486b66e4825fcc1a9c94a70ef4a748c748ae9c75e888302543209470e" ); diff --git a/src/test/peterlemon_gsu.rs b/src/test/peterlemon_gsu.rs index f63325f..c89e59b 100644 --- a/src/test/peterlemon_gsu.rs +++ b/src/test/peterlemon_gsu.rs @@ -43,261 +43,261 @@ macro_rules! test { test_instr!( ADC, - "37f2762099429d75055f307c9b1d5e82e204b0e431279c8036a9d108b5fb07eb" + "57357b1d4eef094e5e7c5a577e5af357f98e4ce7548afa6208b87e4d71d6d981" ); test_instr!( ADD, - "de9f72e11f37844212389e9a90a5275ad54ac437b1d0c73b684f26a180228b2a" + "9464afd9a6e5b5b7e82820e3ec9a19d6b332f778ae91fbfe6d130bb94b29ab80" ); test_instr!( AND, - "cd8cfe5d386d79c67599942f6f35403a8cca101b5337ac4e83e3ceacb6798bc8" + "bfaa13ea4f1fa94aa865217c7081ba68b7509c5d68a88164a5a8ae78eb753e00" ); test_instr!( ASR, - "b03a1771af6fce6739dd63c944253bd575fe83676b98e724fa96e822c0ef3c23" + "9b95c4d0b4748b9bad1d25291eb8c134cde5b7f68b2d53a68b1a84f015a04093" ); test_instr!( BIC, - "06aa897653bc52e02cf37f65b0bc71951a440b465aeed2d839e28dacaea1261e" + "8b63a6305c0720e36a3c243ab0343b59b1d64001a1174dbd574b412ae6791a2b" ); test_instr!( CACHEINJECT, - "41a020ec5fd22d07947240ef200e47045c2cf4e4745fdec331dd88dfc190223c" + "223972bb8f80aa9c7cb1a8ed0888bc6a5b547aa6000eba3e5d98124b9e20be77" ); test_instr!( CMP, - "f358269ca59fd8fde0b92b5bf2e112c6fab6423f7df96b3ee9a4029a1e485596" + "b956679b98b69b2a352cbd8c4aee148209cf862bfcd9b19aa18fa55762b92290" ); test_instr!( DEC, - "299a3ae2e890d3df6b9b08d5801a34b570f9f175756bdd2095d3598616a3888d" + "97de2ae05bc5c9fd33050e5b404d582a4776f0c158fcddd0d5de9a2787e2259e" ); test_instr!( DIV2, - "914bb1eeffb13f4e960c862330570da7d8e3900a85721931877e833c4f6ca2b4" + "e2c85bf15bda0ba0a09b9a41c8d8051c20523744482651332a369c1cb6d88bca" ); test_instr!( FMULT, - "0727c7275a04d23b5eda5cc5a08cb781cec92ce48af709029811bca6af50cd30" + "aa11adbb7311853a47641e3496e794ce408b6b46c40c01cba0e604b3ce4fa096" ); test_instr!( HIB, - "007cc9321ac216460fa3827b590cd9e320206da8e87049ad82c17ff62c049c0a" + "4ad2a4b0594f86095a23225fa053e6c82f9049e768d694cdd92b776ba832eb23" ); test_instr!( IBT, - "ef5747209c3a2aff11d3f6bb8ab2c8651a5b32b68ea7271f2a290f13f4b4a340" + "6b91f2ae7fe5baa507cac7301a574bcaeb3c620b54b6cbbc984f856c9fe2847b" ); test_instr!( INC, - "587b3f81700a4f33b22c493a438c73d004580a7d990a29db05ff7eb8a74b8dbc" + "9135c00c86992b5d7c7f1ba44af065b9eac038b593f566aeac5629d61ee2283b" ); test_instr!( IWT, - "8f9723fd9dc60671f2fe8533c2bbe440f00159d629022dbafb2480934e2d1603" + "89186701e498c5da2a3a1aa870d579488efd8acf2da279b91ca9804ee58f13ee" ); test_instr!( LMULT, - "d516286af434eed3c51bc0cd6189a0bbd72f92ff0433c81a5630e6293626fe31" + "6f05945702e61311bd2182f71ac77e950bf4698a9033fc77cb442f5acdd7afa6" ); test_instr!( LOB, - "77d1a740819d2175f7bce8a0b4307da68a7c63920d961f58f79ef58059e118cf" + "b6d4db11dc08e752ccd83fcde4ec1ed1ace45bdae25e3554a02907da5eb33a39" ); test_instr!( LSR, - "bf88436e72e07c1b1af87a8b07db76475090967d92a00965e3e954436ce36dc8" + "5e727d5ab2c2f315302983ecd8b273df32352a8f6089c21190bec6fd5e077df9" ); test_instr!( MERGE, - "e9fe1f2f7a24612b0d43ea5241b64b3c2453d0f824b3152c7d4cb85d1525e25c" + "750a9a687534ca1b1da80d761a9e49231fdce05c41136f836c96f83597164aff" ); test_instr!( MOVE, - "11e1dec10dc452784a6595f36ee536e696f0236fcbfb130398db4f26194db669" + "75ca16694291e5a6f0ec8411b99e6a400f891d528f50255085811fcdca6f117c" ); test_instr!( MOVES, - "5cbf50d260ca51353385caf88e19d80118670fc848b2391c3659e7121854f834" + "006835e6e83201ae6226ecc94d3f21527b4add86f31d69c34201e6713783566a" ); test_instr!( MULT, - "91501add6875282f548b05a631f11f55dcfd297153cbee1058c5a45f264df0b9" + "8b109131643148461871c83f87fb5f523195e77732a4029fe9f90e657a5acfc3" ); test_instr!( NOT, - "0df76d9fc716575400c4c6baaf53f284f59cf8b6ba066c013c150167e1c1652e" + "760b0db4e974bbcb6831c860543cde95fa036e9f94c00d45c2438ffa7b79db74" ); test_instr!( OR, - "3247f4d2ff8df0f040a1c87295cda3655d5900a96bea94723a0fdf1029369cf1" + "88b0aa43c98688bb16ff331ac9d565b6bb4dcf911ede5b88cd10c439858f403c" ); test_instr!( ROL, - "a1aef52d36c0c402e9b070164b5a9950df77110c755e08a03262b825fb60b7b0" + "73f6c69f1d085ca757b9c1f28b38b0001260293a91577ff9181b653aaa81c0a8" ); test_instr!( ROR, - "4f4e399186f472bab253216754c03f9da93f7b54376951167ce30cd9311ff6f7" + "b7aa09e3486e8a86c8ec0734f81133e975e0dcc56baf0df0a3fe0efec0e49aac" ); test_instr!( SBC, - "5ca8e8b3fd757c6624c12ab24933fa1877fdfdf5f1e93e456af06cf1eaf2cada" + "e279f33482cdab3170a262b8adde4039097bb0faa39ac5c6b18eca021e178d9f" ); test_instr!( SEX, - "0111d224c50333ca7a15649593a1978b27ab6a157d7b9d2296e35cf917dfa9b9" + "51c05a209bd65a691ad82ec34182ab3e19eb1e495c7661b560ab89933f9f3a7d" ); test_instr!( SUB, - "1e79664b574ef3a418f8896763e3a7a78d6cf9d82e883f662574e389c9ea5bd2" + "1b1e74709ea984e55969a449b07021a3f17d8fa51e4df0d29c726022c24be37c" ); test_instr!( SWAP, - "c3e00447f24cadf80768bc563c24c1e7bbd1e56fed95b6e9ce5129a4da2dd0d9" + "134b19db5c6ecc653277fc3015fa1f9c33f33203542ab6d29d386c2fbf049d10" ); test_instr!( UMULT, - "673674cfd30ca0303eaf551edf2ac3410412e5a1c6e5a1254acb8ca1801296f9" + "e5f4802df3d82fd441654aacacb983cafa9db799dd108705d85df632c61892af" ); test_instr!( XOR, - "cd0d145aa76c202c872d59e03866aee5ab82c183283a991c4b308ed521325918" + "91add3c8db1a2ee96b046b6ab075cf8f031fc5907082b078d8fd7d8127c1f0fa" ); test!( GSU2BPP256x128FillPoly, "2BPP/FillPoly/256x128/GSU2BPP256x128FillPoly.sfc", - "316379e7206c2123b309fd680fe9b5c78cc6cdbcbb51970bb686f720aa52d59b" + "58438705947af2c993df4948b195336da924be41cf491f7417b7f1305ec0eae0" ); test!( GSU2BPP256x160FillPoly, "2BPP/FillPoly/256x160/GSU2BPP256x160FillPoly.sfc", - "569b52d85ad936c0eece352371ab8261e2805696193edd269ed6bd3dcea89968" + "780cc8b72fe5ec66cd223191143d8ad2b098e9e7728c63f19615788982469832" ); test!( GSU2BPP256x192FillPoly, "2BPP/FillPoly/256x192/GSU2BPP256x192FillPoly.sfc", - "aef15107dd671afe9425aa7cf0fc7aa60149d4afeb75d2c383e80fc2fc9e258f" + "aff488c325ee30437df54b35d10a0deb05d07da840f7c791c1bb837a026c3f4f" ); test!( GSU2BPP256x128PlotLine, "2BPP/PlotLine/256x128/GSU2BPP256x128PlotLine.sfc", - "ff0ac8f638021d73c9f306a8d2107f9fa4977f1d514a593d9ae192692660c758" + "0ef2b646771caea308a07e12305bad503d9df6ba055f0a8bce1002c77ce513aa" ); test!( GSU2BPP256x160PlotLine, "2BPP/PlotLine/256x160/GSU2BPP256x160PlotLine.sfc", - "af7a05949c8b377d6220d4d050bc2eec8999b79b7138eccdb59961167a6cf1b6" + "a071cae220ced16963fe8b11a07fdc85b7c2dfce47068b7c8d2edf8c34bc7bf3" ); test!( GSU2BPP256x192PlotLine, "2BPP/PlotLine/256x192/GSU2BPP256x192PlotLine.sfc", - "1e6e5a4cb414770083905f0c5d7f06cfe45fbabdac8eea91b7c8ab4ccce0f519" + "b0e13fa29e55f8925da490c0c4d43af28302e31667c539257f07d63899b6c35b" ); test!( GSU2BPP256x128PlotPixel, "2BPP/PlotPixel/256x128/GSU2BPP256x128PlotPixel.sfc", - "99c4a4357aa6062cb6eec3339e8b67931467b4006977442116157596764acd0e" + "b772874b1c7486b0b1f5a37a4d0bf831a4cce3bfde21771cc9ee95aa3a60e2d6" ); test!( GSU2BPP256x160PlotPixel, "2BPP/PlotPixel/256x160/GSU2BPP256x160PlotPixel.sfc", - "ca21634435f0585f51e84d7fb1bd37c674d264c00be46175eb9f648487ff3e44" + "2690a92601c03760544da8d3231c9ebf7a04540bf8bcbfb3c58f1681698d1a1a" ); test!( GSU2BPP256x192PlotPixel, "2BPP/PlotPixel/256x192/GSU2BPP256x192PlotPixel.sfc", - "9f1168626ef71fe00e5371b7b21271a6ee2cb903ff437a8483b79afa9695fec2" + "3c81ad682940a530e87ac29e06ef505f9012f2e1fca6a46e67afb42a81ec21c3" ); test!( GSU4BPP256x128FillPoly, "4BPP/FillPoly/256x128/GSU4BPP256x128FillPoly.sfc", - "316379e7206c2123b309fd680fe9b5c78cc6cdbcbb51970bb686f720aa52d59b" + "58438705947af2c993df4948b195336da924be41cf491f7417b7f1305ec0eae0" ); test!( GSU4BPP256x160FillPoly, "4BPP/FillPoly/256x160/GSU4BPP256x160FillPoly.sfc", - "569b52d85ad936c0eece352371ab8261e2805696193edd269ed6bd3dcea89968" + "780cc8b72fe5ec66cd223191143d8ad2b098e9e7728c63f19615788982469832" ); test!( GSU4BPP256x192FillPoly, "4BPP/FillPoly/256x192/GSU4BPP256x192FillPoly.sfc", - "aef15107dd671afe9425aa7cf0fc7aa60149d4afeb75d2c383e80fc2fc9e258f" + "aff488c325ee30437df54b35d10a0deb05d07da840f7c791c1bb837a026c3f4f" ); test!( GSU4BPP256x128PlotLine, "4BPP/PlotLine/256x128/GSU4BPP256x128PlotLine.sfc", - "ff0ac8f638021d73c9f306a8d2107f9fa4977f1d514a593d9ae192692660c758" + "0ef2b646771caea308a07e12305bad503d9df6ba055f0a8bce1002c77ce513aa" ); test!( GSU4BPP256x160PlotLine, "4BPP/PlotLine/256x160/GSU4BPP256x160PlotLine.sfc", - "af7a05949c8b377d6220d4d050bc2eec8999b79b7138eccdb59961167a6cf1b6" + "a071cae220ced16963fe8b11a07fdc85b7c2dfce47068b7c8d2edf8c34bc7bf3" ); test!( GSU4BPP256x192PlotLine, "4BPP/PlotLine/256x192/GSU4BPP256x192PlotLine.sfc", - "1e6e5a4cb414770083905f0c5d7f06cfe45fbabdac8eea91b7c8ab4ccce0f519" + "b0e13fa29e55f8925da490c0c4d43af28302e31667c539257f07d63899b6c35b" ); test!( GSU4BPP256x128PlotPixel, "4BPP/PlotPixel/256x128/GSU4BPP256x128PlotPixel.sfc", - "99c4a4357aa6062cb6eec3339e8b67931467b4006977442116157596764acd0e" + "b772874b1c7486b0b1f5a37a4d0bf831a4cce3bfde21771cc9ee95aa3a60e2d6" ); test!( GSU4BPP256x160PlotPixel, "4BPP/PlotPixel/256x160/GSU4BPP256x160PlotPixel.sfc", - "ca21634435f0585f51e84d7fb1bd37c674d264c00be46175eb9f648487ff3e44" + "2690a92601c03760544da8d3231c9ebf7a04540bf8bcbfb3c58f1681698d1a1a" ); test!( GSU4BPP256x192PlotPixel, "4BPP/PlotPixel/256x192/GSU4BPP256x192PlotPixel.sfc", - "9f1168626ef71fe00e5371b7b21271a6ee2cb903ff437a8483b79afa9695fec2" + "3c81ad682940a530e87ac29e06ef505f9012f2e1fca6a46e67afb42a81ec21c3" ); test!( GSU8BPP256x128FillPoly, "8BPP/FillPoly/256x128/GSU8BPP256x128FillPoly.sfc", - "316379e7206c2123b309fd680fe9b5c78cc6cdbcbb51970bb686f720aa52d59b" + "58438705947af2c993df4948b195336da924be41cf491f7417b7f1305ec0eae0" ); test!( GSU8BPP256x160FillPoly, "8BPP/FillPoly/256x160/GSU8BPP256x160FillPoly.sfc", - "569b52d85ad936c0eece352371ab8261e2805696193edd269ed6bd3dcea89968" + "780cc8b72fe5ec66cd223191143d8ad2b098e9e7728c63f19615788982469832" ); test!( GSU8BPP256x192FillPoly, "8BPP/FillPoly/256x192/GSU8BPP256x192FillPoly.sfc", - "aef15107dd671afe9425aa7cf0fc7aa60149d4afeb75d2c383e80fc2fc9e258f" + "aff488c325ee30437df54b35d10a0deb05d07da840f7c791c1bb837a026c3f4f" ); test!( GSU8BPP256x128PlotLine, "8BPP/PlotLine/256x128/GSU8BPP256x128PlotLine.sfc", - "ff0ac8f638021d73c9f306a8d2107f9fa4977f1d514a593d9ae192692660c758" + "0ef2b646771caea308a07e12305bad503d9df6ba055f0a8bce1002c77ce513aa" ); test!( GSU8BPP256x160PlotLine, "8BPP/PlotLine/256x160/GSU8BPP256x160PlotLine.sfc", - "af7a05949c8b377d6220d4d050bc2eec8999b79b7138eccdb59961167a6cf1b6" + "a071cae220ced16963fe8b11a07fdc85b7c2dfce47068b7c8d2edf8c34bc7bf3" ); test!( GSU8BPP256x192PlotLine, "8BPP/PlotLine/256x192/GSU8BPP256x192PlotLine.sfc", - "1e6e5a4cb414770083905f0c5d7f06cfe45fbabdac8eea91b7c8ab4ccce0f519" + "b0e13fa29e55f8925da490c0c4d43af28302e31667c539257f07d63899b6c35b" ); test!( GSU8BPP256x128PlotPixel, "8BPP/PlotPixel/256x128/GSU8BPP256x128PlotPixel.sfc", - "99c4a4357aa6062cb6eec3339e8b67931467b4006977442116157596764acd0e" + "b772874b1c7486b0b1f5a37a4d0bf831a4cce3bfde21771cc9ee95aa3a60e2d6" ); test!( GSU8BPP256x160PlotPixel, "8BPP/PlotPixel/256x160/GSU8BPP256x160PlotPixel.sfc", - "ca21634435f0585f51e84d7fb1bd37c674d264c00be46175eb9f648487ff3e44" + "2690a92601c03760544da8d3231c9ebf7a04540bf8bcbfb3c58f1681698d1a1a" ); test!( GSU8BPP256x192PlotPixel, "8BPP/PlotPixel/256x192/GSU8BPP256x192PlotPixel.sfc", - "9f1168626ef71fe00e5371b7b21271a6ee2cb903ff437a8483b79afa9695fec2" + "3c81ad682940a530e87ac29e06ef505f9012f2e1fca6a46e67afb42a81ec21c3" ); diff --git a/src/test/peterlemon_ppu.rs b/src/test/peterlemon_ppu.rs index c2ae6b6..b0677fc 100644 --- a/src/test/peterlemon_ppu.rs +++ b/src/test/peterlemon_ppu.rs @@ -38,27 +38,27 @@ macro_rules! ppu_test_ns { ppu_test!( BGMAP_8x8BG1Map2BPP32x328PAL, "BGMAP/8x8/2BPP/8x8BG1Map2BPP32x328PAL/8x8BG1Map2BPP32x328PAL.sfc", - "7168d73281a2ac2fa148be6299a27b6658bea7336dbbd9e1d64a4777354d0298" + "41d8648bd8f446360a380356bbb2d89ec0fe49271c507c894edd3c0536adcff2" ); ppu_test!( BGMAP_8x8BG2Map2BPP32x328PAL, "BGMAP/8x8/2BPP/8x8BG2Map2BPP32x328PAL/8x8BG2Map2BPP32x328PAL.sfc", - "ed04e4f004d43093b4e05909219f15f473256b837f8b8e8eb55f2e4d517af203" + "31178df307556b79d0f8f3d3aa1aa7303d4d7e773e620ff26fc232509358befd" ); ppu_test!( BGMAP_8x8BG3Map2BPP32x328PAL, "BGMAP/8x8/2BPP/8x8BG3Map2BPP32x328PAL/8x8BG3Map2BPP32x328PAL.sfc", - "ed04e4f004d43093b4e05909219f15f473256b837f8b8e8eb55f2e4d517af203" + "31178df307556b79d0f8f3d3aa1aa7303d4d7e773e620ff26fc232509358befd" ); ppu_test!( BGMAP_8x8BG4Map2BPP32x328PAL, "BGMAP/8x8/2BPP/8x8BG4Map2BPP32x328PAL/8x8BG4Map2BPP32x328PAL.sfc", - "ed04e4f004d43093b4e05909219f15f473256b837f8b8e8eb55f2e4d517af203" + "31178df307556b79d0f8f3d3aa1aa7303d4d7e773e620ff26fc232509358befd" ); ppu_test!( BGMAP_8x8BG4Map4BPP32x328PAL, "BGMAP/8x8/4BPP/8x8BGMap4BPP32x328PAL/8x8BGMap4BPP32x328PAL.sfc", - "376c8e27eb22a1885e434eefd5ca24144ee48b93d2938eaba2e959667aae8bb7" + "e15d3050d9d9b0d81a64755b76360b2b5e241ba861e69b807b8f8e7178e5e73b" ); //ppu_test_ns!( // // This test moves automatically @@ -70,47 +70,47 @@ ppu_test!( ppu_test!( Rings, "Rings/Rings.sfc", - "24ad228f589fccfa8882fcd9a594366a0a517972a7114f2d964b34025f0b355a" + "78e55f33bd71d44aa0c3d2a65435298fe8317e346b1c0ad2e1d35793c8458f67" ); // Color math tests ppu_test!( HiColor1241DLair, "Blend/HiColor/HiColor1241DLair/HiColor1241DLair.sfc", - "7342e56437c435e7236fe69c283b4e8e4ce17b2c6d5a0f6e85ac915dce16be02" + "fe4f5d8fce894905e66fa0b26fd21c009b80a63b190b5ad448937e1404b622ba" ); ppu_test!( HiColor3840, "Blend/HiColor/HiColor3840/HiColor3840.sfc", - "0759ec270966298ed871806502c6ffda3131213a87e67edbe4396ff2e49bc03d" + "8e4b2b3bab0167b25126d1bff6391d0138cb8c00c5f0a443c720107624dd31f9" ); ppu_test!( HiColor575Myst, "Blend/HiColor/HiColor575Myst/HiColor575Myst.sfc", - "8f9117eaf0bc0e3efd2f2ba81f3cef7f02646f9586eaedd8dea3d01c3742ad8b" + "887de33880a6d7719544097009238e7ebc09d1e80cbe93e1023e927fb6eeedba" ); // Window/HDMA tests ppu_test!( WindowHDMA, "Window/WindowHDMA/WindowHDMA.sfc", - "7484ab6f1e88835267bcdbadc9e7ee0568f730d4849e6208ee3683e35ad3e175" + "643e601d8c5ebbd0314566fe355ec377990c6604b5fddf56644c4bbda3eff54d" ); ppu_test!( WindowMultiHDMA, "Window/WindowMultiHDMA/WindowMultiHDMA.sfc", - "688de105142b1b28b1c0bb0473e518f1beada64623c9352e58f71341da1dbf19" + "da4ad21e28680c799409a35eebbbbf09a85284a08d15415977a2c29bb5aa867c" ); // Mode 7 tests ppu_test!( Mode7RotZoom, "Mode7/RotZoom/RotZoom.sfc", - "4235ddbbc79e0a5f3f2ebe075eb23e328a63a8ba0de6949d320747668790ab91" + "9cc7010be5454eb794178fc676145b81912349a115b18d6e46b63cee63f2d7f6" ); ppu_test!( // Tests screenover (transoarent) Mode7Perspective, "Mode7/Perspective/Perspective.sfc", - "48993ffece6707ea3c64ad4a9c3096ec81215fd5dda1f9a5aaff18ee31e6c616" + "0b607da41c14acb1145e5656f1c40af542a2198b4433da414d1b97e1224fc711" );