mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-10 23:29:43 +00:00
Remove non-"640x400" display mode
This commit is contained in:
parent
fe68032b0d
commit
558ec8f1d5
@ -200,7 +200,6 @@ dnl ---------------------------------------------------------------------------
|
||||
dnl Misc ...
|
||||
|
||||
AC_DEFINE(APPLE2IX, 1, [Denotes a section of code as Apple//ix sourced, used with external sources])
|
||||
AC_DEFINE(_640x400, 1, [Screen dimensions ... this should be evenutally deprecated when we support dynamic resolutions])
|
||||
AC_DEFINE(KEYPAD_JOYSTICK, 1, [Joystick emulated on keyboard ... should not be true on mobile devices])
|
||||
|
||||
dnl Joystick device
|
||||
|
@ -27,12 +27,8 @@
|
||||
routines.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef _640x400
|
||||
#define Font SN(video__wider_font)
|
||||
#define Font80 SN(video__font)
|
||||
#else /* !_640x400 */
|
||||
#define Font SN(video__font)
|
||||
#endif /* !_640x400 */
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
* Plot exatly 7 pixels from FROM to TO.
|
||||
@ -51,8 +47,6 @@
|
||||
movb %cl, (TO);
|
||||
|
||||
|
||||
#ifdef _640x400
|
||||
|
||||
#define LoadHiresTableRef(TABLE)\
|
||||
leal SN(video__wider_hires_##TABLE), %ebx;\
|
||||
shll $4, %eax;/* *16 */\
|
||||
@ -209,82 +203,6 @@
|
||||
subl $4, %eax;\
|
||||
PlotDHiresByte
|
||||
|
||||
#else /* if ! _640x400 */
|
||||
|
||||
#define LoadHiresTableRef(TABLE)\
|
||||
leal SN(video__hires_##TABLE)(,%eax,8), %ebx;
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
* Plot a normal swath of pixels.
|
||||
* For 320x200 this is exactly 7 pixels.
|
||||
* ebx: from table
|
||||
* eax: to graphics memory
|
||||
* ------------------------------------------------------------------------- */
|
||||
#define PlotPixels\
|
||||
Plot7Pixels(%ebx,%eax)
|
||||
#define PlotCharacter40Row \
|
||||
Plot7Pixels(%esi,%eax)
|
||||
#define PlotBlockRow \
|
||||
movl %edx, (%eax); \
|
||||
addl $4, %eax; \
|
||||
movw %dx, (%eax); \
|
||||
addl $2, %eax; \
|
||||
movb %dl, (%eax);
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
* Plot a dynamically interpolated swath of pixels
|
||||
* For 320x200 this is exactly 9 pixels.
|
||||
* ebx: from table
|
||||
* eax: to graphics memory
|
||||
* ecx: scratch
|
||||
* ------------------------------------------------------------------------- */
|
||||
#define PlotPixelsExtra\
|
||||
decl %eax;\
|
||||
movl (%ebx), %ecx;\
|
||||
movl %ecx, (%eax);\
|
||||
addl $4, %eax;\
|
||||
addl $4, %ebx;\
|
||||
movl (%ebx), %ecx;\
|
||||
movl %ecx, (%eax);\
|
||||
addl $4, %eax;\
|
||||
addl $4, %ebx;\
|
||||
movb (%ebx), %cl;\
|
||||
movb %cl, (%eax);
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
* Get the adjancent color bytes in memory.
|
||||
* ebx: graphics memory index
|
||||
* eax: temp buffer for comparison
|
||||
* ------------------------------------------------------------------------- */
|
||||
#define GrabAdjGMBytes\
|
||||
subl $2, %ebx;\
|
||||
movw (%ebx), %cx;\
|
||||
movw %cx, (%eax); /* GM -> temp */\
|
||||
addl $9, %eax;\
|
||||
addl $9, %ebx;\
|
||||
movw (%ebx), %cx;\
|
||||
movw %cx, (%eax); /* GM -> temp */\
|
||||
decl %eax;
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
* Plots a normalized byte of dhires color directly into graphics memory.
|
||||
* eax: graphics memory index
|
||||
* ebx: dhires_colors index
|
||||
* edx: scratch
|
||||
* ------------------------------------------------------------------------- */
|
||||
#define PlotDHiresByte \
|
||||
movb SN(video__dhires1)(,%ebx,1), %dl; \
|
||||
movb SN(video__dhires2)(,%ebx,1), %dh; \
|
||||
movw %dx, (%eax); \
|
||||
addl $2, %eax;
|
||||
|
||||
#define PlotDHiresFirstByte\
|
||||
subl $2, %eax;\
|
||||
PlotDHiresByte
|
||||
|
||||
#endif/*_640x400*/
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------
|
||||
* Calculate the graphics memory offset based on EffectiveAddr.
|
||||
@ -1028,7 +946,6 @@ iie_plot_dhires1:
|
||||
ret
|
||||
|
||||
|
||||
#ifdef _640x400
|
||||
.align 4
|
||||
plot_80character0:
|
||||
pushl %ebx
|
||||
@ -1067,29 +984,13 @@ plot_80character1:
|
||||
popl %ebx
|
||||
ret
|
||||
|
||||
#else /* !640x400 resolution is not sufficient for 80 column */
|
||||
.align 4
|
||||
plot_80character0:
|
||||
andl $0xFFFF, EffectiveAddr_E/* for safety */
|
||||
ret
|
||||
|
||||
.align 4
|
||||
plot_80character1:
|
||||
andl $0xFFFF, EffectiveAddr_E/* for safety */
|
||||
ret
|
||||
#endif /* _640x400 */
|
||||
|
||||
|
||||
/* plot character on first text page */
|
||||
.align 4
|
||||
plot_character0:
|
||||
PlotTextPagePre($0x400,video__fb1,$0)
|
||||
plot_character_correct_page:
|
||||
#ifdef _640x400
|
||||
shll $7, %esi # * 128
|
||||
#else
|
||||
shll $6, %esi # * 64
|
||||
#endif
|
||||
addl $ Font, %esi # Font addr
|
||||
|
||||
PlotCharacter40Row
|
||||
|
@ -19,9 +19,7 @@
|
||||
static uint8_t vga_mem_page_0[SCANWIDTH*SCANHEIGHT]; /* page0 framebuffer */
|
||||
static uint8_t vga_mem_page_1[SCANWIDTH*SCANHEIGHT]; /* page1 framebuffer */
|
||||
|
||||
#ifdef _640x400
|
||||
uint8_t video__wider_font[0x8000];
|
||||
#endif /* _640x400 */
|
||||
|
||||
uint8_t video__font[0x4000];
|
||||
|
||||
@ -31,10 +29,8 @@ uint8_t video__columns[8192];
|
||||
|
||||
uint8_t *video__fb1,*video__fb2;
|
||||
|
||||
#ifdef _640x400
|
||||
uint8_t video__wider_hires_even[0x1000];
|
||||
uint8_t video__wider_hires_odd[0x1000];
|
||||
#endif
|
||||
uint8_t video__hires_even[0x800];
|
||||
uint8_t video__hires_odd[0x800];
|
||||
|
||||
@ -76,10 +72,8 @@ void video_loadfont(int first,
|
||||
{
|
||||
y = (x & 128) ? fg : bg;
|
||||
|
||||
#ifdef _640x400
|
||||
video__wider_font[(first << 7) + (i << 4) + (j << 1)] =
|
||||
video__wider_font[(first << 7) + (i << 4) + (j << 1) + 1] =
|
||||
#endif /* _640x400 */
|
||||
video__font[(first << 6) + (i << 3) + j] = y;
|
||||
x <<= 1;
|
||||
}
|
||||
@ -479,7 +473,6 @@ static void c_initialize_hires_values(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _640x400
|
||||
/* *2 for 640x400 */
|
||||
for (b=0, e=0; b<4096; b++, e++)
|
||||
{
|
||||
@ -489,8 +482,6 @@ static void c_initialize_hires_values(void)
|
||||
video__wider_hires_even[b] = video__hires_even[e];
|
||||
video__wider_hires_odd[b] = video__hires_odd[e];
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -513,13 +504,8 @@ static void c_initialize_row_col_tables(void)
|
||||
{
|
||||
for (x = 0; x < 40; x++)
|
||||
{
|
||||
#ifdef _640x400
|
||||
video__screen_addresses[video__line_offset[y] + 0x400*off + x ] =
|
||||
(y*16 + 2*off /* + 8*/) * SCANWIDTH + x*14 + 4;
|
||||
#else
|
||||
video__screen_addresses[video__line_offset[y] + 0x400*off + x ] =
|
||||
(y*8 + off + 4) * 320 + x*7 + 20;
|
||||
#endif
|
||||
video__columns[video__line_offset[y] + 0x400*off + x] =
|
||||
(uint8_t)x;
|
||||
}
|
||||
@ -658,14 +644,13 @@ void video_loadfont_int(int first, int quantity, const unsigned char *data)
|
||||
static void c_interface_print_char80_line(
|
||||
unsigned char **d, unsigned char **s)
|
||||
{
|
||||
#ifdef _640x400
|
||||
*((unsigned int *)(*d)) = *((unsigned int *)(*s)); /*32bits*/
|
||||
*d += 4, *s += 4;
|
||||
*((unsigned short *)(*d)) = *((unsigned short *)(*s)); /*16bits*/
|
||||
*d += 2, *s += 2;
|
||||
*((unsigned char *)(*d)) = *((unsigned char *)(*s)); /*8bits*/
|
||||
*d += SCANWIDTH-6, *s -= 6;
|
||||
#endif
|
||||
|
||||
*((unsigned int *)(*d)) = *((unsigned int *)(*s)); /*32bits*/
|
||||
*d += 4, *s += 4;
|
||||
*((unsigned short *)(*d)) = *((unsigned short *)(*s)); /*16bits*/
|
||||
@ -680,13 +665,8 @@ void video_plotchar( int x, int y, int scheme, unsigned char c )
|
||||
unsigned char *d;
|
||||
unsigned char *s;
|
||||
|
||||
#ifdef _640x400
|
||||
off = y * SCANWIDTH * 16 + x * 7 + 4;
|
||||
s = video__int_font[scheme] + c * 64;
|
||||
#else
|
||||
off = y * SCANWIDTH * 8 + x * 7 + /*WtF?*/1300;
|
||||
s = video__int_font[scheme] + c * 64;
|
||||
#endif
|
||||
d = video__fb1 + off;
|
||||
|
||||
c_interface_print_char80_line(&d,&s);
|
||||
|
@ -117,7 +117,6 @@ const uint8_t * const video_current_framebuffer();
|
||||
|
||||
/**** Private stuff follows *****/
|
||||
|
||||
#ifdef _640x400
|
||||
/* 640x400 mode really isn't what it advertises. It's really 560x384 with 4
|
||||
* extra bytes on each side for color interpolation hack. This is yet another
|
||||
* area where I've traded the optimization gain (especially on older slower
|
||||
@ -126,11 +125,6 @@ const uint8_t * const video_current_framebuffer();
|
||||
#define SCANWIDTH 568
|
||||
#define SCANHEIGHT 384
|
||||
#define SCANSTEP SCANWIDTH-12
|
||||
#else /* !_640x400 */
|
||||
#define SCANWIDTH 320
|
||||
#define SCANHEIGHT 200
|
||||
#define SCANSTEP SCANWIDTH-6
|
||||
#endif /* !_640x400 */
|
||||
|
||||
#define COLOR_BLACK 0
|
||||
|
||||
@ -178,10 +172,8 @@ const uint8_t * const video_current_framebuffer();
|
||||
|
||||
extern uint8_t *video__fb1,*video__fb2;
|
||||
|
||||
#ifdef _640x400
|
||||
extern uint8_t video__wider_hires_even[0x1000];
|
||||
extern uint8_t video__wider_hires_odd[0x1000];
|
||||
#endif /* _640x400 */
|
||||
|
||||
extern uint8_t video__hires_even[0x800];
|
||||
extern uint8_t video__hires_odd[0x800];
|
||||
|
Loading…
x
Reference in New Issue
Block a user