- Fixed GR not cleared when Powered Off

- Fixed Video Mode did not go back to Text when Reset pressed
- Fixed some Memory Handling issues
- Internal Cx ROM being copied to RAM to eliminate some problems
This commit is contained in:
tudnai 2020-08-04 00:20:55 -07:00
parent 9741a49b80
commit 0beecc2d36
4 changed files with 40 additions and 5 deletions

View File

@ -114,6 +114,32 @@
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "auxZeropageSelect:mmio.h">
<PersistentStrings>
<PersistentString
value = "m6502">
</PersistentString>
<PersistentString
value = "newMEMcfg.is_80STORE">
</PersistentString>
<PersistentString
value = "Apple2_64K_RAM">
</PersistentString>
<PersistentString
value = "newMEMcfg.ALT_ZP">
</PersistentString>
<PersistentString
value = "currentZeropage">
</PersistentString>
<PersistentString
value = "Apple2_64K_MEM">
</PersistentString>
<PersistentString
value = "Apple2_64K_AUX">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "addr_abs:mmio.h">
<PersistentStrings>

View File

@ -178,6 +178,7 @@ class ViewController: NSViewController {
// Animated Splash Screen fade out and (Text) Monitor fade in
hires.isHidden = true
lores.isHidden = true
// displayField.alphaValue = 0
// displayField.isHidden = false
textDisplayScroller.alphaValue = 0
@ -236,6 +237,7 @@ class ViewController: NSViewController {
// Animated Splash Screen fade out and (Text) Monitor fade in
hires.isHidden = true
lores.isHidden = true
textDisplayScroller.alphaValue = 0
// textDisplayScroller.isHidden = false
splashScreen.alphaValue = 1

View File

@ -685,6 +685,7 @@ void rom_loadFile( const char * bundlePath, const char * filename ) {
else if ( flen == 16 * KB ) {
read_rom( bundlePath, filename, Apple2_16K_ROM, 0);
memcpy(Apple2_64K_MEM + 0xC000, Apple2_16K_ROM, 16 * KB);
memcpy(Apple2_64K_RAM + 0xC000, Apple2_16K_ROM, 0x1000);
}
else if ( flen == 12 * KB ) {

View File

@ -378,6 +378,9 @@ void resetMemory() {
WRLOMEM = Apple2_64K_MEM; // for Write $0200 - $BFFF (shadow memory)
WRD0MEM = Apple2_Dummy_RAM; // for writing $D000 - $DFFF
WRHIMEM = Apple2_Dummy_RAM; // for writing $E000 - $FFFF
videoMode.text = 1;
videoMode.col80 = 0;
}
@ -462,7 +465,7 @@ void auxZeropageSelect( MEMcfg_t newMEMcfg ) {
// save the content of Shadow Memory
memcpy( (void*) currentZeropage, shadowZeropage, 0x200);
if ( newMEMcfg.is_80STORE ) {
if ( ! newMEMcfg.is_80STORE ) {
if ( newMEMcfg.ALT_ZP ) {
currentZeropage = Apple2_64K_AUX;
}
@ -470,6 +473,9 @@ void auxZeropageSelect( MEMcfg_t newMEMcfg ) {
currentZeropage = Apple2_64K_RAM;
}
}
else {
currentZeropage = Apple2_64K_RAM;
}
WRZEROPG = (uint8_t*)shadowZeropage;
@ -484,11 +490,11 @@ void C3MemorySelect( MEMcfg_t newMEMcfg ) {
if ( newMEMcfg.slot_C3_ROM ) {
// load internal ROM to memory
memcpy(Apple2_64K_MEM + 0xC300, Apple2_16K_ROM + 0x300, 0x100);
memcpy(Apple2_64K_MEM + 0xC300, Apple2_64K_RAM + 0xC300, 0x100);
}
else {
// load peripheral ROM to memory
memcpy(Apple2_64K_MEM + 0xC300, Apple2_64K_RAM + 0xC300, 0x100);
memcpy(Apple2_64K_MEM + 0xC300, Apple2_16K_ROM + 0x300, 0x100);
}
@ -504,8 +510,8 @@ void CxMemorySelect( MEMcfg_t newMEMcfg ) {
}
else {
// load peripheral ROM to memory
// memcpy(Apple2_64K_MEM + 0xC100, Apple2_64K_RAM + 0xC100, 0xF00);
memcpy(Apple2_64K_MEM + 0xC600, Apple2_64K_RAM + 0xC600, 0x100);
memcpy(Apple2_64K_MEM + 0xC100, Apple2_64K_RAM + 0xC100, 0xF00);
// memcpy(Apple2_64K_MEM + 0xC600, Apple2_64K_RAM + 0xC600, 0x100);
}
C3MemorySelect( newMEMcfg );