Tandy Assembly Springfield,OH 11/10/18 Building an Extension Card for the TRS-80: Lessons Learned from theRetroStoreCard
Arno Puder & Sascha Häberling
Outline: 1. RetroStore 2. TRS-80 emulator for Android 3. Understanding the I/O Bus 4. Building the RetroStoreCard
TRS-80 Emulator for Android
● Design goals: ○ Well integrated with Android UI. ○ Make use of sdltrs (do not reinvent the wheel!) ● Features: ○ Model I/III text mode with all the features supported by sdltrs. ○ Support for different screen sizes. ○ Retro fonts by Rebecca Bettencourt http://www.kreativekorp.com/software/fonts/trs80.shtml ○ Different soft -keyboard layouts, external keyboard, game controller, tilt interface. ○ Tutorial system. ○ Chromecast support. ○ Sound. ○ Configurations. ● First public release on Google Play Store April 16, 2013. ● Google Play Store listing: https://play.google.com/store/apps/details?id=org.puder.trs80 RetroStore.org
● Apple and Google made the concept of app stores popular. ● Idea: create an app store for vintage platforms. ● Goa ls : ○ Effortless downloading and installation of retro apps. ○ Support different vintage platforms. ○ Serve as a digital archive preserving retro apps. ● Related approaches: ○ Retrocomputing Archive (http://www.retroarchive.org/) ○ South West Retro Computing Archive (http://www.retro-computing.org/) ○ Cla s s icCm p (http://www.classiccmp.org/cpmarchives/trs80.php) ○ System 80 Archive (http:/ / www.cla s s ic-computers.org.nz/system-80/software_archive_directory.htm) ○ Many, many, others... ● Differentiator: we offer open API to access and download retro apps!
RetroStoreCard RetroStoreCardOverview
1. Push button 2. Multi-color status LED 3. Power indicator 4. Micro-USB connector 5. TRS-80 I/O bus connector
I/O Bus Pins
Name Description Pins
D[0-7] Data lines 1,3,…,15
A[0-7] Address lines 17,19,…,31
RD* Read in progress 33
WR* Write in progress 35
IORQ* I/O request 49
IOBUS_WAIT* Force wait-states on Z80 41
IOBUS_INT* Signal interrupt to Z80 39 I/O Bus Write Cycle 1 Bit Output
D0 D Q CLK WR* IORQ*
A0
A1
A2
A3
A4
A5
A6
A7
3110 = 1F16 = 000111112
Writing to the I/O Bus– First Attempt
> OUT31,0 > OUT31,1 > OUT31,0 > OUT31,1 Writing to the I/O Bus– Second Attempt
> OUT236,56 > OUT31,0 > OUT31,1 > OUT31,0 > OUT31,1 Writing to the I/O Bus– Third Attempt
10 OUT236,56 20 OUT31,0 30 INPUT X 40 OUT31,1 50 INPUT X 60 GOTO20 RUN Success!
ESP-WROOM-32
● Low-cost microcontroller including WiFi and Bluetooth. ● Produced by Shanghai-based Chinese manufacturer, Espressif Systems. ● CPU: dual core 32-bit RISC Tensilica XtensaLX6 @ 240 MHz. ● FreeRTOS ● Flash memory: 4MB ● SRAM: 520 kB ● WiFi: ○ IEEE 802.11 b/g/n ○ WEP or WPA/WPA2 authentication, oropen networks. ● Interface: 16 GPIO pins, SPI, I2C, UART, 10-bit ADC. ● Price point: $11
Architecture
1 Native Client (Z80 code) 3 Internet RetroStore Proxy 2 Router RetroStoreCard
1. Type in small BASIC bootstrap application to download Z80 code via the expansion board. 2. Native client uses expansion port to interact with proxy. 3. Proxy uses ESP32's WiFi to connect to the router and communicate with the Retro Store. RetroStoreCardProtocol
Send Receive Description
0x00 101 bytes bootstrap
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
10 OUT236,56 20 OUT31,0 30 FOR X=0TO100:POKE17152+X,IN(31):NEXT RUN SYSTEM *? /17152 Bootstrap
10 OUT236,56 20 OUT31,0 30 FOR X=0TO100:POKE17152+X,INP(31):NEXT RUN SYSTEM *? /17152
All Good Things...
● Summary: ○ RetroStore as a curation and preservation effort for vintage platforms. ○ Building modern extensions is not that complicated! ○ RetroStoreCard allows access for a TRS-80 Model III to the RetroStore. ● Outlook: ○ ROM patch for auto-boot. ○ Expand to other vintage platforms. ○ Reinterpret RetroStoreCard as a general gateway to the Internet.TrsWiki? TrsBox? ● Complete source and schematics freely available at: https:// github.com/apuder/RetroStoreCard
Contact: Arno: [email protected] Sascha: [email protected]