lualiliu / esp32-gameboy

ESP32 Gameboy emulation based on Arduino
GNU General Public License v3.0
157 stars 24 forks source link

compilation error : - const unsigned char* #5

Open smutek110 opened 4 years ago

smutek110 commented 4 years ago

I tried various arduino ide but still a bug.

E:\gameboy\gameboy.ino: In function 'void setup()':

gameboy:14:26: error: invalid conversion from 'const char' to 'const unsigned char' [-fpermissive]

int r = rom_init(gb_rom);

                      ^

In file included from E:\gameboy\gameboy.ino:3:0:

sketch\rom.h:9:5: note: initializing argument 1 of 'int rom_init(const unsigned char*)'

int rom_init(const unsigned char *);

 ^

exit status 1

SuperMechaCow commented 3 years ago

In gbrom.h, try changing

const char gb_rom[]={

to

const unsigned char gb_rom[]={

Mine still isn't working, so I don't know that this is a fix. It will compile though.