| @@ -154,8 +154,9 @@ static ErrorInfo* handle_block_directive( | |||||
| static ErrorInfo* parse_data( | static ErrorInfo* parse_data( | ||||
| const ASMLine *line, ASMData **data_ptr, size_t offset) | const ASMLine *line, ASMData **data_ptr, size_t offset) | ||||
| { | { | ||||
| parser_func parser = (parser_func) parse_string; | |||||
| const char *directive; | const char *directive; | ||||
| parser_func parser = (parser_func) parse_string; | |||||
| if (IS_DIRECTIVE(line, DIR_BYTE)) { | if (IS_DIRECTIVE(line, DIR_BYTE)) { | ||||
| directive = DIR_BYTE; | directive = DIR_BYTE; | ||||
| parser = parse_bytes; | parser = parse_bytes; | ||||
| @@ -213,6 +213,12 @@ const char* rom_open(ROM **rom_ptr, const char *path) | |||||
| return rom_err_badheader; | return rom_err_badheader; | ||||
| } | } | ||||
| if (rom->region_code == 3 || rom->region_code == 4) { | |||||
| // TODO: support SMS ROMs eventually? | |||||
| rom_close(rom); | |||||
| return rom_err_sms; | |||||
| } | |||||
| *rom_ptr = rom; | *rom_ptr = rom; | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| @@ -23,6 +23,7 @@ static const char* rom_err_notfile = "Is not a regular file"; | |||||
| static const char* rom_err_badsize = "Invalid size"; | static const char* rom_err_badsize = "Invalid size"; | ||||
| static const char* rom_err_badread = "Couldn't read the entire file"; | static const char* rom_err_badread = "Couldn't read the entire file"; | ||||
| static const char* rom_err_badheader = "Invalid header"; | static const char* rom_err_badheader = "Invalid header"; | ||||
| static const char* rom_err_sms = "Master System ROMs are not supported"; | |||||
| /* Structs */ | /* Structs */ | ||||