Skip to content

Commit

Permalink
Modified Apple1 project for use with PropellerIDE
Browse files Browse the repository at this point in the history
PropellerIDE (really BSTC and OpenSpin) apparently look for included Spin files (OBJ section) in the library before looking in the current directory, which caused a problem with "clock.spin" because a module with that name also exists in the library. I renamed the module to work around the problem.

Also, PropellerIDE generates files with .binary extensions which I added to .gitignore.

Also updated copyright year of the Apple1.spin module and added a patch to make the degree symbol go away. The degree symbol is shown when Woz mon tries to set the direction register of the PIA, but in our emulation, there is no such register and it doesn't need to be set. So the patch redirects the STY instruction from $D012 to $D013 which has no effect.
  • Loading branch information
jacgoudsmit committed Mar 20, 2018
1 parent 3c53890 commit 35bca28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
*.bak
*.binary
7 changes: 4 additions & 3 deletions Software/Apple1/Apple1.spin
@@ -1,6 +1,6 @@
''***************************************************************************
''* L-STAR, Apple-1 replica with minimal hardware
''* Copyright (C) 2014 Jac Goudsmit
''* Copyright (C) 2014-2018 Jac Goudsmit
''*
''* Some of the code in this project was based on the following projects,
''* all under MIT license unless otherwise mentioned:
Expand Down Expand Up @@ -51,7 +51,7 @@ CON

OBJ
hw: "Hardware" ' Constants for hardware
clock: "Clock" ' Clock generator
clock: "Clockgen" ' Clock generator
term: "SerKbd1TV" ' Serial/Keyboard/TV terminal
mem: "Memory" ' ROM/RAM emulator
pia: "A1PIA" ' PIA hardware emulator
Expand All @@ -63,14 +63,15 @@ PUB main | i

' Init serial, keyboard and TV
term.Start(hw#pin_RX, hw#pin_TX, hw#pin_KBDATA, hw#pin_KBCLK, hw#pin_TV, BAUDRATE)
term.str(string("L-STAR (C) 2014 JAC GOUDSMIT",13,13,"HUB RAM BYTES: "))
term.str(string("L-STAR (C) 2014-2018 JAC GOUDSMIT",13,13,"HUB RAM BYTES: "))
term.dec(RAM_SIZE)
term.str(string(13,"SIM.ROM BYTES: "))
term.dec(@RomEndRamStart-@RomFile)
term.str(string(13,13))

' Patch the ROM
Patch($F009,$3C) ' Krusader assumes 32K RAM, this changes a table location from 7C00 to 3C00
Patch($FF05,$13) ' Redirect STY $D012 to $D013 to prevent degree-symbol on terminal
Patch($FF2E,$08) ' Let Woz monitor use backspace instead of _ for correction

' Initialize the clock before starting any cogs that wait for it
Expand Down
File renamed without changes.

0 comments on commit 35bca28

Please sign in to comment.