diff --git a/README.md b/README.md index f21dd76..c16f159 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ crater **crater** is an emulator for the [Sega Game Gear][game gear], with an included [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 [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 `--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 ------- diff --git a/docs/README b/docs/README new file mode 100644 index 0000000..87245f6 --- /dev/null +++ b/docs/README @@ -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. diff --git a/docs/tailsadventure.png b/docs/tailsadventure.png new file mode 100644 index 0000000..f851e30 Binary files /dev/null and b/docs/tailsadventure.png differ diff --git a/src/config.c b/src/config.c index 8cda225..eef8956 100644 --- a/src/config.c +++ b/src/config.c @@ -39,10 +39,11 @@ static void print_help(const char *arg1) " to show more detailed logs, including an emulator trace\n" " -s, --scale scale the game screen by an integer factor\n" " (applies to windowed mode only; defaults to 4)\n" -" -a, --assemble [] convert z80 assembly source code into a\n" -" binary file that can be run by crater\n" -" -d, --disassemble [] convert a binary file into z80 assembly\n" -" source code\n" +" -a, --assemble []\n" +" convert z80 assembly source code into a binary file that\n" +" can be run by crater\n" +" -d, --disassemble []\n" +" convert a binary file into z80 assembly source code\n" " -r, --overwrite allow crater to write assembler output to the same\n" " filename as the input\n", arg1); diff --git a/src/emulator.c b/src/emulator.c index 3f430d7..deff1d5 100644 --- a/src/emulator.c +++ b/src/emulator.c @@ -42,7 +42,7 @@ static void setup_graphics(bool fullscreen, unsigned scale) if (fullscreen) flags = SDL_WINDOW_FULLSCREEN_DESKTOP; else - flags = SDL_WINDOW_BORDERLESS|SDL_WINDOW_RESIZABLE; + flags = SDL_WINDOW_RESIZABLE; SDL_CreateWindowAndRenderer( scale * GG_SCREEN_WIDTH, scale * GG_SCREEN_HEIGHT, diff --git a/src/vdp.c b/src/vdp.c index a43afe6..32edfaa 100644 --- a/src/vdp.c +++ b/src/vdp.c @@ -216,6 +216,8 @@ static void draw_background(VDP *vdp) bool vflip = tile & 0x0400; bool hflip = tile & 0x0200; + (void) priority; // TODO + uint8_t vshift = vflip ? (7 - src_row % 8) : (src_row % 8), hshift; uint8_t pixel, index; int16_t dst_col; @@ -275,7 +277,7 @@ static void draw_sprites(VDP *vdp) pattern |= (vdp->v_counter - y) >> 3; vshift = (vdp->v_counter - y) % 8; } else { - FATAL("TODO: sprite doubling") + // TODO: sprite doubling } uint8_t pixel, index;