mirror of
https://github.com/RyuKojiro/apple1.git
synced 2024-06-10 11:29:32 +00:00
Automatically load BASIC into memory, if available
git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@78 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
parent
0b697efa40
commit
87c8a20489
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "pia.h"
|
||||
|
||||
#define BASIC_LOAD_ADDRESS 0xE000
|
||||
#define ROM_START 0xF000
|
||||
#define ROM_SIZE 0x00FF
|
||||
#define RESET_VECTOR 0xFF00
|
||||
|
@ -110,6 +111,14 @@ int main(int argc, const char * argv[])
|
|||
fclose(file);
|
||||
}
|
||||
|
||||
// Load integer BASIC
|
||||
file = fopen("apple1basic.bin", "r");
|
||||
if (file) {
|
||||
fclose(file);
|
||||
printf("Loading BASIC tape at 0x%4x...\n", BASIC_LOAD_ADDRESS);
|
||||
v6502_loadFileAtAddress(cpu->memory, "apple1basic.bin", BASIC_LOAD_ADDRESS);
|
||||
}
|
||||
|
||||
// Attach PIA
|
||||
printf("Initializing PIA...\n");
|
||||
pia = pia_create(cpu);
|
||||
|
|
Loading…
Reference in New Issue
Block a user