2020-11-03 02:02:52 +00:00
# Apple2-IO-RPi
Apple II expansion card using a Raspberry Pi for I/O
2020-11-03 02:46:28 +00:00
2020-11-17 00:25:02 +00:00
![Image of Board ](/Hardware/Apple2IORPi.jpg )
2020-12-14 03:19:04 +00:00
## Purpose
Initial Pico hardware support
* Added assemble.cmd for Windows.
In the long run, some (c)make-based cross-plafrom solution seems preferable.
* Fill up the menu page just like the other pages.
* Allow to assemble for different hardware types.
The first script parameter is used to set the ca65 symbol HW_TYPE. Without parameter, HW_TYPE is set to 0.
* Avoid unwanted i/o access.
Depending on the 6502, LDA addr,X and/or STA addr,X produce additional phantom reads. In order to avoid those phantom reads to do i/o access, I used the "classic" approach of moving those reads from page $C0 to page $BF.
* Made use of BIT instruction to access InputFlags from firmware.
Doing the same for access from disk-based software would require selfmodifying code as there's not bit <addr>,x instruction.
* Removed push/pop from GetByte.
After the replacing the rol instructions with bit instructions with a recent chnage, the only reason left to save a to the stack was setting the OutputFlags. But that can be done using x.
* Added InputFlags check for consistency.
* Added support for an alternative hardware type.
The new hardware type has simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Added another comminucation interface implementation.
Use ACM CDC (or another proprietary) USB serial device for communication.
Currently VID / PID of a Raspberry Pi Pico SDK CDC UART are hardcoded - see https://github.com/raspberrypi/usb-pid
* Revert "Avoid unwanted i/o access."
Neither the original hardware type nor the alternative hardware type have any read and write i/o port share addresses. Therefore phantom reads aren't an issue with those hardware types.
This reverts commit ae5cb754fb9540794bdb5465a77e1263ca257539.
* Adapt to the different error signatures on Linux.
So far the code was only tested on Windows.
* Added implementation of the alternative hardware type.
The implemenation is based on a Raspberry Pi Pico - see https://github.com/a2retrosystems/A2retroNET
The new hardware type has a simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Modify the HD image for the alternative hardware type.
It is likely desirable to have two HD images for the two hardware types. And likely the apple2driver program should default to the right one based on its protocol setting. BUt given that the HD image(s) shouldn't be part of the actual Git repo anyhow, I don't do anything about this here and now.
* Fixed shell startup (?)
At least on the alternative hardware, this "blindly sending" a reset command causes the shell to be terminated right away:
The driver acknowldges the reset command with a zero byte - and that byte ends up being read by DumpOutput causing it to branch to endOutput.
Maybe that sending a reset command is beneficial on the original hardware. Then another .if is required. Or DumpOutput shouldn't quit on reading a zero byte - the shell handler doesn't seem to send it on purpose(?)
* Upate HD image with recent shell change.
* Fix shell shutdown (?)
At least on the alternative hardware, things happen this way:
1. The shell 'exit' command has ptyOut signal outputComplete and terminate. At this point, ptyIn is still blocked up to one second in ReadCharacter - and can therefore not react on outputComplete.
2. The outputComplete handler in ShellCommand sends a zero byte. This makes on the A2 DumpOutput return and the caller send a zero byte. ShellCommand must not return here as ptyIn is still blocked.
3. The zero byte from the A2 has ptyIn return from ReadCharacter, signal userCancelled and terminate.
4. ShellCommand can now return, but it must not send a zero byte, as the A2 is not expecting it - and will therefore later misinterpret it.
Maybe the original hardware needs another handling, then differentiation of behavior in shell.go becomes necessary.
* Moved boot text out of IIgs copyright message area.
Having the boot text start at the left border of the third line makes it look nice on the cold boot screen of all Apple II's - and there's where the user sees it for some time while waiting for the RPi to come up.
* Several adjustements:
- Get latest Go version as of now.
- Nowadays (?) GitHub 'git clone' seems to only work with a GitHub account. Therefore the zip download workaround. The becomes hopefully unnecessary soon with Go module magic.
- Use 'go mod tidy' to update .sum file for now.
- Error handling for an empty drive 2 is currently not exactly great, so download Total Replay for drive 2. Unfortunately there's no stable URL as of now.
- Use $USER and $HOME instead of hardcoded values.
- Removed deprecated syslog output directives.
* Added brief fork description.
* Added ProDOS-Utilities reference.
* Reverted back to using 'git clone'.
I've no idea why git acted up the other day :-( Now, everything is back to normal...
* Ignore Pico build directory.
* Updated from https://github.com/a2retrosystems/A2retroNET
* Updated from https://github.com/a2retrosystems/A2retroNET
At this point, nothing at all is done on an A2 reset. This can likely be improved. However, Apple2-IO-RPi doesn't seem to handle A2 reset exactly gracefully anyhow.
In general, it seems desirable to introduce some simple framing protocol - like SLIP - that allows to recover from an A2 reset in the middle of an Apple2-IO-RPi command execution.
Such a framing protocol would allow to introduce different frame types. One frame type could then be an A2 reset frame sent by the A2retroNET firmware.
* Make use of brand new stable Total Replay download URL.
Thanks to 4am :-)
* Fixed typos.
* Clone upstream ProDOS-Utilities.
My ProDOS-Utilities pull request was merged.
* Added support for boards without LED.
* Updated link.
* Adjusted to the current A2retroNET hardware.
* Removed support for the Pico W.
* Updated URL.
* Updated URL.
* Make use A2Pico library.
* Added link to A2Pico.
* Remove intermediates from repo.
* Build intermediates from Pico build.
* Have LED reflect status of logic ACM connection.
* Update upstream repo references.
* Adjust build instructions.
* Update README.md
* Fix build and update dependencies
* Fix binary comparison
* Fix firware bug on classic hardware
---------
Co-authored-by: Oliver Schmidt <ol.sc@web.de>
2024-02-06 03:49:09 +00:00
The purpose of this project is to provide I/O for an Apple II series 8 bit computer via a Raspberry Pi Zero 2 W which is powered by the Apple II expansion bus. This includes using the attached RPi Zero 2 W for it's storage, network and processor to provide new functionality for the Apple II.
2020-12-14 03:19:04 +00:00
2021-06-01 00:46:55 +00:00
## Features
2021-11-26 02:55:52 +00:00
1. Boot message which waits for RPi to be ready
2021-06-01 00:46:55 +00:00
2. ProDOS bootable drive from image stored on RPi
2022-02-06 13:13:03 +00:00
3. Linux bash shell to the RPi from the Apple II including some VT100 support via `-SHELL` from ProDOS
2023-01-09 03:50:22 +00:00
4. Load binary files directly from the RPi to the II (via dynamic virtual drive of current working directory on the RPi)
2022-02-06 13:13:03 +00:00
5. Update Apple II firmware in place from image on RPi (note, this is done per slot)
6. Supports two drive images at the same time
2022-02-07 11:11:01 +00:00
7. Supports "RPI" command from BASIC to execute Linux commands from the command prompt or inside BASIC programs: `10 PRINT CHR$(4);"RPI ls -al /"`
2021-06-01 00:46:55 +00:00
2022-01-13 23:55:04 +00:00
## Project Status
Initial Pico hardware support
* Added assemble.cmd for Windows.
In the long run, some (c)make-based cross-plafrom solution seems preferable.
* Fill up the menu page just like the other pages.
* Allow to assemble for different hardware types.
The first script parameter is used to set the ca65 symbol HW_TYPE. Without parameter, HW_TYPE is set to 0.
* Avoid unwanted i/o access.
Depending on the 6502, LDA addr,X and/or STA addr,X produce additional phantom reads. In order to avoid those phantom reads to do i/o access, I used the "classic" approach of moving those reads from page $C0 to page $BF.
* Made use of BIT instruction to access InputFlags from firmware.
Doing the same for access from disk-based software would require selfmodifying code as there's not bit <addr>,x instruction.
* Removed push/pop from GetByte.
After the replacing the rol instructions with bit instructions with a recent chnage, the only reason left to save a to the stack was setting the OutputFlags. But that can be done using x.
* Added InputFlags check for consistency.
* Added support for an alternative hardware type.
The new hardware type has simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Added another comminucation interface implementation.
Use ACM CDC (or another proprietary) USB serial device for communication.
Currently VID / PID of a Raspberry Pi Pico SDK CDC UART are hardcoded - see https://github.com/raspberrypi/usb-pid
* Revert "Avoid unwanted i/o access."
Neither the original hardware type nor the alternative hardware type have any read and write i/o port share addresses. Therefore phantom reads aren't an issue with those hardware types.
This reverts commit ae5cb754fb9540794bdb5465a77e1263ca257539.
* Adapt to the different error signatures on Linux.
So far the code was only tested on Windows.
* Added implementation of the alternative hardware type.
The implemenation is based on a Raspberry Pi Pico - see https://github.com/a2retrosystems/A2retroNET
The new hardware type has a simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Modify the HD image for the alternative hardware type.
It is likely desirable to have two HD images for the two hardware types. And likely the apple2driver program should default to the right one based on its protocol setting. BUt given that the HD image(s) shouldn't be part of the actual Git repo anyhow, I don't do anything about this here and now.
* Fixed shell startup (?)
At least on the alternative hardware, this "blindly sending" a reset command causes the shell to be terminated right away:
The driver acknowldges the reset command with a zero byte - and that byte ends up being read by DumpOutput causing it to branch to endOutput.
Maybe that sending a reset command is beneficial on the original hardware. Then another .if is required. Or DumpOutput shouldn't quit on reading a zero byte - the shell handler doesn't seem to send it on purpose(?)
* Upate HD image with recent shell change.
* Fix shell shutdown (?)
At least on the alternative hardware, things happen this way:
1. The shell 'exit' command has ptyOut signal outputComplete and terminate. At this point, ptyIn is still blocked up to one second in ReadCharacter - and can therefore not react on outputComplete.
2. The outputComplete handler in ShellCommand sends a zero byte. This makes on the A2 DumpOutput return and the caller send a zero byte. ShellCommand must not return here as ptyIn is still blocked.
3. The zero byte from the A2 has ptyIn return from ReadCharacter, signal userCancelled and terminate.
4. ShellCommand can now return, but it must not send a zero byte, as the A2 is not expecting it - and will therefore later misinterpret it.
Maybe the original hardware needs another handling, then differentiation of behavior in shell.go becomes necessary.
* Moved boot text out of IIgs copyright message area.
Having the boot text start at the left border of the third line makes it look nice on the cold boot screen of all Apple II's - and there's where the user sees it for some time while waiting for the RPi to come up.
* Several adjustements:
- Get latest Go version as of now.
- Nowadays (?) GitHub 'git clone' seems to only work with a GitHub account. Therefore the zip download workaround. The becomes hopefully unnecessary soon with Go module magic.
- Use 'go mod tidy' to update .sum file for now.
- Error handling for an empty drive 2 is currently not exactly great, so download Total Replay for drive 2. Unfortunately there's no stable URL as of now.
- Use $USER and $HOME instead of hardcoded values.
- Removed deprecated syslog output directives.
* Added brief fork description.
* Added ProDOS-Utilities reference.
* Reverted back to using 'git clone'.
I've no idea why git acted up the other day :-( Now, everything is back to normal...
* Ignore Pico build directory.
* Updated from https://github.com/a2retrosystems/A2retroNET
* Updated from https://github.com/a2retrosystems/A2retroNET
At this point, nothing at all is done on an A2 reset. This can likely be improved. However, Apple2-IO-RPi doesn't seem to handle A2 reset exactly gracefully anyhow.
In general, it seems desirable to introduce some simple framing protocol - like SLIP - that allows to recover from an A2 reset in the middle of an Apple2-IO-RPi command execution.
Such a framing protocol would allow to introduce different frame types. One frame type could then be an A2 reset frame sent by the A2retroNET firmware.
* Make use of brand new stable Total Replay download URL.
Thanks to 4am :-)
* Fixed typos.
* Clone upstream ProDOS-Utilities.
My ProDOS-Utilities pull request was merged.
* Added support for boards without LED.
* Updated link.
* Adjusted to the current A2retroNET hardware.
* Removed support for the Pico W.
* Updated URL.
* Updated URL.
* Make use A2Pico library.
* Added link to A2Pico.
* Remove intermediates from repo.
* Build intermediates from Pico build.
* Have LED reflect status of logic ACM connection.
* Update upstream repo references.
* Adjust build instructions.
* Update README.md
* Fix build and update dependencies
* Fix binary comparison
* Fix firware bug on classic hardware
---------
Co-authored-by: Oliver Schmidt <ol.sc@web.de>
2024-02-06 03:49:09 +00:00
### Classic Hardware
2024-06-25 02:17:50 +00:00
So far, this is still a project and not a finished product. The current prototype is on the seventh revision. I have sold about 60 boards including previous prototypes. There are several hundred in the wild between self made and ones purchased in places like eBay that were made by others. The seventh prototype is functionally equivalent to the sixth other than support for write-protect and reintroducing EPROM support. The fifth revision was similar and compatible with the sixth, other than a new jumper to select internal/external power on the sixth.
2022-02-18 01:12:41 +00:00
The card enables the Apple II to boot from and write to virtual hard drive images stored on the RPi in any slot (except slot 3), execute Linux commands from Applesoft BASIC and run a bash shell with VT100 emulation. The code has very few tests and is incomplete. Note that currently the firmware assumes an 80 column card is in slot 3 and than you have lowercase support. Most development has been done with an enhanced Apple //e with the card in slot 7. If you have other drive controllers earlier in the boot cycle, you can still boot from the Apple2-IO-RPi. For example, if the card was in slot 4, you could type `PR#4` from the BASIC prompt to boot the card. Note that the Raspberry Pi Zero W (and W 2) consume 170 - 250 mA and there is only 500 mA available to all expansion slots according to Apple. It is not recommended to have a lot of other cards in the system at the same time. With the sixth revision of the prototype, it is possible to remove the power jumper and run the RPi on an external USB power source. If configured for external power, note that the card's firmware will hang on boot without USB power on as the latch chips are powered by the 3.3V output of the RPi.
2022-12-31 17:40:27 +00:00
If you have a problem or idea for enhancement, log an issue [here ](https://github.com/tjboldt/Apple2-IO-RPi/issues ) or start a [discussion ](https://github.com/tjboldt/Apple2-IO-RPi/discussions/categories/general ). I recommend starring/watching the project for updates on GitHub. You are welcome to fork the project and submit pull requests which I will review. The latest version has an in-memory virtual drive representing current working directory in Linux for ease of copying files between Linux and ProDOS when the drive 1 is not specified as a file.
2022-01-13 23:55:04 +00:00
Initial Pico hardware support
* Added assemble.cmd for Windows.
In the long run, some (c)make-based cross-plafrom solution seems preferable.
* Fill up the menu page just like the other pages.
* Allow to assemble for different hardware types.
The first script parameter is used to set the ca65 symbol HW_TYPE. Without parameter, HW_TYPE is set to 0.
* Avoid unwanted i/o access.
Depending on the 6502, LDA addr,X and/or STA addr,X produce additional phantom reads. In order to avoid those phantom reads to do i/o access, I used the "classic" approach of moving those reads from page $C0 to page $BF.
* Made use of BIT instruction to access InputFlags from firmware.
Doing the same for access from disk-based software would require selfmodifying code as there's not bit <addr>,x instruction.
* Removed push/pop from GetByte.
After the replacing the rol instructions with bit instructions with a recent chnage, the only reason left to save a to the stack was setting the OutputFlags. But that can be done using x.
* Added InputFlags check for consistency.
* Added support for an alternative hardware type.
The new hardware type has simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Added another comminucation interface implementation.
Use ACM CDC (or another proprietary) USB serial device for communication.
Currently VID / PID of a Raspberry Pi Pico SDK CDC UART are hardcoded - see https://github.com/raspberrypi/usb-pid
* Revert "Avoid unwanted i/o access."
Neither the original hardware type nor the alternative hardware type have any read and write i/o port share addresses. Therefore phantom reads aren't an issue with those hardware types.
This reverts commit ae5cb754fb9540794bdb5465a77e1263ca257539.
* Adapt to the different error signatures on Linux.
So far the code was only tested on Windows.
* Added implementation of the alternative hardware type.
The implemenation is based on a Raspberry Pi Pico - see https://github.com/a2retrosystems/A2retroNET
The new hardware type has a simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Modify the HD image for the alternative hardware type.
It is likely desirable to have two HD images for the two hardware types. And likely the apple2driver program should default to the right one based on its protocol setting. BUt given that the HD image(s) shouldn't be part of the actual Git repo anyhow, I don't do anything about this here and now.
* Fixed shell startup (?)
At least on the alternative hardware, this "blindly sending" a reset command causes the shell to be terminated right away:
The driver acknowldges the reset command with a zero byte - and that byte ends up being read by DumpOutput causing it to branch to endOutput.
Maybe that sending a reset command is beneficial on the original hardware. Then another .if is required. Or DumpOutput shouldn't quit on reading a zero byte - the shell handler doesn't seem to send it on purpose(?)
* Upate HD image with recent shell change.
* Fix shell shutdown (?)
At least on the alternative hardware, things happen this way:
1. The shell 'exit' command has ptyOut signal outputComplete and terminate. At this point, ptyIn is still blocked up to one second in ReadCharacter - and can therefore not react on outputComplete.
2. The outputComplete handler in ShellCommand sends a zero byte. This makes on the A2 DumpOutput return and the caller send a zero byte. ShellCommand must not return here as ptyIn is still blocked.
3. The zero byte from the A2 has ptyIn return from ReadCharacter, signal userCancelled and terminate.
4. ShellCommand can now return, but it must not send a zero byte, as the A2 is not expecting it - and will therefore later misinterpret it.
Maybe the original hardware needs another handling, then differentiation of behavior in shell.go becomes necessary.
* Moved boot text out of IIgs copyright message area.
Having the boot text start at the left border of the third line makes it look nice on the cold boot screen of all Apple II's - and there's where the user sees it for some time while waiting for the RPi to come up.
* Several adjustements:
- Get latest Go version as of now.
- Nowadays (?) GitHub 'git clone' seems to only work with a GitHub account. Therefore the zip download workaround. The becomes hopefully unnecessary soon with Go module magic.
- Use 'go mod tidy' to update .sum file for now.
- Error handling for an empty drive 2 is currently not exactly great, so download Total Replay for drive 2. Unfortunately there's no stable URL as of now.
- Use $USER and $HOME instead of hardcoded values.
- Removed deprecated syslog output directives.
* Added brief fork description.
* Added ProDOS-Utilities reference.
* Reverted back to using 'git clone'.
I've no idea why git acted up the other day :-( Now, everything is back to normal...
* Ignore Pico build directory.
* Updated from https://github.com/a2retrosystems/A2retroNET
* Updated from https://github.com/a2retrosystems/A2retroNET
At this point, nothing at all is done on an A2 reset. This can likely be improved. However, Apple2-IO-RPi doesn't seem to handle A2 reset exactly gracefully anyhow.
In general, it seems desirable to introduce some simple framing protocol - like SLIP - that allows to recover from an A2 reset in the middle of an Apple2-IO-RPi command execution.
Such a framing protocol would allow to introduce different frame types. One frame type could then be an A2 reset frame sent by the A2retroNET firmware.
* Make use of brand new stable Total Replay download URL.
Thanks to 4am :-)
* Fixed typos.
* Clone upstream ProDOS-Utilities.
My ProDOS-Utilities pull request was merged.
* Added support for boards without LED.
* Updated link.
* Adjusted to the current A2retroNET hardware.
* Removed support for the Pico W.
* Updated URL.
* Updated URL.
* Make use A2Pico library.
* Added link to A2Pico.
* Remove intermediates from repo.
* Build intermediates from Pico build.
* Have LED reflect status of logic ACM connection.
* Update upstream repo references.
* Adjust build instructions.
* Update README.md
* Fix build and update dependencies
* Fix binary comparison
* Fix firware bug on classic hardware
---------
Co-authored-by: Oliver Schmidt <ol.sc@web.de>
2024-02-06 03:49:09 +00:00
### Pico Hardware
Ralle Palaveev has a version of the hardware that uses a RPi Pico to handle firmware and communications to the host over USB. This uses Oliver Schmidt's PIO code.
2020-12-14 03:19:04 +00:00
## Roadmap
2023-01-28 15:23:27 +00:00
See [List of issues tagged roadmap ](https://github.com/tjboldt/Apple2-IO-RPi/issues?q=is%3Aissue+is%3Aopen+label%3Aroadmap+author%3Atjboldt )
2020-11-03 02:46:28 +00:00
Initial Pico hardware support
* Added assemble.cmd for Windows.
In the long run, some (c)make-based cross-plafrom solution seems preferable.
* Fill up the menu page just like the other pages.
* Allow to assemble for different hardware types.
The first script parameter is used to set the ca65 symbol HW_TYPE. Without parameter, HW_TYPE is set to 0.
* Avoid unwanted i/o access.
Depending on the 6502, LDA addr,X and/or STA addr,X produce additional phantom reads. In order to avoid those phantom reads to do i/o access, I used the "classic" approach of moving those reads from page $C0 to page $BF.
* Made use of BIT instruction to access InputFlags from firmware.
Doing the same for access from disk-based software would require selfmodifying code as there's not bit <addr>,x instruction.
* Removed push/pop from GetByte.
After the replacing the rol instructions with bit instructions with a recent chnage, the only reason left to save a to the stack was setting the OutputFlags. But that can be done using x.
* Added InputFlags check for consistency.
* Added support for an alternative hardware type.
The new hardware type has simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Added another comminucation interface implementation.
Use ACM CDC (or another proprietary) USB serial device for communication.
Currently VID / PID of a Raspberry Pi Pico SDK CDC UART are hardcoded - see https://github.com/raspberrypi/usb-pid
* Revert "Avoid unwanted i/o access."
Neither the original hardware type nor the alternative hardware type have any read and write i/o port share addresses. Therefore phantom reads aren't an issue with those hardware types.
This reverts commit ae5cb754fb9540794bdb5465a77e1263ca257539.
* Adapt to the different error signatures on Linux.
So far the code was only tested on Windows.
* Added implementation of the alternative hardware type.
The implemenation is based on a Raspberry Pi Pico - see https://github.com/a2retrosystems/A2retroNET
The new hardware type has a simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Modify the HD image for the alternative hardware type.
It is likely desirable to have two HD images for the two hardware types. And likely the apple2driver program should default to the right one based on its protocol setting. BUt given that the HD image(s) shouldn't be part of the actual Git repo anyhow, I don't do anything about this here and now.
* Fixed shell startup (?)
At least on the alternative hardware, this "blindly sending" a reset command causes the shell to be terminated right away:
The driver acknowldges the reset command with a zero byte - and that byte ends up being read by DumpOutput causing it to branch to endOutput.
Maybe that sending a reset command is beneficial on the original hardware. Then another .if is required. Or DumpOutput shouldn't quit on reading a zero byte - the shell handler doesn't seem to send it on purpose(?)
* Upate HD image with recent shell change.
* Fix shell shutdown (?)
At least on the alternative hardware, things happen this way:
1. The shell 'exit' command has ptyOut signal outputComplete and terminate. At this point, ptyIn is still blocked up to one second in ReadCharacter - and can therefore not react on outputComplete.
2. The outputComplete handler in ShellCommand sends a zero byte. This makes on the A2 DumpOutput return and the caller send a zero byte. ShellCommand must not return here as ptyIn is still blocked.
3. The zero byte from the A2 has ptyIn return from ReadCharacter, signal userCancelled and terminate.
4. ShellCommand can now return, but it must not send a zero byte, as the A2 is not expecting it - and will therefore later misinterpret it.
Maybe the original hardware needs another handling, then differentiation of behavior in shell.go becomes necessary.
* Moved boot text out of IIgs copyright message area.
Having the boot text start at the left border of the third line makes it look nice on the cold boot screen of all Apple II's - and there's where the user sees it for some time while waiting for the RPi to come up.
* Several adjustements:
- Get latest Go version as of now.
- Nowadays (?) GitHub 'git clone' seems to only work with a GitHub account. Therefore the zip download workaround. The becomes hopefully unnecessary soon with Go module magic.
- Use 'go mod tidy' to update .sum file for now.
- Error handling for an empty drive 2 is currently not exactly great, so download Total Replay for drive 2. Unfortunately there's no stable URL as of now.
- Use $USER and $HOME instead of hardcoded values.
- Removed deprecated syslog output directives.
* Added brief fork description.
* Added ProDOS-Utilities reference.
* Reverted back to using 'git clone'.
I've no idea why git acted up the other day :-( Now, everything is back to normal...
* Ignore Pico build directory.
* Updated from https://github.com/a2retrosystems/A2retroNET
* Updated from https://github.com/a2retrosystems/A2retroNET
At this point, nothing at all is done on an A2 reset. This can likely be improved. However, Apple2-IO-RPi doesn't seem to handle A2 reset exactly gracefully anyhow.
In general, it seems desirable to introduce some simple framing protocol - like SLIP - that allows to recover from an A2 reset in the middle of an Apple2-IO-RPi command execution.
Such a framing protocol would allow to introduce different frame types. One frame type could then be an A2 reset frame sent by the A2retroNET firmware.
* Make use of brand new stable Total Replay download URL.
Thanks to 4am :-)
* Fixed typos.
* Clone upstream ProDOS-Utilities.
My ProDOS-Utilities pull request was merged.
* Added support for boards without LED.
* Updated link.
* Adjusted to the current A2retroNET hardware.
* Removed support for the Pico W.
* Updated URL.
* Updated URL.
* Make use A2Pico library.
* Added link to A2Pico.
* Remove intermediates from repo.
* Build intermediates from Pico build.
* Have LED reflect status of logic ACM connection.
* Update upstream repo references.
* Adjust build instructions.
* Update README.md
* Fix build and update dependencies
* Fix binary comparison
* Fix firware bug on classic hardware
---------
Co-authored-by: Oliver Schmidt <ol.sc@web.de>
2024-02-06 03:49:09 +00:00
## Setup on classic hardware
2024-03-29 15:46:32 +00:00
[Setup card from scratch ](/ClassicSetup.md )
2021-07-22 12:56:19 +00:00
2022-01-13 23:55:04 +00:00
[Update to latest ](https://github.com/tjboldt/Apple2-IO-RPi/discussions/65 )
2021-10-11 12:47:35 +00:00
Initial Pico hardware support
* Added assemble.cmd for Windows.
In the long run, some (c)make-based cross-plafrom solution seems preferable.
* Fill up the menu page just like the other pages.
* Allow to assemble for different hardware types.
The first script parameter is used to set the ca65 symbol HW_TYPE. Without parameter, HW_TYPE is set to 0.
* Avoid unwanted i/o access.
Depending on the 6502, LDA addr,X and/or STA addr,X produce additional phantom reads. In order to avoid those phantom reads to do i/o access, I used the "classic" approach of moving those reads from page $C0 to page $BF.
* Made use of BIT instruction to access InputFlags from firmware.
Doing the same for access from disk-based software would require selfmodifying code as there's not bit <addr>,x instruction.
* Removed push/pop from GetByte.
After the replacing the rol instructions with bit instructions with a recent chnage, the only reason left to save a to the stack was setting the OutputFlags. But that can be done using x.
* Added InputFlags check for consistency.
* Added support for an alternative hardware type.
The new hardware type has simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Added another comminucation interface implementation.
Use ACM CDC (or another proprietary) USB serial device for communication.
Currently VID / PID of a Raspberry Pi Pico SDK CDC UART are hardcoded - see https://github.com/raspberrypi/usb-pid
* Revert "Avoid unwanted i/o access."
Neither the original hardware type nor the alternative hardware type have any read and write i/o port share addresses. Therefore phantom reads aren't an issue with those hardware types.
This reverts commit ae5cb754fb9540794bdb5465a77e1263ca257539.
* Adapt to the different error signatures on Linux.
So far the code was only tested on Windows.
* Added implementation of the alternative hardware type.
The implemenation is based on a Raspberry Pi Pico - see https://github.com/a2retrosystems/A2retroNET
The new hardware type has a simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Modify the HD image for the alternative hardware type.
It is likely desirable to have two HD images for the two hardware types. And likely the apple2driver program should default to the right one based on its protocol setting. BUt given that the HD image(s) shouldn't be part of the actual Git repo anyhow, I don't do anything about this here and now.
* Fixed shell startup (?)
At least on the alternative hardware, this "blindly sending" a reset command causes the shell to be terminated right away:
The driver acknowldges the reset command with a zero byte - and that byte ends up being read by DumpOutput causing it to branch to endOutput.
Maybe that sending a reset command is beneficial on the original hardware. Then another .if is required. Or DumpOutput shouldn't quit on reading a zero byte - the shell handler doesn't seem to send it on purpose(?)
* Upate HD image with recent shell change.
* Fix shell shutdown (?)
At least on the alternative hardware, things happen this way:
1. The shell 'exit' command has ptyOut signal outputComplete and terminate. At this point, ptyIn is still blocked up to one second in ReadCharacter - and can therefore not react on outputComplete.
2. The outputComplete handler in ShellCommand sends a zero byte. This makes on the A2 DumpOutput return and the caller send a zero byte. ShellCommand must not return here as ptyIn is still blocked.
3. The zero byte from the A2 has ptyIn return from ReadCharacter, signal userCancelled and terminate.
4. ShellCommand can now return, but it must not send a zero byte, as the A2 is not expecting it - and will therefore later misinterpret it.
Maybe the original hardware needs another handling, then differentiation of behavior in shell.go becomes necessary.
* Moved boot text out of IIgs copyright message area.
Having the boot text start at the left border of the third line makes it look nice on the cold boot screen of all Apple II's - and there's where the user sees it for some time while waiting for the RPi to come up.
* Several adjustements:
- Get latest Go version as of now.
- Nowadays (?) GitHub 'git clone' seems to only work with a GitHub account. Therefore the zip download workaround. The becomes hopefully unnecessary soon with Go module magic.
- Use 'go mod tidy' to update .sum file for now.
- Error handling for an empty drive 2 is currently not exactly great, so download Total Replay for drive 2. Unfortunately there's no stable URL as of now.
- Use $USER and $HOME instead of hardcoded values.
- Removed deprecated syslog output directives.
* Added brief fork description.
* Added ProDOS-Utilities reference.
* Reverted back to using 'git clone'.
I've no idea why git acted up the other day :-( Now, everything is back to normal...
* Ignore Pico build directory.
* Updated from https://github.com/a2retrosystems/A2retroNET
* Updated from https://github.com/a2retrosystems/A2retroNET
At this point, nothing at all is done on an A2 reset. This can likely be improved. However, Apple2-IO-RPi doesn't seem to handle A2 reset exactly gracefully anyhow.
In general, it seems desirable to introduce some simple framing protocol - like SLIP - that allows to recover from an A2 reset in the middle of an Apple2-IO-RPi command execution.
Such a framing protocol would allow to introduce different frame types. One frame type could then be an A2 reset frame sent by the A2retroNET firmware.
* Make use of brand new stable Total Replay download URL.
Thanks to 4am :-)
* Fixed typos.
* Clone upstream ProDOS-Utilities.
My ProDOS-Utilities pull request was merged.
* Added support for boards without LED.
* Updated link.
* Adjusted to the current A2retroNET hardware.
* Removed support for the Pico W.
* Updated URL.
* Updated URL.
* Make use A2Pico library.
* Added link to A2Pico.
* Remove intermediates from repo.
* Build intermediates from Pico build.
* Have LED reflect status of logic ACM connection.
* Update upstream repo references.
* Adjust build instructions.
* Update README.md
* Fix build and update dependencies
* Fix binary comparison
* Fix firware bug on classic hardware
---------
Co-authored-by: Oliver Schmidt <ol.sc@web.de>
2024-02-06 03:49:09 +00:00
## Setup on Pico based hardware
2024-03-29 15:46:32 +00:00
[Setup card with Pico hardware ](/PicoSetup.md )
Initial Pico hardware support
* Added assemble.cmd for Windows.
In the long run, some (c)make-based cross-plafrom solution seems preferable.
* Fill up the menu page just like the other pages.
* Allow to assemble for different hardware types.
The first script parameter is used to set the ca65 symbol HW_TYPE. Without parameter, HW_TYPE is set to 0.
* Avoid unwanted i/o access.
Depending on the 6502, LDA addr,X and/or STA addr,X produce additional phantom reads. In order to avoid those phantom reads to do i/o access, I used the "classic" approach of moving those reads from page $C0 to page $BF.
* Made use of BIT instruction to access InputFlags from firmware.
Doing the same for access from disk-based software would require selfmodifying code as there's not bit <addr>,x instruction.
* Removed push/pop from GetByte.
After the replacing the rol instructions with bit instructions with a recent chnage, the only reason left to save a to the stack was setting the OutputFlags. But that can be done using x.
* Added InputFlags check for consistency.
* Added support for an alternative hardware type.
The new hardware type has simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Added another comminucation interface implementation.
Use ACM CDC (or another proprietary) USB serial device for communication.
Currently VID / PID of a Raspberry Pi Pico SDK CDC UART are hardcoded - see https://github.com/raspberrypi/usb-pid
* Revert "Avoid unwanted i/o access."
Neither the original hardware type nor the alternative hardware type have any read and write i/o port share addresses. Therefore phantom reads aren't an issue with those hardware types.
This reverts commit ae5cb754fb9540794bdb5465a77e1263ca257539.
* Adapt to the different error signatures on Linux.
So far the code was only tested on Windows.
* Added implementation of the alternative hardware type.
The implemenation is based on a Raspberry Pi Pico - see https://github.com/a2retrosystems/A2retroNET
The new hardware type has a simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Modify the HD image for the alternative hardware type.
It is likely desirable to have two HD images for the two hardware types. And likely the apple2driver program should default to the right one based on its protocol setting. BUt given that the HD image(s) shouldn't be part of the actual Git repo anyhow, I don't do anything about this here and now.
* Fixed shell startup (?)
At least on the alternative hardware, this "blindly sending" a reset command causes the shell to be terminated right away:
The driver acknowldges the reset command with a zero byte - and that byte ends up being read by DumpOutput causing it to branch to endOutput.
Maybe that sending a reset command is beneficial on the original hardware. Then another .if is required. Or DumpOutput shouldn't quit on reading a zero byte - the shell handler doesn't seem to send it on purpose(?)
* Upate HD image with recent shell change.
* Fix shell shutdown (?)
At least on the alternative hardware, things happen this way:
1. The shell 'exit' command has ptyOut signal outputComplete and terminate. At this point, ptyIn is still blocked up to one second in ReadCharacter - and can therefore not react on outputComplete.
2. The outputComplete handler in ShellCommand sends a zero byte. This makes on the A2 DumpOutput return and the caller send a zero byte. ShellCommand must not return here as ptyIn is still blocked.
3. The zero byte from the A2 has ptyIn return from ReadCharacter, signal userCancelled and terminate.
4. ShellCommand can now return, but it must not send a zero byte, as the A2 is not expecting it - and will therefore later misinterpret it.
Maybe the original hardware needs another handling, then differentiation of behavior in shell.go becomes necessary.
* Moved boot text out of IIgs copyright message area.
Having the boot text start at the left border of the third line makes it look nice on the cold boot screen of all Apple II's - and there's where the user sees it for some time while waiting for the RPi to come up.
* Several adjustements:
- Get latest Go version as of now.
- Nowadays (?) GitHub 'git clone' seems to only work with a GitHub account. Therefore the zip download workaround. The becomes hopefully unnecessary soon with Go module magic.
- Use 'go mod tidy' to update .sum file for now.
- Error handling for an empty drive 2 is currently not exactly great, so download Total Replay for drive 2. Unfortunately there's no stable URL as of now.
- Use $USER and $HOME instead of hardcoded values.
- Removed deprecated syslog output directives.
* Added brief fork description.
* Added ProDOS-Utilities reference.
* Reverted back to using 'git clone'.
I've no idea why git acted up the other day :-( Now, everything is back to normal...
* Ignore Pico build directory.
* Updated from https://github.com/a2retrosystems/A2retroNET
* Updated from https://github.com/a2retrosystems/A2retroNET
At this point, nothing at all is done on an A2 reset. This can likely be improved. However, Apple2-IO-RPi doesn't seem to handle A2 reset exactly gracefully anyhow.
In general, it seems desirable to introduce some simple framing protocol - like SLIP - that allows to recover from an A2 reset in the middle of an Apple2-IO-RPi command execution.
Such a framing protocol would allow to introduce different frame types. One frame type could then be an A2 reset frame sent by the A2retroNET firmware.
* Make use of brand new stable Total Replay download URL.
Thanks to 4am :-)
* Fixed typos.
* Clone upstream ProDOS-Utilities.
My ProDOS-Utilities pull request was merged.
* Added support for boards without LED.
* Updated link.
* Adjusted to the current A2retroNET hardware.
* Removed support for the Pico W.
* Updated URL.
* Updated URL.
* Make use A2Pico library.
* Added link to A2Pico.
* Remove intermediates from repo.
* Build intermediates from Pico build.
* Have LED reflect status of logic ACM connection.
* Update upstream repo references.
* Adjust build instructions.
* Update README.md
* Fix build and update dependencies
* Fix binary comparison
* Fix firware bug on classic hardware
---------
Co-authored-by: Oliver Schmidt <ol.sc@web.de>
2024-02-06 03:49:09 +00:00
2022-02-20 18:58:42 +00:00
## Contributions/Thanks
2022-02-20 21:27:21 +00:00
- Hans Hübner ([@hanshuebner](https://github.com/hanshuebner)) for help cleaning up schematics
- Scott ([@figital](https://github.com/figital)) for assembling early prototypes and recommending the AT28C64B chip
2022-02-22 15:49:36 +00:00
- Brokencodez for help with 3.3V conversion
2022-02-20 21:27:21 +00:00
- David Schmenk ([@dschmenk](https://github.com/dschmenk)) for creating his Apple2Pi project, proving that Raspberry Pi can be powered by the Apple II expansion bus
- Wyatt Wong ([@wyatt-wong](https://github.com/wyatt-wong)) for testing with multiple cards
- ([@Abysmal](https://github.com/Abysmal)) for shell and rpi.command testing
- ([@bfranske](https://github.com/bfranske)) for suggesting adding the 5V jumper
- Tim Boldt ([@timboldt](https://github.com/timboldt)) for recommending removing sysfs based GPIO code
Initial Pico hardware support
* Added assemble.cmd for Windows.
In the long run, some (c)make-based cross-plafrom solution seems preferable.
* Fill up the menu page just like the other pages.
* Allow to assemble for different hardware types.
The first script parameter is used to set the ca65 symbol HW_TYPE. Without parameter, HW_TYPE is set to 0.
* Avoid unwanted i/o access.
Depending on the 6502, LDA addr,X and/or STA addr,X produce additional phantom reads. In order to avoid those phantom reads to do i/o access, I used the "classic" approach of moving those reads from page $C0 to page $BF.
* Made use of BIT instruction to access InputFlags from firmware.
Doing the same for access from disk-based software would require selfmodifying code as there's not bit <addr>,x instruction.
* Removed push/pop from GetByte.
After the replacing the rol instructions with bit instructions with a recent chnage, the only reason left to save a to the stack was setting the OutputFlags. But that can be done using x.
* Added InputFlags check for consistency.
* Added support for an alternative hardware type.
The new hardware type has simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Added another comminucation interface implementation.
Use ACM CDC (or another proprietary) USB serial device for communication.
Currently VID / PID of a Raspberry Pi Pico SDK CDC UART are hardcoded - see https://github.com/raspberrypi/usb-pid
* Revert "Avoid unwanted i/o access."
Neither the original hardware type nor the alternative hardware type have any read and write i/o port share addresses. Therefore phantom reads aren't an issue with those hardware types.
This reverts commit ae5cb754fb9540794bdb5465a77e1263ca257539.
* Adapt to the different error signatures on Linux.
So far the code was only tested on Windows.
* Added implementation of the alternative hardware type.
The implemenation is based on a Raspberry Pi Pico - see https://github.com/a2retrosystems/A2retroNET
The new hardware type has a simple UART-type interface. Beside the two data registers, there are only the two bits to indicate readability and writability of the data registers.
* Modify the HD image for the alternative hardware type.
It is likely desirable to have two HD images for the two hardware types. And likely the apple2driver program should default to the right one based on its protocol setting. BUt given that the HD image(s) shouldn't be part of the actual Git repo anyhow, I don't do anything about this here and now.
* Fixed shell startup (?)
At least on the alternative hardware, this "blindly sending" a reset command causes the shell to be terminated right away:
The driver acknowldges the reset command with a zero byte - and that byte ends up being read by DumpOutput causing it to branch to endOutput.
Maybe that sending a reset command is beneficial on the original hardware. Then another .if is required. Or DumpOutput shouldn't quit on reading a zero byte - the shell handler doesn't seem to send it on purpose(?)
* Upate HD image with recent shell change.
* Fix shell shutdown (?)
At least on the alternative hardware, things happen this way:
1. The shell 'exit' command has ptyOut signal outputComplete and terminate. At this point, ptyIn is still blocked up to one second in ReadCharacter - and can therefore not react on outputComplete.
2. The outputComplete handler in ShellCommand sends a zero byte. This makes on the A2 DumpOutput return and the caller send a zero byte. ShellCommand must not return here as ptyIn is still blocked.
3. The zero byte from the A2 has ptyIn return from ReadCharacter, signal userCancelled and terminate.
4. ShellCommand can now return, but it must not send a zero byte, as the A2 is not expecting it - and will therefore later misinterpret it.
Maybe the original hardware needs another handling, then differentiation of behavior in shell.go becomes necessary.
* Moved boot text out of IIgs copyright message area.
Having the boot text start at the left border of the third line makes it look nice on the cold boot screen of all Apple II's - and there's where the user sees it for some time while waiting for the RPi to come up.
* Several adjustements:
- Get latest Go version as of now.
- Nowadays (?) GitHub 'git clone' seems to only work with a GitHub account. Therefore the zip download workaround. The becomes hopefully unnecessary soon with Go module magic.
- Use 'go mod tidy' to update .sum file for now.
- Error handling for an empty drive 2 is currently not exactly great, so download Total Replay for drive 2. Unfortunately there's no stable URL as of now.
- Use $USER and $HOME instead of hardcoded values.
- Removed deprecated syslog output directives.
* Added brief fork description.
* Added ProDOS-Utilities reference.
* Reverted back to using 'git clone'.
I've no idea why git acted up the other day :-( Now, everything is back to normal...
* Ignore Pico build directory.
* Updated from https://github.com/a2retrosystems/A2retroNET
* Updated from https://github.com/a2retrosystems/A2retroNET
At this point, nothing at all is done on an A2 reset. This can likely be improved. However, Apple2-IO-RPi doesn't seem to handle A2 reset exactly gracefully anyhow.
In general, it seems desirable to introduce some simple framing protocol - like SLIP - that allows to recover from an A2 reset in the middle of an Apple2-IO-RPi command execution.
Such a framing protocol would allow to introduce different frame types. One frame type could then be an A2 reset frame sent by the A2retroNET firmware.
* Make use of brand new stable Total Replay download URL.
Thanks to 4am :-)
* Fixed typos.
* Clone upstream ProDOS-Utilities.
My ProDOS-Utilities pull request was merged.
* Added support for boards without LED.
* Updated link.
* Adjusted to the current A2retroNET hardware.
* Removed support for the Pico W.
* Updated URL.
* Updated URL.
* Make use A2Pico library.
* Added link to A2Pico.
* Remove intermediates from repo.
* Build intermediates from Pico build.
* Have LED reflect status of logic ACM connection.
* Update upstream repo references.
* Adjust build instructions.
* Update README.md
* Fix build and update dependencies
* Fix binary comparison
* Fix firware bug on classic hardware
---------
Co-authored-by: Oliver Schmidt <ol.sc@web.de>
2024-02-06 03:49:09 +00:00
- Oliver Schmidt ([@oliverschmidt](https://github.com/oliverschmidt/apple2-io-rpi/)) for writing the Pico PIO and firmware
- Ralle Palaveev ([@rallepalaveev](https://github.com/rallepalaveev/a2pico)) for Pico hardware design
2022-02-20 18:58:42 +00:00
2020-11-03 02:46:28 +00:00
## Similar Project
2022-01-13 23:55:04 +00:00
If you prefer having Apple II peripherals control a Raspberry Pi rather than simply using the Raspberry Pi to provide storage, network access and processing to the Apple II, have a look at David Schmenk's excellent [Apple2Pi ](https://github.com/dschmenk/apple2pi ) project. I am often asked about differences between these two projects. They are similar in some ways but essentially opposite. The Apple2Pi is meant for the primary machine to be the RPi, using the Apple II for it's peripherals. The Apple2-IO-RPi is meant to have the Apple II as the primary machine and just use the RPi for its processing, storage and network.