diff --git a/include/apple2.h b/include/apple2.h index 3804e03..e287b3d 100644 --- a/include/apple2.h +++ b/include/apple2.h @@ -6,12 +6,21 @@ #include "vm_screen.h" enum video_modes { + VIDEO_40COL_TEXT, VIDEO_LORES, VIDEO_HIRES, + VIDEO_80COL_TEXT, VIDEO_DOUBLE_LORES, VIDEO_DOUBLE_HIRES, }; +enum color_modes { + COLOR_GREEN, + COLOR_AMBER, + COLOR_GRAY, + COLOR_FULL, +}; + typedef struct { /* * The apple 2 hardware used an MOS-6502 processor. @@ -37,6 +46,14 @@ typedef struct { */ int video_mode; + /* + * This is the color mode we want to emulate. You can have a few + * different styles of monochromatic displays: green, amber, and + * light gray on black; you can also emulate a full color display, + * in which text mode tends to look like light gray. + */ + int color_mode; + /* * Our two disk drives. */ diff --git a/src/apple2.c b/src/apple2.c index 2289b5f..d99cb54 100644 --- a/src/apple2.c +++ b/src/apple2.c @@ -58,12 +58,24 @@ apple2_create(int width, int height) return NULL; } + // Default to full color + apple2_set_color(mach, COLOR_FULL); + // We default to lo-res mode. apple2_set_video(mach, VIDEO_LORES); return mach; } +void +apple2_set_color(apple2 *mach, int mode) +{ + mach->color_mode = mode; + + // FIXME: doing this should force us to redraw everything in the + // correct color interpretation +} + void apple2_run_loop(apple2 *mach) {