@@ -4,6 +4,8 @@ crater | |||||
**crater** is an emulator for the [Sega Game Gear][game gear], with an included | **crater** is an emulator for the [Sega Game Gear][game gear], with an included | ||||
[Z80][z80] assembler/disassembler, written in C. | [Z80][z80] assembler/disassembler, written in C. | ||||
![Tails Adventure (1995)](/docs/tailsadventure.png?raw=true "Tails Adventure (1995)") | |||||
[game gear]: https://en.wikipedia.org/wiki/Sega_Game_Gear | [game gear]: https://en.wikipedia.org/wiki/Sega_Game_Gear | ||||
[z80]: https://en.wikipedia.org/wiki/Zilog_Z80 | [z80]: https://en.wikipedia.org/wiki/Zilog_Z80 | ||||
@@ -82,6 +84,23 @@ the input file, with the extension replaced with `.gg` for `-a` and `.asm` for | |||||
`-d`. By default, this will never overwrite the original filename; pass | `-d`. By default, this will never overwrite the original filename; pass | ||||
`--overwrite` (`-r`) to let crater do so. | `--overwrite` (`-r`) to let crater do so. | ||||
Status | |||||
------ | |||||
The emulator is almost fully functional, lacking only audio support, a few | |||||
uncommon CPU instructions, and some advanced graphics features. Most games are | |||||
playable with only minor bugs. Future goals include save states and a more | |||||
sophisticated debugging mode. | |||||
The assembler is complete. Future goals include more documentation, macros, and | |||||
additional directives. | |||||
The disassembler works, but can't differentiate between code and data yet, so | |||||
it's not very useful. | |||||
The testing infrasture is limited. The assembler has decent coverage, other | |||||
components minimal. | |||||
Credits | Credits | ||||
------- | ------- | ||||
@@ -0,0 +1,4 @@ | |||||
More detailed documentation isn't available yet. All your questions are | |||||
answered in the main README. | |||||
At the moment, this directory contains supporting content for said README. |
@@ -39,10 +39,11 @@ static void print_help(const char *arg1) | |||||
" to show more detailed logs, including an emulator trace\n" | " to show more detailed logs, including an emulator trace\n" | ||||
" -s, --scale <n> scale the game screen by an integer factor\n" | " -s, --scale <n> scale the game screen by an integer factor\n" | ||||
" (applies to windowed mode only; defaults to 4)\n" | " (applies to windowed mode only; defaults to 4)\n" | ||||
" -a, --assemble <in> [<out>] convert z80 assembly source code into a\n" | |||||
" binary file that can be run by crater\n" | |||||
" -d, --disassemble <in> [<out>] convert a binary file into z80 assembly\n" | |||||
" source code\n" | |||||
" -a, --assemble <in> [<out>]\n" | |||||
" convert z80 assembly source code into a binary file that\n" | |||||
" can be run by crater\n" | |||||
" -d, --disassemble <in> [<out>]\n" | |||||
" convert a binary file into z80 assembly source code\n" | |||||
" -r, --overwrite allow crater to write assembler output to the same\n" | " -r, --overwrite allow crater to write assembler output to the same\n" | ||||
" filename as the input\n", | " filename as the input\n", | ||||
arg1); | arg1); | ||||
@@ -42,7 +42,7 @@ static void setup_graphics(bool fullscreen, unsigned scale) | |||||
if (fullscreen) | if (fullscreen) | ||||
flags = SDL_WINDOW_FULLSCREEN_DESKTOP; | flags = SDL_WINDOW_FULLSCREEN_DESKTOP; | ||||
else | else | ||||
flags = SDL_WINDOW_BORDERLESS|SDL_WINDOW_RESIZABLE; | |||||
flags = SDL_WINDOW_RESIZABLE; | |||||
SDL_CreateWindowAndRenderer( | SDL_CreateWindowAndRenderer( | ||||
scale * GG_SCREEN_WIDTH, scale * GG_SCREEN_HEIGHT, | scale * GG_SCREEN_WIDTH, scale * GG_SCREEN_HEIGHT, | ||||
@@ -216,6 +216,8 @@ static void draw_background(VDP *vdp) | |||||
bool vflip = tile & 0x0400; | bool vflip = tile & 0x0400; | ||||
bool hflip = tile & 0x0200; | bool hflip = tile & 0x0200; | ||||
(void) priority; // TODO | |||||
uint8_t vshift = vflip ? (7 - src_row % 8) : (src_row % 8), hshift; | uint8_t vshift = vflip ? (7 - src_row % 8) : (src_row % 8), hshift; | ||||
uint8_t pixel, index; | uint8_t pixel, index; | ||||
int16_t dst_col; | int16_t dst_col; | ||||
@@ -275,7 +277,7 @@ static void draw_sprites(VDP *vdp) | |||||
pattern |= (vdp->v_counter - y) >> 3; | pattern |= (vdp->v_counter - y) >> 3; | ||||
vshift = (vdp->v_counter - y) % 8; | vshift = (vdp->v_counter - y) % 8; | ||||
} else { | } else { | ||||
FATAL("TODO: sprite doubling") | |||||
// TODO: sprite doubling | |||||
} | } | ||||
uint8_t pixel, index; | uint8_t pixel, index; | ||||