1 /* xscreensaver, Copyright (c) 1998-2003 Jamie Zawinski <jwz@jwz.org>
3 * Permission to use, copy, modify, distribute, and sell this software and its
4 * documentation for any purpose is hereby granted without fee, provided that
5 * the above copyright notice appear in all copies and that both that
6 * copyright notice and this permission notice appear in supporting
7 * documentation. No representations are made about the suitability of this
8 * software for any purpose. It is provided "as is" without express or
11 * Apple ][ CRT simulator, by Trevor Blackwell <tlb@tlb.org>
12 * with additional work by Jamie Zawinski <jwz@jwz.org>
15 #ifndef __XSCREENSAVER_APPLE_II__
16 #define __XSCREENSAVER_APPLE_II__
21 typedef struct apple2_state {
22 u_char hireslines[192][40];
23 u_char textlines[24][40];
37 typedef struct apple2_sim_s {
39 void *controller_data;
45 analogtv_reception reception;
48 char typing_buf[1024];
52 char printing_buf[1024];
58 XWindowAttributes xgwa;
61 struct timeval basetime_tv;
84 apple2(Display *dpy, Window window, int delay,
85 void (*)(apple2_sim_t *sim, int *stepno, double *next_actiontime));
88 void a2_poke(apple2_state_t *st, int addr, int val);
89 void a2_goto(apple2_state_t *st, int r, int c);
90 void a2_cls(apple2_state_t *st);
91 void a2_invalidate(apple2_state_t *st);
93 void a2_add_disk_item(apple2_state_t *st, char *name, u_char *data,
95 void a2_scroll(apple2_state_t *st);
96 void a2_printc(apple2_state_t *st, char c);
97 void a2_printc_noscroll(apple2_state_t *st, char c);
98 void a2_prints(apple2_state_t *st, char *s);
99 void a2_goto(apple2_state_t *st, int r, int c);
100 void a2_cls(apple2_state_t *st);
101 void a2_clear_hgr(apple2_state_t *st);
102 void a2_clear_gr(apple2_state_t *st);
103 void a2_invalidate(apple2_state_t *st);
104 void a2_poke(apple2_state_t *st, int addr, int val);
105 void a2_display_image_loading(apple2_state_t *st, unsigned char *image,
107 void a2_init_memory_active(apple2_sim_t *sim);
108 void a2_hplot(apple2_state_t *st, int hcolor, int x, int y);
109 void a2_hline(apple2_state_t *st, int hcolor, int x1, int y1, int x2, int y2);
110 void a2_plot(apple2_state_t *st, int color, int x, int y);
112 #endif /* __XSCREENSAVER_APPLE_II__ */