Remove non-//e code paths

This commit is contained in:
Aaron Culliney 2014-04-05 12:22:12 -07:00
parent 9a5a5ce476
commit a43d31a22e
7 changed files with 148 additions and 446 deletions

View File

@ -600,7 +600,7 @@ E(video_redraw)
andl $~(SS_TEXTWRT|SS_HGRWRT|SS_RAMWRT),SN(softswitches)
xorl %eax, %eax
xorl %edi, %edi
xorl EffectiveAddr_E, EffectiveAddr_E
/* 24 rows text/lores page 0 */
movl $23, %ebx
@ -624,40 +624,6 @@ E(video_redraw)
/******************************************/
E(video__write_text0)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $SS_TEXT, SN(softswitches) # Text mode?
jnz plot_character0
testl $SS_HIRES, SN(softswitches) # lores mode?
jz plot_block0
ret
E(video__write_text0_mixed)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $(SS_TEXT|SS_MIXED), SN(softswitches)
# Text or mixed mode?
jnz plot_character0
testl $SS_HIRES, SN(softswitches) # Not hires mode?
jz plot_block0
ret
E(video__write_text1)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $SS_TEXT, SN(softswitches)
jnz plot_character1
testl $SS_HIRES, SN(softswitches) # lores mode?
jz plot_block1
ret
E(video__write_text1_mixed)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $(SS_TEXT|SS_MIXED), SN(softswitches)
# Text or mixed mode?
jnz plot_character1
testl $SS_HIRES, SN(softswitches) # Not hires mode?
jz plot_block1
ret
/* video__write_2e_text0 - handle text page //e specific */
E(video__write_2e_text0)
addl SN(base_textwrt), EffectiveAddr_E
@ -726,38 +692,6 @@ iie_soft_write_text1_mixed:
jmp plot_character1 # 40 col text
E(video__write_even0)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $SS_TEXT, SN(softswitches) # Text mode?
jnz ram_nop
testl $SS_HIRES, SN(softswitches) # hires mode?
jnz plot_even_byte0
ret
E(video__write_even0_mixed)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $(SS_TEXT|SS_MIXED), SN(softswitches)
jnz ram_nop # Text/mixed mode?
testl $SS_HIRES, SN(softswitches) # hires mode?
jnz plot_even_byte0
ret
E(video__write_odd0)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $SS_TEXT, SN(softswitches) # Text mode?
jnz ram_nop
testl $SS_HIRES, SN(softswitches) # hires mode?
jnz plot_odd_byte0
ret
E(video__write_odd0_mixed)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $(SS_TEXT|SS_MIXED), SN(softswitches)
jnz ram_nop # Text/mixed mode?
testl $SS_HIRES, SN(softswitches) # hires mode?
jnz plot_odd_byte0
ret
/* video__write_2e_even0 - handle hires page //e specific */
E(video__write_2e_even0)
addl SN(base_hgrwrt), EffectiveAddr_E
@ -831,37 +765,6 @@ iie_soft_write_odd0_mixed:
jnz ram_nop # in auxram
jmp plot_odd_byte0 # plot hires
E(video__write_even1)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $SS_TEXT, SN(softswitches) # Text mode?
jnz ram_nop
testl $SS_HIRES, SN(softswitches) # hires mode?
jnz plot_even_byte1
ret
E(video__write_even1_mixed)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $SS_TEXT|SS_MIXED, SN(softswitches)
jnz ram_nop # text/mixed
testl $SS_HIRES, SN(softswitches) # hires mode?
jnz plot_even_byte1
ret
E(video__write_odd1)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $SS_TEXT, SN(softswitches) # Text mode?
jnz ram_nop
testl $SS_HIRES, SN(softswitches) # hires mode?
jnz plot_odd_byte1
ret
E(video__write_odd1_mixed)
movb %al, SN(apple_ii_64k)(,EffectiveAddr_E,1)
testl $(SS_TEXT|SS_MIXED), SN(softswitches)
jnz ram_nop # text/mixed
testl $SS_HIRES, SN(softswitches) # hires mode?
jnz plot_odd_byte1
ret
/* video__write_2e_even1 - write hires page1 //e specific */
E(video__write_2e_even1)

View File

@ -70,7 +70,7 @@ E(func) pushl %eax; \
popl %edx; \
popl %ecx; \
popl %eax; \
ret; \
ret;
// TODO FIXME : implement CDECL prologue/epilogues...
#define GLUE_C_READ(func) \

View File

@ -186,32 +186,6 @@ E(read_speaker_toggle_pc)
#endif
ret
E(read_switch_primary_page)
testl $SS_PAGE2, SN(softswitches)
jnz _read_switch_primary
ret
_read_switch_primary:
andl $~(SS_PAGE2|SS_SCREEN), SN(softswitches)
pushal
pushl $0
call SN(video_setpage)
addl $4, %esp
popal
ret
E(read_switch_secondary_page)
testl $SS_PAGE2, SN(softswitches)
jz _read_switch_secondary
ret
_read_switch_secondary:
orl $(SS_PAGE2|SS_SCREEN), SN(softswitches)
pushal
pushl $1
call SN(video_setpage)
addl $4, %esp
popal
ret
/* PAGE2 off. if 80STORE on then we use main text page1, and if HIRES
on we also use main hires page1, regardless of RAMRD and
RAMWRT. */
@ -297,20 +271,6 @@ E(read_switch_mixed)
call SN(video_redraw)
ret
E(read_switch_lores)
testl $SS_HIRES, SN(softswitches)
jz ram_nop
andl $~SS_HIRES, SN(softswitches)
call SN(video_redraw)
ret
E(read_switch_hires)
testl $SS_HIRES, SN(softswitches)
jnz ram_nop
orl $SS_HIRES, SN(softswitches)
call SN(video_redraw)
ret
/* HIRES off. use RAMRD/RAMWRT offsets for hires page 1. */
E(iie_hires_off)
testl $SS_HIRES, SN(softswitches) # already off?
@ -382,7 +342,7 @@ E(iie_c080)
* ][+ routine exits */
/* c080: read RAM; no write; use $D000 bank 2. */
E(lc_c080)
lc_c080:
orl $SS_LCRAM|SS_BANK2, SN(softswitches)
andl $~(SS_LCSEC|SS_LCWRT), SN(softswitches)
movl $SN(language_banks)-0xD000, SN(base_d000_rd)
@ -398,7 +358,7 @@ E(iie_c081)
* ][+ routine exits */
/* c081: read ROM; write RAM; use $D000 bank 2. */
E(lc_c081)
lc_c081:
testl $SS_LCSEC, SN(softswitches)
je lc_c081_exit
orl $SS_LCWRT, SN(softswitches)
@ -431,7 +391,7 @@ E(iie_c083)
* ][+ routine exits */
/* c083: read and write RAM; no write; use $D000 bank 2. */
E(lc_c083) testl $SS_LCSEC, SN(softswitches)
lc_c083: testl $SS_LCSEC, SN(softswitches)
je lc_c083_exit
orl $SS_LCWRT, SN(softswitches)
movl $SN(language_banks)-0xD000, SN(base_d000_wrt)
@ -449,7 +409,7 @@ E(iie_c088)
* ][+ routine exits */
/* c088: read RAM; no write; use $D000 bank 1. */
E(lc_c088)
lc_c088:
orl $(SS_LCRAM), SN(softswitches)
andl $~(SS_LCWRT|SS_LCSEC|SS_BANK2), SN(softswitches)
movl $SN(language_banks)-0xC000, SN(base_d000_rd)
@ -465,7 +425,7 @@ E(iie_c089)
* ][+ routine exits */
/* c089: read ROM; write RAM; use $D000 bank 1. */
E(lc_c089)
lc_c089:
testl $SS_LCSEC, SN(softswitches)
jz lc_c089_exit
orl $SS_LCWRT, SN(softswitches)
@ -496,7 +456,7 @@ E(iie_c08b)
* ][+ routine exits */
/* c08b: read and write RAM; use $D000 bank 1. */
E(lc_c08b)
lc_c08b:
testl $SS_LCSEC, SN(softswitches)
jz lc_c08b_exit
orl $SS_LCWRT, SN(softswitches)

View File

@ -16,11 +16,14 @@
#include "common.h"
#define TEXT_ROWS 24
#define BEGIN_MIX 20
#define TEXT_COLS 40
static uint8_t vga_mem_page_0[SCANWIDTH*SCANHEIGHT]; /* page0 framebuffer */
static uint8_t vga_mem_page_1[SCANWIDTH*SCANHEIGHT]; /* page1 framebuffer */
uint8_t video__wider_font[0x8000];
uint8_t video__font[0x4000];
/* --- Precalculated hi-res page offsets given addr --- */
@ -84,7 +87,7 @@ uint8_t video__odd_colors[2] = { COLOR_LIGHT_PURPLE, COLOR_LIGHT_BLUE };
uint8_t video__even_colors[2] = { COLOR_LIGHT_GREEN, COLOR_LIGHT_RED };
/* 40col/80col/lores/hires/dhires line offsets */
unsigned short video__line_offset[24] =
unsigned short video__line_offset[TEXT_ROWS] =
{ 0x000, 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x380,
0x028, 0x0A8, 0x128, 0x1A8, 0x228, 0x2A8, 0x328, 0x3A8,
0x050, 0x0D0, 0x150, 0x1D0, 0x250, 0x2D0, 0x350, 0x3D0 };
@ -498,7 +501,7 @@ static void c_initialize_row_col_tables(void)
video__screen_addresses[i] = -1;
}
for (y = 0; y < 24; y++)
for (y = 0; y < TEXT_ROWS; y++)
{
for (off = 0; off < 8; off++)
{
@ -518,81 +521,35 @@ static void c_initialize_tables_video(void) {
int x, y, i;
/* initialize text/lores & hires graphics */
for (y = 0; y < 24; y++) /* 24 rows */
for (y = 0; y < TEXT_ROWS; y++)
{
for (x = 0; x < 40; x++) /* 40 cols */
for (x = 0; x < TEXT_COLS; x++)
{
if (apple_mode == IIE_MODE)
{
/* //e mode: text/lores page 0 */
cpu65_vmem[ video__line_offset[ y ] + x + 0x400].w =
(y < 20) ? video__write_2e_text0 :
video__write_2e_text0_mixed;
}
else
{
/* ][+ modes: text/lores page 0 */
cpu65_vmem[ video__line_offset[ y ] + x + 0x400].w =
(y < 20) ? video__write_text0 :
video__write_text0_mixed;
}
/* //e mode: text/lores page 0 */
cpu65_vmem[ video__line_offset[ y ] + x + 0x400].w =
(y < 20) ? video__write_2e_text0 :
video__write_2e_text0_mixed;
if (apple_mode == IIE_MODE)
{
cpu65_vmem[ video__line_offset[ y ] + x + 0x800].w =
(y < 20) ? video__write_2e_text1 :
video__write_2e_text1_mixed;
}
else
{
/* ][+ modes: text/lores page 1 in main memory */
cpu65_vmem[ video__line_offset[ y ] + x + 0x800].w =
(y < 20) ? video__write_text1 :
video__write_text1_mixed;
}
cpu65_vmem[ video__line_offset[ y ] + x + 0x800].w =
(y < 20) ? video__write_2e_text1 :
video__write_2e_text1_mixed;
for (i = 0; i < 8; i++)
{
/* //e mode: hires/double hires page 0 */
if (apple_mode == IIE_MODE)
{
cpu65_vmem[ 0x2000 + video__line_offset[ y ]
+ 0x400 * i + x ].w =
(y < 20) ? ((x & 1) ? video__write_2e_odd0 :
video__write_2e_even0)
: ((x & 1) ? video__write_2e_odd0_mixed :
video__write_2e_even0_mixed);
}
/* ][+ modes: hires page 0 */
else
{
cpu65_vmem[ 0x2000 + video__line_offset[ y ]
+ 0x400 * i + x ].w =
(y < 20) ? ((x & 1) ? video__write_odd0 :
video__write_even0)
: ((x & 1) ? video__write_odd0_mixed :
video__write_even0_mixed);
}
cpu65_vmem[ 0x2000 + video__line_offset[ y ]
+ 0x400 * i + x ].w =
(y < 20) ? ((x & 1) ? video__write_2e_odd0 :
video__write_2e_even0)
: ((x & 1) ? video__write_2e_odd0_mixed :
video__write_2e_even0_mixed);
if (apple_mode == IIE_MODE)
{
cpu65_vmem[ 0x4000 + video__line_offset[ y ]
+ 0x400 * i + x ].w =
(y < 20) ? ((x & 1) ? video__write_2e_odd1 :
video__write_2e_even1)
: ((x & 1) ? video__write_2e_odd1_mixed :
video__write_2e_even1_mixed);
}
/* ][+ modes: hires page 1 */
else
{
cpu65_vmem[ 0x4000 + video__line_offset[ y ]
+ 0x400 * i + x ].w =
(y < 20) ? ((x & 1) ? video__write_odd1 :
video__write_even1)
: ((x & 1) ? video__write_odd1_mixed :
video__write_even1_mixed);
}
cpu65_vmem[ 0x4000 + video__line_offset[ y ]
+ 0x400 * i + x ].w =
(y < 20) ? ((x & 1) ? video__write_2e_odd1 :
video__write_2e_even1)
: ((x & 1) ? video__write_2e_odd1_mixed :
video__write_2e_even1_mixed);
}
}
}

View File

@ -26,8 +26,6 @@ static unsigned char apple_iie_rom[32768]; /* //e */
bool do_logging = true; // also controlled by NDEBUG
FILE *error_log = NULL;
GLUE_FIXED_READ(read_ram_default,apple_ii_64k)
GLUE_FIXED_WRITE(write_ram_default,apple_ii_64k)
GLUE_BANK_READ(read_ram_bank,base_d000_rd)
GLUE_BANK_MAYBEWRITE(write_ram_bank,base_d000_wrt)
GLUE_BANK_READ(read_ram_lc,base_e000_rd)
@ -50,7 +48,7 @@ GLUE_BANK_MAYBEREAD(iie_read_slot5,base_c5rom)
GLUE_BANK_READ(iie_read_slotx,base_cxrom)
int32_t softswitches;
uint32_t softswitches;
uint8_t *base_ramrd;
uint8_t *base_ramwrt;
@ -130,16 +128,8 @@ void c_initialize_tables() {
/* reset everything */
for (i = 0; i < 0x10000; i++)
{
if (apple_mode == IIE_MODE)
{
cpu65_vmem[i].r = iie_read_ram_default;
cpu65_vmem[i].w = iie_write_ram_default;
}
else
{
cpu65_vmem[i].r = read_ram_default;
cpu65_vmem[i].w = write_ram_default;
}
cpu65_vmem[i].r = iie_read_ram_default;
cpu65_vmem[i].w = iie_write_ram_default;
}
/* language card read/write area */
@ -166,15 +156,12 @@ void c_initialize_tables() {
/* done common initialization */
/* initialize zero-page, //e specific */
if (apple_mode == IIE_MODE)
for (i = 0; i < 0x200; i++)
{
for (i = 0; i < 0x200; i++)
{
cpu65_vmem[i].r =
iie_read_ram_zpage_and_stack;
cpu65_vmem[i].w =
iie_write_ram_zpage_and_stack;
}
cpu65_vmem[i].r =
iie_read_ram_zpage_and_stack;
cpu65_vmem[i].w =
iie_write_ram_zpage_and_stack;
}
/* initialize first text & hires page, which are specially bank switched
@ -231,61 +218,57 @@ void c_initialize_tables() {
read_keyboard_strobe;
}
if (apple_mode == IIE_MODE)
{
/* RDBNK2 switch */
cpu65_vmem[0xC011].r =
iie_check_bank;
/* RDBNK2 switch */
cpu65_vmem[0xC011].r =
iie_check_bank;
/* RDLCRAM switch */
cpu65_vmem[0xC012].r =
iie_check_lcram;
/* RDLCRAM switch */
cpu65_vmem[0xC012].r =
iie_check_lcram;
/* 80STORE switch */
cpu65_vmem[0xC000].w = iie_80store_off;
cpu65_vmem[0xC001].w = iie_80store_on;
cpu65_vmem[0xC018].r = iie_check_80store;
/* 80STORE switch */
cpu65_vmem[0xC000].w = iie_80store_off;
cpu65_vmem[0xC001].w = iie_80store_on;
cpu65_vmem[0xC018].r = iie_check_80store;
/* RAMRD switch */
cpu65_vmem[0xC002].w = iie_ramrd_main;
cpu65_vmem[0xC003].w = iie_ramrd_aux;
cpu65_vmem[0xC013].r = iie_check_ramrd;
/* RAMRD switch */
cpu65_vmem[0xC002].w = iie_ramrd_main;
cpu65_vmem[0xC003].w = iie_ramrd_aux;
cpu65_vmem[0xC013].r = iie_check_ramrd;
/* RAMWRT switch */
cpu65_vmem[0xC004].w = iie_ramwrt_main;
cpu65_vmem[0xC005].w = iie_ramwrt_aux;
cpu65_vmem[0xC014].r = iie_check_ramwrt;
/* RAMWRT switch */
cpu65_vmem[0xC004].w = iie_ramwrt_main;
cpu65_vmem[0xC005].w = iie_ramwrt_aux;
cpu65_vmem[0xC014].r = iie_check_ramwrt;
/* ALTZP switch */
cpu65_vmem[0xC008].w = iie_altzp_main;
cpu65_vmem[0xC009].w = iie_altzp_aux;
cpu65_vmem[0xC016].r = iie_check_altzp;
/* ALTZP switch */
cpu65_vmem[0xC008].w = iie_altzp_main;
cpu65_vmem[0xC009].w = iie_altzp_aux;
cpu65_vmem[0xC016].r = iie_check_altzp;
/* 80COL switch */
cpu65_vmem[0xC00C].w = iie_80col_off;
cpu65_vmem[0xC00D].w = iie_80col_on;
cpu65_vmem[0xC01F].r = iie_check_80col;
/* 80COL switch */
cpu65_vmem[0xC00C].w = iie_80col_off;
cpu65_vmem[0xC00D].w = iie_80col_on;
cpu65_vmem[0xC01F].r = iie_check_80col;
/* ALTCHAR switch */
cpu65_vmem[0xC00E].w = iie_altchar_off;
cpu65_vmem[0xC00F].w = iie_altchar_on;
cpu65_vmem[0xC01E].r = iie_check_altchar;
/* ALTCHAR switch */
cpu65_vmem[0xC00E].w = iie_altchar_off;
cpu65_vmem[0xC00F].w = iie_altchar_on;
cpu65_vmem[0xC01E].r = iie_check_altchar;
/* SLOTC3ROM switch */
cpu65_vmem[0xC00A].w = iie_c3rom_internal;
cpu65_vmem[0xC00B].w = iie_c3rom_peripheral;
cpu65_vmem[0xC017].r = iie_check_c3rom;
/* SLOTC3ROM switch */
cpu65_vmem[0xC00A].w = iie_c3rom_internal;
cpu65_vmem[0xC00B].w = iie_c3rom_peripheral;
cpu65_vmem[0xC017].r = iie_check_c3rom;
/* SLOTCXROM switch */
cpu65_vmem[0xC006].w = iie_cxrom_peripheral;
cpu65_vmem[0xC007].w = iie_cxrom_internal;
cpu65_vmem[0xC015].r = iie_check_cxrom;
/* SLOTCXROM switch */
cpu65_vmem[0xC006].w = iie_cxrom_peripheral;
cpu65_vmem[0xC007].w = iie_cxrom_internal;
cpu65_vmem[0xC015].r = iie_check_cxrom;
/* RDVBLBAR switch */
cpu65_vmem[0xC019].r =
iie_check_vbl;
}
/* RDVBLBAR switch */
cpu65_vmem[0xC019].r =
iie_check_vbl;
/* random number generator */
for (i = 0xC020; i < 0xC030; i++)
@ -303,11 +286,8 @@ void c_initialize_tables() {
cpu65_vmem[0xC051].w =
read_switch_text;
if (apple_mode == IIE_MODE)
{
cpu65_vmem[0xC01A].r =
iie_check_text;
}
cpu65_vmem[0xC01A].r =
iie_check_text;
/* MIXED switch */
cpu65_vmem[0xC052].r =
@ -317,67 +297,31 @@ void c_initialize_tables() {
cpu65_vmem[0xC053].w =
read_switch_mixed;
if (apple_mode == IIE_MODE)
{
cpu65_vmem[0xC01B].r =
iie_check_mixed;
}
cpu65_vmem[0xC01B].r =
iie_check_mixed;
/* PAGE2 switch */
if (apple_mode == IIE_MODE)
{
cpu65_vmem[0xC054].r =
cpu65_vmem[0xC054].w =
iie_page2_off;
}
else
{
cpu65_vmem[0xC054].r =
cpu65_vmem[0xC054].w =
read_switch_primary_page;
}
cpu65_vmem[0xC054].r =
cpu65_vmem[0xC054].w =
iie_page2_off;
if (apple_mode == IIE_MODE)
{
cpu65_vmem[0xC01C].r =
iie_check_page2;
}
cpu65_vmem[0xC01C].r =
iie_check_page2;
/* PAGE2 switch */
if (apple_mode == IIE_MODE)
{
cpu65_vmem[0xC055].r =
cpu65_vmem[0xC055].w =
iie_page2_on;
}
else
{
cpu65_vmem[0xC055].r =
cpu65_vmem[0xC055].w =
read_switch_secondary_page;
}
cpu65_vmem[0xC055].r =
cpu65_vmem[0xC055].w =
iie_page2_on;
/* HIRES switch */
if (apple_mode == IIE_MODE)
{
cpu65_vmem[0xC01D].r =
iie_check_hires;
cpu65_vmem[0xC056].r =
cpu65_vmem[0xC056].w =
iie_hires_off;
cpu65_vmem[0xC057].r =
cpu65_vmem[0xC057].w =
iie_hires_on;
}
else
{
cpu65_vmem[0xC056].r =
cpu65_vmem[0xC056].w =
read_switch_lores;
cpu65_vmem[0xC057].r =
cpu65_vmem[0xC057].w =
read_switch_hires;
}
cpu65_vmem[0xC01D].r =
iie_check_hires;
cpu65_vmem[0xC056].r =
cpu65_vmem[0xC056].w =
iie_hires_off;
cpu65_vmem[0xC057].r =
cpu65_vmem[0xC057].w =
iie_hires_on;
/* game I/O switches */
cpu65_vmem[0xC061].r =
@ -395,13 +339,10 @@ void c_initialize_tables() {
cpu65_vmem[0xC065].r =
cpu65_vmem[0xC06D].r =
read_gc1;
if (apple_mode == IIE_MODE)
{
cpu65_vmem[0xC066].r =
iie_read_gc2;
cpu65_vmem[0xC067].r =
iie_read_gc3;
}
cpu65_vmem[0xC066].r =
iie_read_gc2;
cpu65_vmem[0xC067].r =
iie_read_gc3;
for (i = 0xC070; i < 0xC080; i++)
{
@ -410,53 +351,42 @@ void c_initialize_tables() {
read_gc_strobe;
}
if (apple_mode == IIE_MODE)
{
/* IOUDIS switch & read_gc_strobe */
cpu65_vmem[0xC07E].w =
iie_ioudis_on;
cpu65_vmem[0xC07F].w =
iie_ioudis_off;
cpu65_vmem[0xC07E].r =
iie_check_ioudis;
cpu65_vmem[0xC07F].r =
iie_check_dhires;
/* IOUDIS switch & read_gc_strobe */
cpu65_vmem[0xC07E].w =
iie_ioudis_on;
cpu65_vmem[0xC07F].w =
iie_ioudis_off;
cpu65_vmem[0xC07E].r =
iie_check_ioudis;
cpu65_vmem[0xC07F].r =
iie_check_dhires;
/* DHIRES/Annunciator switches */
cpu65_vmem[0xC05E].w =
cpu65_vmem[0xC05E].r =
iie_dhires_on;
cpu65_vmem[0xC05F].w =
cpu65_vmem[0xC05F].r =
iie_dhires_off;
}
/* DHIRES/Annunciator switches */
cpu65_vmem[0xC05E].w =
cpu65_vmem[0xC05E].r =
iie_dhires_on;
cpu65_vmem[0xC05F].w =
cpu65_vmem[0xC05F].r =
iie_dhires_off;
/* language card softswitches */
cpu65_vmem[0xC080].r = cpu65_vmem[0xC080].w =
cpu65_vmem[0xC084].r = cpu65_vmem[0xC084].w =
(apple_mode == IIE_MODE) ? iie_c080 : lc_c080;
cpu65_vmem[0xC084].r = cpu65_vmem[0xC084].w = iie_c080;
cpu65_vmem[0xC081].r = cpu65_vmem[0xC081].w =
cpu65_vmem[0xC085].r = cpu65_vmem[0xC085].w =
(apple_mode == IIE_MODE) ? iie_c081 : lc_c081;
cpu65_vmem[0xC085].r = cpu65_vmem[0xC085].w = iie_c081;
cpu65_vmem[0xC082].r = cpu65_vmem[0xC082].w =
cpu65_vmem[0xC086].r = cpu65_vmem[0xC086].w =
lc_c082;
cpu65_vmem[0xC086].r = cpu65_vmem[0xC086].w = lc_c082;
cpu65_vmem[0xC083].r = cpu65_vmem[0xC083].w =
cpu65_vmem[0xC087].r = cpu65_vmem[0xC087].w =
(apple_mode == IIE_MODE) ? iie_c083 : lc_c083;
cpu65_vmem[0xC087].r = cpu65_vmem[0xC087].w = iie_c083;
cpu65_vmem[0xC088].r = cpu65_vmem[0xC088].w =
cpu65_vmem[0xC08C].r = cpu65_vmem[0xC08C].w =
(apple_mode == IIE_MODE) ? iie_c088 : lc_c088;
cpu65_vmem[0xC08C].r = cpu65_vmem[0xC08C].w = iie_c088;
cpu65_vmem[0xC089].r = cpu65_vmem[0xC089].w =
cpu65_vmem[0xC08D].r = cpu65_vmem[0xC08D].w =
(apple_mode == IIE_MODE) ? iie_c089 : lc_c089;
cpu65_vmem[0xC08D].r = cpu65_vmem[0xC08D].w = iie_c089;
cpu65_vmem[0xC08A].r = cpu65_vmem[0xC08A].w =
cpu65_vmem[0xC08E].r = cpu65_vmem[0xC08E].w =
lc_c08a;
cpu65_vmem[0xC08E].r = cpu65_vmem[0xC08E].w = lc_c08a;
cpu65_vmem[0xC08B].r = cpu65_vmem[0xC08B].w =
cpu65_vmem[0xC08F].r = cpu65_vmem[0xC08F].w =
(apple_mode == IIE_MODE) ? iie_c08b : lc_c08b;
cpu65_vmem[0xC08F].r = cpu65_vmem[0xC08F].w = iie_c08b;
/* slot i/o area */
for (i = 0xC100; i < 0xC300; i++)
@ -588,35 +518,23 @@ void c_initialize_apple_ii_memory()
language_card[0][i] = apple_ii_rom[i + 0x1000];
}
if (apple_mode == IIE_MODE)
/* load the rom from 0xC000, slot rom main, internal rom aux */
for (i = 0xC000; i < 0x10000; i++)
{
/* load the rom from 0xC000, slot rom main, internal rom aux */
for (i = 0xC000; i < 0x10000; i++)
{
apple_ii_64k[0][i] = apple_iie_rom[i - 0xC000];
apple_ii_64k[1][i] = apple_iie_rom[i - 0x8000];
}
for (i = 0; i < 0x1000; i++)
{
language_banks[0][i] = apple_iie_rom[i + 0x1000];
language_banks[1][i] = apple_iie_rom[i + 0x5000];
}
for (i = 0; i < 0x2000; i++)
{
language_card[0][i] = apple_iie_rom[i + 0x2000];
language_card[1][i] = apple_iie_rom[i + 0x6000];
}
apple_ii_64k[0][i] = apple_iie_rom[i - 0xC000];
apple_ii_64k[1][i] = apple_iie_rom[i - 0x8000];
}
else
/* softswitch memory HACK - why this? */
for (i = 0; i < 0x1000; i++)
{
for (i = 0xC100; i < 0xD000; i++)
{
apple_ii_64k[0][i] = i & 0xFF;
apple_ii_64k[1][i] = i & 0xFF;
}
language_banks[0][i] = apple_iie_rom[i + 0x1000];
language_banks[1][i] = apple_iie_rom[i + 0x5000];
}
for (i = 0; i < 0x2000; i++)
{
language_card[0][i] = apple_iie_rom[i + 0x2000];
language_card[1][i] = apple_iie_rom[i + 0x6000];
}
apple_ii_64k[0][0xC000] = 0x00;
@ -703,18 +621,7 @@ void reinitialize(void)
video_redraw();
if (apple_mode == IIE_MODE)
{
cpu65_set(CPU65_C02);
}
else if (apple_mode == IIU_MODE)
{
cpu65_set(CPU65_NMOS);
}
else
{
cpu65_set(CPU65_NMOS|CPU65_FAULT);
}
cpu65_set(CPU65_C02);
timing_initialize();

View File

@ -79,7 +79,7 @@ extern uint8_t *base_cxrom;
/* softswitches */
extern int32_t softswitches;
extern uint32_t softswitches;
#endif /* !__ASSEMBLER__ */
@ -138,23 +138,17 @@ void compact(void);
void ram_nop(),
write_ram_default(),
write_unmapped_softswitch(),
read_ram_default(),
read_random(),
read_unmapped_softswitch(),
read_keyboard(),
read_keyboard_strobe(),
read_speaker_toggle_pc(),
read_switch_primary_page(),
read_switch_secondary_page(),
read_switch_graphics(),
read_switch_text(),
read_switch_no_mixed(),
read_switch_mixed(),
read_switch_lores(),
read_switch_hires(),
read_button0(),
read_button1(),
@ -163,14 +157,8 @@ read_gc0(),
read_gc1(),
read_gc_strobe(),
lc_c080(),
lc_c081(),
lc_c082(),
lc_c083(),
lc_c088(),
lc_c089(),
lc_c08a(),
lc_c08b(),
write_ram_bank(),
read_ram_bank(),
write_ram_lc(),

View File

@ -194,19 +194,6 @@ extern uint8_t video__even_colors[2];
/* Hooks */
void video__write_text0(),
video__write_text0_mixed(),
video__write_text1(),
video__write_text1_mixed(),
video__write_even0(),
video__write_odd0(),
video__write_even0_mixed(),
video__write_odd0_mixed(),
video__write_even1(),
video__write_odd1(),
video__write_even1_mixed(),
video__write_odd1_mixed();
void video__write_2e_text0(),
video__write_2e_text0_mixed(),
video__write_2e_text1(),