ITotalJustice / notorious_beeg

gba emulator written in c++23
https://notorious-beeg.netlify.app/
GNU General Public License v3.0
41 stars 4 forks source link

[phoenix wight 1] text missing on the second line #27

Closed ITotalJustice closed 2 years ago

ITotalJustice commented 2 years ago

this happens when i treat the sprite_y as s8. the text simply isn't rendered. if i treat sprite_y as unsigned, it rendered. its likely an issue with this line here https://github.com/ITotalJustice/notorious_beeg/blob/6c76433bfdc4f3591fa9dafa686e3482ab5c6401/src/core/ppu.cpp#L285

y=s8 image

y=u8 image

treating y=u8 doesnt seem to be correct either. because then the top half of sprites will never be rendered.

ITotalJustice commented 2 years ago

my fix was incorrect according to https://www.coranac.com/tonc/text/affobj.htm#ssec-wrap

// pseudo code
if(oam.y + bbox_height > 256)
    oam.y -= 256;

i have tried the above code and it does work. need to push the changes