mirror of
https://github.com/trudnai/Steve2.git
synced 2024-06-14 00:29:29 +00:00
- Extend ROM array to 64K
- Place periphery ROM to ROM array, not RAM
This commit is contained in:
parent
1fffc736a0
commit
bbc9db908a
|
@ -67,7 +67,7 @@
|
|||
contextName = "closure #1 in ViewController.Update():ViewController.swift">
|
||||
<PersistentStrings>
|
||||
<PersistentString
|
||||
value = "MEMcfg.is_80STORE">
|
||||
value = "MEMcfg.txt_page_2">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "self.shadowTxt">
|
||||
|
@ -76,13 +76,21 @@
|
|||
value = "txt">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "MEMcfg.txt_page_2">
|
||||
value = "MEMcfg.is_80STORE">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "txtArr">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "BRK:6502_instr_misc.h">
|
||||
<PersistentStrings>
|
||||
<PersistentString
|
||||
value = "m6502.PC">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "m6502_Step:6502.c">
|
||||
<PersistentStrings>
|
||||
|
@ -98,6 +106,9 @@
|
|||
<PersistentString
|
||||
value = "m6502.A">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "m6502.PC">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "RAM">
|
||||
</PersistentString>
|
||||
|
@ -106,6 +117,32 @@
|
|||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "auxZeropageSelect:mmio.h">
|
||||
<PersistentStrings>
|
||||
<PersistentString
|
||||
value = "m6502">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "Apple2_64K_RAM">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "newMEMcfg.is_80STORE">
|
||||
</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>
|
||||
|
@ -144,6 +181,9 @@
|
|||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "softReset:6502.c">
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "spkr_switch:mmio.h">
|
||||
<PersistentStrings>
|
||||
|
@ -195,6 +235,23 @@
|
|||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "auxMemorySelect:mmio.h">
|
||||
<PersistentStrings>
|
||||
<PersistentString
|
||||
value = "Apple2_64K_RAM + 0x200">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "shadowLowMEM">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "currentLowMEM">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "Apple2_64K_MEM + 0x200">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "JMP:6502_instr_call_ret_jump.h">
|
||||
</ContextState>
|
||||
|
@ -227,20 +284,20 @@
|
|||
value = "clk_6502_per_frm_max">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "clkfrm">
|
||||
value = "spkr_sample_idx">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "(uint8_t)spkr_samples[451]">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "spkr_sample_idx">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "(uint8_t)spkr_samples[455]">
|
||||
value = "clkfrm">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "clk_6502_per_frm">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "(uint8_t)spkr_samples[455]">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
|
@ -448,6 +505,23 @@
|
|||
<ContextState
|
||||
contextName = "rel_addr:Apple2_mmio.h">
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "ViewController.setCPUClockSpeed(freq:):ViewController.swift">
|
||||
<PersistentStrings>
|
||||
<PersistentString
|
||||
value = "MHz_6502">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "mhz">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "fps">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "clk_6502_per_frm">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "ViewController.Reset(_:):ViewController.swift">
|
||||
<PersistentStrings>
|
||||
|
@ -467,23 +541,6 @@
|
|||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "ViewController.setCPUClockSpeed(freq:):ViewController.swift">
|
||||
<PersistentStrings>
|
||||
<PersistentString
|
||||
value = "MHz_6502">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "mhz">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "fps">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "clk_6502_per_frm">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "ioRead:Apple2_mmio.h">
|
||||
<PersistentStrings>
|
||||
|
@ -543,7 +600,7 @@
|
|||
contextName = "HiRes.draw(_:):HiRes.swift">
|
||||
<PersistentStrings>
|
||||
<PersistentString
|
||||
value = "ctx?.bitsPerComponent">
|
||||
value = "shadowScreen">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "ctx?.data">
|
||||
|
@ -551,6 +608,9 @@
|
|||
<PersistentString
|
||||
value = "ctx?.width">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "ctx?.bitmapInfo">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "ctx?.bytesPerRow">
|
||||
</PersistentString>
|
||||
|
@ -560,9 +620,6 @@
|
|||
<PersistentString
|
||||
value = "HiResLineAddrTbl">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "ctx?.bitmapInfo">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "(blockH7 | ( block & bitMask ))">
|
||||
</PersistentString>
|
||||
|
@ -570,13 +627,13 @@
|
|||
value = "HiRes.blockCols">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "shadowScreen">
|
||||
value = "ctx?.height">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "linAddr">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "ctx?.height">
|
||||
value = "ctx?.bitsPerComponent">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
|
@ -626,12 +683,18 @@
|
|||
<PersistentString
|
||||
value = "mouseLocation">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "m6502.PC">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "textLines">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "frameCounter">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "m6502.clkfrm">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
|
@ -640,18 +703,18 @@
|
|||
<PersistentString
|
||||
value = "m6502">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "Apple2_64K_AUX + 0x3600">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "m6502.PC">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "Apple2_64K_RAM + 0x3600">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "Apple2_64K_AUX + 0x3600">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "(void*)Apple2_64K_RAM">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "m6502.PC">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
|
@ -722,6 +785,20 @@
|
|||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "io_RAM_EXP:mmio.h">
|
||||
<PersistentStrings>
|
||||
<PersistentString
|
||||
value = "m6502.clktime + clkfrm">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "m6502.clktime + clkfrm - wram1_clk">
|
||||
</PersistentString>
|
||||
<PersistentString
|
||||
value = "wram1_clk">
|
||||
</PersistentString>
|
||||
</PersistentStrings>
|
||||
</ContextState>
|
||||
<ContextState
|
||||
contextName = "memwrite8_bank2:mmio.h">
|
||||
<PersistentStrings>
|
||||
|
|
|
@ -72,6 +72,15 @@
|
|||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "32799F78264B1A5700255669"
|
||||
BuildableName = "Steve ][ Debug.app"
|
||||
BlueprintName = "Steve ][ Debug"
|
||||
ReferencedContainer = "container:A2Mac.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "32BFFB5622EACC630003B53F"
|
||||
|
@ -79,7 +88,7 @@
|
|||
BlueprintName = "Steve ]["
|
||||
ReferencedContainer = "container:A2Mac.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</MacroExpansion>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Debug"
|
||||
|
|
|
@ -29,6 +29,11 @@
|
|||
<key>orderHint</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
<key>Steve ][ copy.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>5</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
|
|
|
@ -685,13 +685,13 @@ 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);
|
||||
read_rom( bundlePath, filename, Apple2_64K_ROM + 0xC000, 0);
|
||||
memcpy(Apple2_64K_MEM + 0xC000, Apple2_64K_ROM + 0xC000, 16 * KB);
|
||||
}
|
||||
|
||||
else if ( flen == 12 * KB ) {
|
||||
read_rom( bundlePath, filename, Apple2_16K_ROM, 0x1000);
|
||||
memcpy(Apple2_64K_MEM + 0xD000, Apple2_16K_ROM + 0x1000, 12 * KB);
|
||||
read_rom( bundlePath, filename, Apple2_64K_ROM + 0xD000, 0x1000);
|
||||
memcpy(Apple2_64K_MEM + 0xD000, Apple2_64K_ROM + 0xD000, 12 * KB);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -749,8 +749,8 @@ void m6502_ColdReset( const char * bundlePath, const char * romFileName ) {
|
|||
rom_loadFile(bundlePath, romFileName);
|
||||
|
||||
// Disk ][ ROM in Slot 6
|
||||
read_rom( bundlePath, "DISK_II_C600.ROM", Apple2_64K_RAM, 0xC600);
|
||||
memcpy(Apple2_64K_MEM + 0xC600, Apple2_64K_RAM + 0xC600, 0x100);
|
||||
read_rom( bundlePath, "DISK_II_C600.ROM", Apple2_64K_ROM, 0xC600);
|
||||
memcpy(Apple2_64K_MEM + 0xC600, Apple2_64K_ROM + 0xC600, 0x100);
|
||||
|
||||
m6502.A = m6502.X = m6502.Y = 0xFF;
|
||||
// reset vector
|
||||
|
|
|
@ -211,6 +211,7 @@ extern void m6502_ColdReset( const char * bundlePath, const char * romFilePath )
|
|||
extern void m6502_Run(void);
|
||||
extern void kbdInput ( uint8_t code );
|
||||
extern void kbdUp (void);
|
||||
extern uint8_t getIO ( uint16_t ioaddr );
|
||||
extern void setIO ( uint16_t ioaddr, uint8_t val );
|
||||
|
||||
extern void interrupt_IRQ(void);
|
||||
|
|
|
@ -47,7 +47,7 @@ videoMode_t videoMode = { 1 }; // 40 col text, page 1
|
|||
uint8_t Apple2_Dummy_Page[ 1 * PG ]; // Dummy Page to discard data
|
||||
uint8_t Apple2_Dummy_RAM[ 64 * KB ]; // Dummy RAM to discard data
|
||||
|
||||
uint8_t Apple2_16K_ROM[ 16 * KB ] = {0}; // ROM C0, C8, D0, D8, E0, E8, F0, F8
|
||||
uint8_t Apple2_64K_ROM[ 64 * KB ] = {0}; // ROM C0, C8, D0, D8, E0, E8, F0, F8
|
||||
|
||||
uint8_t Apple2_64K_AUX[ 64 * KB ] = {0}; // 64K Expansion Memory
|
||||
uint8_t Apple2_64K_RAM[ 64 * KB ] = {0}; // Main Memory
|
||||
|
@ -404,7 +404,7 @@ void C3MemorySelect( MEMcfg_t newMEMcfg ) {
|
|||
}
|
||||
else {
|
||||
// load peripheral ROM to memory
|
||||
memcpy(Apple2_64K_MEM + 0xC300, Apple2_16K_ROM + 0x300, 0x100);
|
||||
memcpy(Apple2_64K_MEM + 0xC300, Apple2_64K_ROM + 0xC300, 0x100);
|
||||
}
|
||||
|
||||
MEMcfg = newMEMcfg;
|
||||
|
@ -415,7 +415,7 @@ void CxMemorySelect( MEMcfg_t newMEMcfg ) {
|
|||
|
||||
if ( newMEMcfg.int_Cx_ROM ) {
|
||||
// load internal ROM to memory
|
||||
memcpy(Apple2_64K_MEM + 0xC100, Apple2_16K_ROM + 0x100, 0xF00);
|
||||
memcpy(Apple2_64K_MEM + 0xC100, Apple2_64K_ROM + 0xC100, 0xF00);
|
||||
}
|
||||
else {
|
||||
// load peripheral ROM to memory
|
||||
|
@ -439,6 +439,9 @@ void resetMemory() {
|
|||
|
||||
auxMemorySelect(MEMcfg);
|
||||
CxMemorySelect(MEMcfg);
|
||||
|
||||
// initializing disk controller
|
||||
memcpy(Apple2_64K_MEM + 0xC600, Apple2_64K_ROM + 0xC600, 0x100);
|
||||
|
||||
MEMcfg = newMEMcfg;
|
||||
|
||||
|
@ -563,7 +566,7 @@ INLINE void io_RAM_EXP( uint16_t addr ) {
|
|||
MEMcfg.RD_INT_RAM = 0;
|
||||
|
||||
// load the content of ROM Memory
|
||||
memcpy(Apple2_64K_MEM + 0xD000, Apple2_16K_ROM + 0x1000, 0x3000);
|
||||
memcpy(Apple2_64K_MEM + 0xD000, Apple2_64K_ROM + 0xD000, 0x3000);
|
||||
|
||||
// set the ROM to read on the upper memory area
|
||||
break;
|
||||
|
@ -885,6 +888,10 @@ INLINE uint8_t ioRead( uint16_t addr ) {
|
|||
}
|
||||
|
||||
// TODO:
|
||||
uint8_t getIO ( uint16_t ioaddr ) {
|
||||
return Apple2_64K_RAM[ioaddr];
|
||||
}
|
||||
|
||||
void setIO ( uint16_t ioaddr, uint8_t val ) {
|
||||
Apple2_64K_RAM[ioaddr] = val;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user