Successfully reported this slideshow.

It's game time

0

Share

Loading in …3
×
1 of 22
1 of 22

It's game time

0

Share

Download to read offline

Transcript

  1. 1. It’s Game Time Matt Jenkins <mdj@emdeejay.net> OzKFest April 2015
  2. 2. ScramWorks • Design has evolved to higher capacity SRAM • 1 or 2 chips for 8MB or 16MB capacity • 3.3V circuitry • 100% RamWorks compatibility • AE and Nishida Radio video connectors • Soon, and with brothers
  3. 3. Serial Segue • Communicates between computer systems • Or between parts within a computer system • Increasing replacing parallel communications • USB • Serial ATA • PCI-e slots are serial busses
  4. 4. Serial Style • Asynchronous • Rely on accurate timing on each end point • Synchronous • Clock is provided on the bus • Flow Control • In band • Out of band
  5. 5. Serial - RS232 • Super Serial Card, Apple IIc, 6551 ACIA • Asynchronous • In band and out of band flow control • XON/XOFF, RTS/CTS • Logic level and line level. • 115,200Kbps to many megabits
  6. 6. Serial - intercomponent • Widely used in Arduino • RTC, Stepper Motor, GPIO, Servo • i2c • SPI • 1-wire
  7. 7. i2c • Inter-Integrated Circuit • 2-wire, synchronous, half-duplex • 10Khz, 100Khz, 400Khz modes • Open-drain • Multi-master capable
  8. 8. i2c • Data line - SDA • Clock line - SCL • Master drives clock • All devices share data line • Actual speed can be variable (0-100Khz)
  9. 9. i2c (Image from Wikipedia)
  10. 10. Apple II - i2c ? • Can it be done ? • i2c allows slower speeds • Ought to be easy! • Where do we plug it in ?
  11. 11. Apple II Game Port • 4 Annunciator outputs • 3 Pushbutton inputs • 4 Paddle Inputs • 1 Utility Strobe
  12. 12. Apple II Game Port
  13. 13. Apple II Game Port • Inputs and outputs are TTL • But i2c is open drain • Going to need some electronics!
  14. 14. Emitter Follower
  15. 15. Open Drain
  16. 16. Apple i2c - Schematic • Two MOSFETs • Two Resistors • Two sets required to do both SDA and SCL
  17. 17. Apple i2c - SDA schematic 1243774
  18. 18. Apple i2c - Code • Some simple assembly language • Merlin 8/16 (32?) • Macros should help • Ampersand extensions for Applesoft
  19. 19. Apple i2c - Code AN0OFF EQU $C058 AN0ON EQU $C059 AN1OFF EQU $C05A AN1ON EQU $C05B PB0 EQU $C061 PB1 EQU $C062 PB2 EQU $C063
  20. 20. Apple i2c - Code SDAOFF MAC BIT AN0ON <<< SDAON MAC BIT AN0OFF <<< SCLOFF MAC BIT AN1ON <<< SCLON MAC BIT AN1OFF <<<
  21. 21. Apple i2c - Code SCLSTAT MAC LDA PB1 <<< SCLWAIT MAC WAIT SCLSTAT BMI WAIT NOP <<< I2CSTART MAC SDAOFF NOP NOP NOP NOP SCLOFF <<< I2CCLOCK MAC SCLON NOP NOP SCLOFF NOP <<<
  22. 22. Summary • Not working yet (sorry!) • Questions ?

Transcript

  1. 1. It’s Game Time Matt Jenkins <mdj@emdeejay.net> OzKFest April 2015
  2. 2. ScramWorks • Design has evolved to higher capacity SRAM • 1 or 2 chips for 8MB or 16MB capacity • 3.3V circuitry • 100% RamWorks compatibility • AE and Nishida Radio video connectors • Soon, and with brothers
  3. 3. Serial Segue • Communicates between computer systems • Or between parts within a computer system • Increasing replacing parallel communications • USB • Serial ATA • PCI-e slots are serial busses
  4. 4. Serial Style • Asynchronous • Rely on accurate timing on each end point • Synchronous • Clock is provided on the bus • Flow Control • In band • Out of band
  5. 5. Serial - RS232 • Super Serial Card, Apple IIc, 6551 ACIA • Asynchronous • In band and out of band flow control • XON/XOFF, RTS/CTS • Logic level and line level. • 115,200Kbps to many megabits
  6. 6. Serial - intercomponent • Widely used in Arduino • RTC, Stepper Motor, GPIO, Servo • i2c • SPI • 1-wire
  7. 7. i2c • Inter-Integrated Circuit • 2-wire, synchronous, half-duplex • 10Khz, 100Khz, 400Khz modes • Open-drain • Multi-master capable
  8. 8. i2c • Data line - SDA • Clock line - SCL • Master drives clock • All devices share data line • Actual speed can be variable (0-100Khz)
  9. 9. i2c (Image from Wikipedia)
  10. 10. Apple II - i2c ? • Can it be done ? • i2c allows slower speeds • Ought to be easy! • Where do we plug it in ?
  11. 11. Apple II Game Port • 4 Annunciator outputs • 3 Pushbutton inputs • 4 Paddle Inputs • 1 Utility Strobe
  12. 12. Apple II Game Port
  13. 13. Apple II Game Port • Inputs and outputs are TTL • But i2c is open drain • Going to need some electronics!
  14. 14. Emitter Follower
  15. 15. Open Drain
  16. 16. Apple i2c - Schematic • Two MOSFETs • Two Resistors • Two sets required to do both SDA and SCL
  17. 17. Apple i2c - SDA schematic 1243774
  18. 18. Apple i2c - Code • Some simple assembly language • Merlin 8/16 (32?) • Macros should help • Ampersand extensions for Applesoft
  19. 19. Apple i2c - Code AN0OFF EQU $C058 AN0ON EQU $C059 AN1OFF EQU $C05A AN1ON EQU $C05B PB0 EQU $C061 PB1 EQU $C062 PB2 EQU $C063
  20. 20. Apple i2c - Code SDAOFF MAC BIT AN0ON <<< SDAON MAC BIT AN0OFF <<< SCLOFF MAC BIT AN1ON <<< SCLON MAC BIT AN1OFF <<<
  21. 21. Apple i2c - Code SCLSTAT MAC LDA PB1 <<< SCLWAIT MAC WAIT SCLSTAT BMI WAIT NOP <<< I2CSTART MAC SDAOFF NOP NOP NOP NOP SCLOFF <<< I2CCLOCK MAC SCLON NOP NOP SCLOFF NOP <<<
  22. 22. Summary • Not working yet (sorry!) • Questions ?

More Related Content

Related Books

Free with a 30 day trial from Scribd

See all

×