Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly odd rendering on a Mac #38

Open
ukd1 opened this issue Mar 3, 2023 · 2 comments
Open

Slightly odd rendering on a Mac #38

ukd1 opened this issue Mar 3, 2023 · 2 comments

Comments

@ukd1
Copy link

ukd1 commented Mar 3, 2023

I'm learning GB dev, and some simple sprite swapping code is not rendering out as expected using this emulator (release built on an M1 Mac from bc90e61), but is with others.

For example with gameboy vs rboy:
problem

I've attached the rom, and the code as it's simple. I am building it with @gbdk-2020.

#include <gb/gb.h>

const unsigned char face[] =
{
  0x7E,0x7E,0x81,0x81,0xA5,0xA5,0x81,0x81,
  0xA5,0xA5,0x99,0x99,0x81,0x81,0x7E,0x7E,
  0x7E,0x7E,0x81,0x81,0xA5,0xA5,0x81,0x81,
  0x81,0x81,0xBD,0xBD,0x81,0x81,0x7E,0x7E
};


void main(void) {
    UINT8 current_sprite = 0;
    set_sprite_data(0, 2, face);
    set_sprite_tile(0, 0);
    move_sprite(0, 88, 78);
    SHOW_SPRITES;

    while(1) {
        if (current_sprite == 0) {
            current_sprite = 1;
        } else {
            current_sprite = 0;
        }
        delay(1000);
        set_sprite_tile(0, current_sprite);
    }
}

Anyway, thanks for the effort on this project! 🙇🏻

@mohanson
Copy link
Owner

mohanson commented Mar 6, 2023

I'm guessing there's a bug somewhere, but I don't know how to start right now. I'll try to analyze it, thanks for the report.

@ukd1
Copy link
Author

ukd1 commented Mar 6, 2023

Of course, hopefully it's detailed enough to help find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants