SlideShare a Scribd company logo
1 of 22
Download to read offline
It’s Game Time
Matt Jenkins <mdj@emdeejay.net>
OzKFest April 2015
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
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
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
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
Serial - intercomponent
• Widely used in Arduino
• RTC, Stepper Motor, GPIO, Servo
• i2c
• SPI
• 1-wire
i2c
• Inter-Integrated Circuit
• 2-wire, synchronous, half-duplex
• 10Khz, 100Khz, 400Khz modes
• Open-drain
• Multi-master capable
i2c
• Data line - SDA
• Clock line - SCL
• Master drives clock
• All devices share data line
• Actual speed can be variable (0-100Khz)
i2c
(Image from Wikipedia)
Apple II - i2c ?
• Can it be done ?
• i2c allows slower speeds
• Ought to be easy!
• Where do we plug it in ?
Apple II Game Port
• 4 Annunciator outputs
• 3 Pushbutton inputs
• 4 Paddle Inputs
• 1 Utility Strobe
Apple II Game Port
Apple II Game Port
• Inputs and outputs are TTL
• But i2c is open drain
• Going to need some electronics!
Emitter Follower
Open Drain
Apple i2c - Schematic
• Two MOSFETs
• Two Resistors
• Two sets required to do both SDA and SCL
Apple i2c - SDA schematic
1243774
Apple i2c - Code
• Some simple assembly language
• Merlin 8/16 (32?)
• Macros should help
• Ampersand extensions for Applesoft
Apple i2c - Code
AN0OFF EQU $C058
AN0ON EQU $C059
AN1OFF EQU $C05A
AN1ON EQU $C05B
PB0 EQU $C061
PB1 EQU $C062
PB2 EQU $C063
Apple i2c - Code
SDAOFF MAC
BIT AN0ON
<<<
SDAON MAC
BIT AN0OFF
<<<
SCLOFF MAC
BIT AN1ON
<<<
SCLON MAC
BIT AN1OFF
<<<
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
<<<
Summary
• Not working yet (sorry!)
• Questions ?

More Related Content

What's hot

BeagleBone Black Using Python
BeagleBone Black Using PythonBeagleBone Black Using Python
BeagleBone Black Using Python
Sai Viswanath
 

What's hot (20)

Espressif Introduction
Espressif IntroductionEspressif Introduction
Espressif Introduction
 
Alessandro Abbruzzetti - Kernal64
Alessandro Abbruzzetti - Kernal64Alessandro Abbruzzetti - Kernal64
Alessandro Abbruzzetti - Kernal64
 
BeagleBone Black Using Python
BeagleBone Black Using PythonBeagleBone Black Using Python
BeagleBone Black Using Python
 
Asus Tinker Board
Asus Tinker BoardAsus Tinker Board
Asus Tinker Board
 
Beaglebone And Android
Beaglebone And AndroidBeaglebone And Android
Beaglebone And Android
 
TMS320DM8148 Embedded Linux
TMS320DM8148 Embedded LinuxTMS320DM8148 Embedded Linux
TMS320DM8148 Embedded Linux
 
Hands On Embedded Linux with BeagleBone Black
Hands On Embedded Linux with BeagleBone BlackHands On Embedded Linux with BeagleBone Black
Hands On Embedded Linux with BeagleBone Black
 
Taking the BeagleBone Cookbook recipes beyond BeagleBone Black
Taking the BeagleBone Cookbook recipes beyond BeagleBone BlackTaking the BeagleBone Cookbook recipes beyond BeagleBone Black
Taking the BeagleBone Cookbook recipes beyond BeagleBone Black
 
PCB Business Card
PCB Business CardPCB Business Card
PCB Business Card
 
NXP IMX6 Processor - Embedded Linux
NXP IMX6 Processor - Embedded LinuxNXP IMX6 Processor - Embedded Linux
NXP IMX6 Processor - Embedded Linux
 
Audible Objects
Audible ObjectsAudible Objects
Audible Objects
 
Beagle board
Beagle boardBeagle board
Beagle board
 
Wi-Fi Modem For the Commodore 64
Wi-Fi Modem For the Commodore 64Wi-Fi Modem For the Commodore 64
Wi-Fi Modem For the Commodore 64
 
Beagle bone black by Boddukuri venkata saiteja
Beagle bone black  by Boddukuri venkata saitejaBeagle bone black  by Boddukuri venkata saiteja
Beagle bone black by Boddukuri venkata saiteja
 
Introduction to Internet of Things Hardware
Introduction to Internet of Things HardwareIntroduction to Internet of Things Hardware
Introduction to Internet of Things Hardware
 
New Commodore 64 Network Game Developments
New Commodore 64 Network Game DevelopmentsNew Commodore 64 Network Game Developments
New Commodore 64 Network Game Developments
 
uRock @ Jserv Course Final
uRock @ Jserv Course Final uRock @ Jserv Course Final
uRock @ Jserv Course Final
 
Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the World
 
M qcardiac
M qcardiacM qcardiac
M qcardiac
 

Similar to It's game time

I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
Techvilla
 
Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...
Alexander Bolshev
 

Similar to It's game time (20)

I2C And SPI Part-23
I2C And  SPI Part-23I2C And  SPI Part-23
I2C And SPI Part-23
 
Serial Busses.pptx
Serial Busses.pptxSerial Busses.pptx
Serial Busses.pptx
 
Sparc t4 2 system technical overview
Sparc t4 2 system technical overviewSparc t4 2 system technical overview
Sparc t4 2 system technical overview
 
serial_busses_i2c.pptx
serial_busses_i2c.pptxserial_busses_i2c.pptx
serial_busses_i2c.pptx
 
atmega 128 and communication protocol
atmega 128 and communication protocolatmega 128 and communication protocol
atmega 128 and communication protocol
 
Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...
 
Parth xyz
Parth xyzParth xyz
Parth xyz
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
 
MarsBoard - NXP IMX6 Processor
MarsBoard - NXP IMX6 ProcessorMarsBoard - NXP IMX6 Processor
MarsBoard - NXP IMX6 Processor
 
UNI T 6- SPI_I2C_Lecture8.pptx
UNI                    T 6- SPI_I2C_Lecture8.pptxUNI                    T 6- SPI_I2C_Lecture8.pptx
UNI T 6- SPI_I2C_Lecture8.pptx
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduino
 
SoC FPGA Technology
SoC FPGA TechnologySoC FPGA Technology
SoC FPGA Technology
 
Arduino Programming - Brief Introduction
Arduino Programming - Brief IntroductionArduino Programming - Brief Introduction
Arduino Programming - Brief Introduction
 
nios.ppt
nios.pptnios.ppt
nios.ppt
 
NXP i.MX6 Multi Media Processor & Peripherals
NXP i.MX6 Multi Media Processor & PeripheralsNXP i.MX6 Multi Media Processor & Peripherals
NXP i.MX6 Multi Media Processor & Peripherals
 
Arduino-101-Workshop (Introduction to Arduino and motor driver)
Arduino-101-Workshop (Introduction to Arduino and motor driver)Arduino-101-Workshop (Introduction to Arduino and motor driver)
Arduino-101-Workshop (Introduction to Arduino and motor driver)
 
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERSPIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
PIC-MICROCONTROLLER TUTORIALS FOR BEGINNERS
 
ARDUINO AND RASPBERRYPI.pptx
ARDUINO AND RASPBERRYPI.pptxARDUINO AND RASPBERRYPI.pptx
ARDUINO AND RASPBERRYPI.pptx
 
ATmega 16
ATmega 16ATmega 16
ATmega 16
 
Smart logic
Smart logicSmart logic
Smart logic
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

It's game time

  • 1. It’s Game Time Matt Jenkins <mdj@emdeejay.net> OzKFest April 2015
  • 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. 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. 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. 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. Serial - intercomponent • Widely used in Arduino • RTC, Stepper Motor, GPIO, Servo • i2c • SPI • 1-wire
  • 7. i2c • Inter-Integrated Circuit • 2-wire, synchronous, half-duplex • 10Khz, 100Khz, 400Khz modes • Open-drain • Multi-master capable
  • 8. i2c • Data line - SDA • Clock line - SCL • Master drives clock • All devices share data line • Actual speed can be variable (0-100Khz)
  • 10. Apple II - i2c ? • Can it be done ? • i2c allows slower speeds • Ought to be easy! • Where do we plug it in ?
  • 11. Apple II Game Port • 4 Annunciator outputs • 3 Pushbutton inputs • 4 Paddle Inputs • 1 Utility Strobe
  • 13. Apple II Game Port • Inputs and outputs are TTL • But i2c is open drain • Going to need some electronics!
  • 16. Apple i2c - Schematic • Two MOSFETs • Two Resistors • Two sets required to do both SDA and SCL
  • 17. Apple i2c - SDA schematic 1243774
  • 18. Apple i2c - Code • Some simple assembly language • Merlin 8/16 (32?) • Macros should help • Ampersand extensions for Applesoft
  • 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. Apple i2c - Code SDAOFF MAC BIT AN0ON <<< SDAON MAC BIT AN0OFF <<< SCLOFF MAC BIT AN1ON <<< SCLON MAC BIT AN1OFF <<<
  • 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. Summary • Not working yet (sorry!) • Questions ?