SlideShare a Scribd company logo
1 of 36
Gabriel Honoré 1
What is it? A collection of software emulators A software emulator is a computerprogram that imitates an electronicdevice or another program. Examples: DOSBox MAME 2
What is it? 1º - A Commodore 64emulator 3
What is it? 2º - A NintendoEntertainmentSystem (NES) emulator 4
Whatisit? 3º - A set of abstractions,components, and toolsthat can behelpfulformakingotheremulators(WIP) FRAMEWORK … … ? 5
Short demo 6
Motivations I noticed that: People always choose statically-typedlanguages for making them. Proceduraldesigns are preferedwhencomparedtoobject-orienteddesigns. Whyisthat? Performance issues. Isthatreally a problemnowadays? 7
Goals Whatdid I wanttoaccomplish? Writeeverything in Smalltalk! . OO design first, then think about performance. Recreatethefeeling of the original machines Highqualityemulation. Createaneasyto useframeworkforwritingcomputer & gameconsoleemulators 8
How are theemulatorsmade? 9
Thesystementities A common C64 system has: 10
Theusersideentities Theuserwantstointeractwiththeemulatedsystemthrough: 11
Groups of entities Objectsfor translation User’s IO devices Thesystementities 12
Groups of entities Thesystemmodel Theuser’s IO devices Theobjectsthatallowcommunicationbetweenthetwoworlds 13
Thesystemmodel POWER SUPPLY PERIPHERALS MAIN UNIT SOFTWARE MEDIA 14
Thesystemmodel Thepowersupply Implementsthe concept of “keepingalive”electricaldevices Works at a specifiedfrequency Manydevices can bepluggedtoit It’simplementedwith aSmalltalkprocess 15
Thesystemmodel Themainunit 16
Thesystemmodel The C64 architecture (simplified) CPU (MOS 6510) Address decoder IO CHIPS MEMORIES Video chip MOS 6569 R E G Mainmemory (64K RAM) Color (?K RAM) Sound chip MOS 6581 R E G Basic (?K ROM) R E G Kernal (?K ROM) CIA 1 Char (?K ROM) R E G CIA 2 17
Thesystemmodel The NES architecture (simplified) CPU (MOS 6502) Address decoder Color palette (32 bytes RAM) IO CHIPS MEMORIES Video chip PPU R E G Characterinternalmemory (2K RAM) Memoryprovided bythecartridge Sound chip APU R E G R E G Sprite RAM (256 bytes) DMA R E G IO 18
Thesystemmodel How do the machines work? The CPU isclockedbythepowersupply The CPU readsfrom and writestothe bus ie: at:anAddressput:aNumber Addressdecoder: Addressinterval -> Chip (16r0000-16r7FFF) -> RAM (0000-7FFF) (16r8000-16r800F) -> Video chip (0000-000F) Theselected chip getstherequest,and theregisters interface mapitintoanaction. 19
Thesystemmodel Theperipherals: 20
Thesystemmodel The media 21
The Video system RETROBJECTS SIDE DEVELOPER ONLYNEEDS TO IMPLEMENT THESE TWO OBJECTS Palette Thesystemmodel Powersource Video chip Frame buffer Color generator External interface TV Converter 22
The Audio system RETROBJECTS SIDE Buffer Strategy Thesystemmodel External interface Power source Sound chip Sampler Speaker DEVELOPER ONLYNEEDS TO IMPLEMENT THIS OBJECT 23
The Input system OUTSIDE RETROBJECTS RETROBJECTS Thesystemmodel Representation of user’s keyboard User presses The ‘A’ key External interface C64 keyboard Adaptor DEVELOPER ONLYNEEDS TO IMPLEMENT THESE TWO OBJECTS 24
Groups of entities Thesystemmodel Theuser’s IO devices Theobjectsthatallowcommunicationbetweenthetwoworlds 25
Theuser’s IO devices External interfaces: FMODEx SDL & xffd SDL & OpenGL Files 26
Groups of entities Thesystemmodel Theuser’s IO devices Theobjectsthatallowcommunicationbetweenthetwo “worlds” 27
Translationobjects Loaders Take a file and convertsitintothe actualsoftware media, ie: T64, PRG, TAP. Adaptors Take a user input event and convertsitintoanaction in themodel. ie: User’skeypress -> C64 keypress TheGUIs 28
There are lots of thingsthatcouldbereusedonotheremulators! 29
Theframework Someabstractions: Devices I/O chips Sound chips Video chips Schedulingprocess 30
The framework Somecomponents: TV, speaker, powersupply Digital pins, one-way and bi-directionalports Addressdecoders: mapping, bank-switching,mirroring Memories: RAM, ROM and registers Stroberegisters Counters and comparators Buttons and switches Video filters, samplers, etc. 31
Theframework Tools: Notmany so far Goal: More interactivedevelopment,doinglessprogramming. 32
Conclusions Smalltalk can do that, too!  The Smalltalk environment is idealfor modeling hardware. Profiling is the key for getting greatperformance without compromisingthe design. 33
Future works Make it cross-platform Make it run in Mac & Linux Keepimprovingtheemulators. Keepevolvingtheframework. Documentation, please! No tests  Make more emulators! 34
Questions? 35
THANK YOU! Gabriel Honoré ghonore@gmail.com http://www.zeek-it.com.ar/retrobjects/ 36

More Related Content

Similar to Retrobjects - Fun with C64 and NES

Hardware & software in multimedia
Hardware & software in multimediaHardware & software in multimedia
Hardware & software in multimediaRiosArt
 
Assignment instructions
Assignment instructionsAssignment instructions
Assignment instructionswallinplanet
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsPouya Pournasir
 
Ch2 pc-components-features-and-system-design
Ch2 pc-components-features-and-system-designCh2 pc-components-features-and-system-design
Ch2 pc-components-features-and-system-designBoyapati Giri
 
Mp3 player project presentation
Mp3 player project presentationMp3 player project presentation
Mp3 player project presentationAntonio Mondragon
 
Computer Components
Computer ComponentsComputer Components
Computer ComponentsBeth Sockman
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game EngineDiksha Bhargava
 
0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlabNational Cheng Kung University
 
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...Intel® Software
 
Y1 gd engine_terminology (1) (4)
Y1 gd engine_terminology (1) (4) Y1 gd engine_terminology (1) (4)
Y1 gd engine_terminology (1) (4) TomCrook
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systemsanishgoel
 
0xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp020xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp02chon2010
 

Similar to Retrobjects - Fun with C64 and NES (20)

PERIPHERAL DEVICES
PERIPHERAL DEVICESPERIPHERAL DEVICES
PERIPHERAL DEVICES
 
Hardware & software in multimedia
Hardware & software in multimediaHardware & software in multimedia
Hardware & software in multimedia
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
 
Assignment instructions
Assignment instructionsAssignment instructions
Assignment instructions
 
Readme
ReadmeReadme
Readme
 
Introduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & ComponentsIntroduction to Game Engine: Concepts & Components
Introduction to Game Engine: Concepts & Components
 
Engineterminoligy finished
Engineterminoligy finishedEngineterminoligy finished
Engineterminoligy finished
 
Ch2 pc-components-features-and-system-design
Ch2 pc-components-features-and-system-designCh2 pc-components-features-and-system-design
Ch2 pc-components-features-and-system-design
 
Whyp97
Whyp97Whyp97
Whyp97
 
Mp3 player project presentation
Mp3 player project presentationMp3 player project presentation
Mp3 player project presentation
 
Embest s3 cev40 _neomore
Embest s3 cev40 _neomoreEmbest s3 cev40 _neomore
Embest s3 cev40 _neomore
 
Computer Components
Computer ComponentsComputer Components
Computer Components
 
PRESENTATION ON Game Engine
PRESENTATION ON Game EnginePRESENTATION ON Game Engine
PRESENTATION ON Game Engine
 
0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab
 
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
Simple Single Instruction Multiple Data (SIMD) with the Intel® Implicit SPMD ...
 
Y1 gd engine_terminology (1) (4)
Y1 gd engine_terminology (1) (4) Y1 gd engine_terminology (1) (4)
Y1 gd engine_terminology (1) (4)
 
Introduction To Embedded Systems
Introduction To Embedded SystemsIntroduction To Embedded Systems
Introduction To Embedded Systems
 
0xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp020xdroid osdc-2010-100426084937-phpapp02
0xdroid osdc-2010-100426084937-phpapp02
 
09. User Input
09. User Input09. User Input
09. User Input
 
TS-1679 Excerpt
TS-1679 ExcerptTS-1679 Excerpt
TS-1679 Excerpt
 

More from ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

More from ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Retrobjects - Fun with C64 and NES

  • 2. What is it? A collection of software emulators A software emulator is a computerprogram that imitates an electronicdevice or another program. Examples: DOSBox MAME 2
  • 3. What is it? 1º - A Commodore 64emulator 3
  • 4. What is it? 2º - A NintendoEntertainmentSystem (NES) emulator 4
  • 5. Whatisit? 3º - A set of abstractions,components, and toolsthat can behelpfulformakingotheremulators(WIP) FRAMEWORK … … ? 5
  • 7. Motivations I noticed that: People always choose statically-typedlanguages for making them. Proceduraldesigns are preferedwhencomparedtoobject-orienteddesigns. Whyisthat? Performance issues. Isthatreally a problemnowadays? 7
  • 8. Goals Whatdid I wanttoaccomplish? Writeeverything in Smalltalk! . OO design first, then think about performance. Recreatethefeeling of the original machines Highqualityemulation. Createaneasyto useframeworkforwritingcomputer & gameconsoleemulators 8
  • 10. Thesystementities A common C64 system has: 10
  • 12. Groups of entities Objectsfor translation User’s IO devices Thesystementities 12
  • 13. Groups of entities Thesystemmodel Theuser’s IO devices Theobjectsthatallowcommunicationbetweenthetwoworlds 13
  • 14. Thesystemmodel POWER SUPPLY PERIPHERALS MAIN UNIT SOFTWARE MEDIA 14
  • 15. Thesystemmodel Thepowersupply Implementsthe concept of “keepingalive”electricaldevices Works at a specifiedfrequency Manydevices can bepluggedtoit It’simplementedwith aSmalltalkprocess 15
  • 17. Thesystemmodel The C64 architecture (simplified) CPU (MOS 6510) Address decoder IO CHIPS MEMORIES Video chip MOS 6569 R E G Mainmemory (64K RAM) Color (?K RAM) Sound chip MOS 6581 R E G Basic (?K ROM) R E G Kernal (?K ROM) CIA 1 Char (?K ROM) R E G CIA 2 17
  • 18. Thesystemmodel The NES architecture (simplified) CPU (MOS 6502) Address decoder Color palette (32 bytes RAM) IO CHIPS MEMORIES Video chip PPU R E G Characterinternalmemory (2K RAM) Memoryprovided bythecartridge Sound chip APU R E G R E G Sprite RAM (256 bytes) DMA R E G IO 18
  • 19. Thesystemmodel How do the machines work? The CPU isclockedbythepowersupply The CPU readsfrom and writestothe bus ie: at:anAddressput:aNumber Addressdecoder: Addressinterval -> Chip (16r0000-16r7FFF) -> RAM (0000-7FFF) (16r8000-16r800F) -> Video chip (0000-000F) Theselected chip getstherequest,and theregisters interface mapitintoanaction. 19
  • 22. The Video system RETROBJECTS SIDE DEVELOPER ONLYNEEDS TO IMPLEMENT THESE TWO OBJECTS Palette Thesystemmodel Powersource Video chip Frame buffer Color generator External interface TV Converter 22
  • 23. The Audio system RETROBJECTS SIDE Buffer Strategy Thesystemmodel External interface Power source Sound chip Sampler Speaker DEVELOPER ONLYNEEDS TO IMPLEMENT THIS OBJECT 23
  • 24. The Input system OUTSIDE RETROBJECTS RETROBJECTS Thesystemmodel Representation of user’s keyboard User presses The ‘A’ key External interface C64 keyboard Adaptor DEVELOPER ONLYNEEDS TO IMPLEMENT THESE TWO OBJECTS 24
  • 25. Groups of entities Thesystemmodel Theuser’s IO devices Theobjectsthatallowcommunicationbetweenthetwoworlds 25
  • 26. Theuser’s IO devices External interfaces: FMODEx SDL & xffd SDL & OpenGL Files 26
  • 27. Groups of entities Thesystemmodel Theuser’s IO devices Theobjectsthatallowcommunicationbetweenthetwo “worlds” 27
  • 28. Translationobjects Loaders Take a file and convertsitintothe actualsoftware media, ie: T64, PRG, TAP. Adaptors Take a user input event and convertsitintoanaction in themodel. ie: User’skeypress -> C64 keypress TheGUIs 28
  • 29. There are lots of thingsthatcouldbereusedonotheremulators! 29
  • 30. Theframework Someabstractions: Devices I/O chips Sound chips Video chips Schedulingprocess 30
  • 31. The framework Somecomponents: TV, speaker, powersupply Digital pins, one-way and bi-directionalports Addressdecoders: mapping, bank-switching,mirroring Memories: RAM, ROM and registers Stroberegisters Counters and comparators Buttons and switches Video filters, samplers, etc. 31
  • 32. Theframework Tools: Notmany so far Goal: More interactivedevelopment,doinglessprogramming. 32
  • 33. Conclusions Smalltalk can do that, too!  The Smalltalk environment is idealfor modeling hardware. Profiling is the key for getting greatperformance without compromisingthe design. 33
  • 34. Future works Make it cross-platform Make it run in Mac & Linux Keepimprovingtheemulators. Keepevolvingtheframework. Documentation, please! No tests  Make more emulators! 34
  • 36. THANK YOU! Gabriel Honoré ghonore@gmail.com http://www.zeek-it.com.ar/retrobjects/ 36