SlideShare a Scribd company logo
1 of 68
BYO Java RetroPi Console
Stephen Chin (@steveonjava)
Lead Java Community Manager
JavaOne Conference Co-Chair
Java Community Management is pretty hard…
314
Java User Groups 9M+Java
Developers
150+ 150+
Java Champions
50+ JUG groups
contributing
to JCP
2
Community
3
NEW CHALLENGER!!!
Emulating the NES is a real challenge!
826
ROMs to Test
Plus Homebrew!
92M
61 Million Units
Sold Worldwide
3,510
Transistors
Synchronization
Points
4
Nintendo
Entertainment
System
https://commons.wikimedia.org/wiki/File:RP2A07.jpg
5
6
7
Up-Up-Down-Down-Left-Right-
Left-Right B, A, Start
8
9
Electronics
10
https://commons.wikimedia.org/wiki/File:Raspberry_Pi_2_Model_B_v1.1_front_angle_new.jpg
=
Have Java With Your Dessert
http://elinux.org/File:Raspi-Model-AB-Mono-2-699x1024.png
And what are these for?
http://i.imgur.com/k0Puu.jpg
Portable Display Options
Graphics Bus Quality Speed Power Usage
Composite Low Fast High
HDMI High Fast High
SPI High Slow Low
Device Tree High Fast Low
14
Adafruit Kippah
• Connects to 40 pin LCD connector
• Connects display via Device Tree GPIO
• Powers Display off Raspberry Pi 5V VCC
• Optional touch support via USB
• Uses I2C, UART, and SPI pins… only 6 GPIO left over
15
NES Controller
16
1
2
3
45
6
7
8
17
Diodes to the Rescue!
19
Left
Right
Start
20
Button Layout
21
Soldering to the Kippah
22
All Wires Connected
23
24
Java HalfNes Emulator
25
HalfNes Project
26
https://github.com/andrew-hoffman/halfnes
27
28
29
30
32
Which Are the Real Performance Bottlenecks?
• Swing Video via X-Windows
• Synchronization between CPU, PPU, APU
– Return to per-line instead of per-pixel
• Bitwise Helper Functions
• Extracting PPU Operations
• Replace APU Double Math with Longs
• Array Access via Unsafe
• Replace loops with System.arraycopy
• PWM Audio
33
HalfNes Performance Bottlenecks
• Swing Video via X-Windows
• Synchronization between CPU, PPU, APU
– Return to per-line instead of per-pixel
• Bitwise Helper Functions
• Extracting PPU Operations
• Replace APU Double Math with Longs
• Array Access via Unsafe (Doesn't actually help)
• Replace loops with System.arraycopy
• PWM Audio
34
3D Printing a Case
35http://vidal-design.deviantart.com/art/Mario-Versus-Bullet-Bill-3D-printed-402524749
Ultimaker 2
36
37
38
39
40
Hinge Design
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Instructions on Thingiverse
69
http://www.thingiverse.com/thing:993901
Raspberry Pi with Java
70
raspberrypiwithjava.com
Stephen Chin
tweet: @steveonjava
blog: http://steveonjava.com
nighthacking.com
Real Geeks
Live Hacking
NightHacking Tour
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
72

More Related Content

What's hot (6)

Intro to Asha UI
Intro to Asha UIIntro to Asha UI
Intro to Asha UI
 
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
Developing applications and games in Unity engine - Matej Jariabka, Rudolf Ka...
 
Accelerate Game Development and Enhance Game Experience with Intel® Optane™ T...
Accelerate Game Development and Enhance Game Experience with Intel® Optane™ T...Accelerate Game Development and Enhance Game Experience with Intel® Optane™ T...
Accelerate Game Development and Enhance Game Experience with Intel® Optane™ T...
 
Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*Forts and Fights Scaling Performance on Unreal Engine*
Forts and Fights Scaling Performance on Unreal Engine*
 
Unit 5 Project - Babeli
Unit 5 Project - BabeliUnit 5 Project - Babeli
Unit 5 Project - Babeli
 
The Ring programming language version 1.5.1 book - Part 45 of 180
The Ring programming language version 1.5.1 book - Part 45 of 180The Ring programming language version 1.5.1 book - Part 45 of 180
The Ring programming language version 1.5.1 book - Part 45 of 180
 

Viewers also liked

Raspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsRaspberry pi gaming 4 kids
Raspberry pi gaming 4 kids
Stephen Chin
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Bruno Borges
 

Viewers also liked (20)

Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)
 
Devoxx4Kids NAO Workshop
Devoxx4Kids NAO WorkshopDevoxx4Kids NAO Workshop
Devoxx4Kids NAO Workshop
 
JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)JavaFX on Mobile (by Johan Vos)
JavaFX on Mobile (by Johan Vos)
 
Raspberry pi gaming 4 kids
Raspberry pi gaming 4 kidsRaspberry pi gaming 4 kids
Raspberry pi gaming 4 kids
 
Raspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch VersionRaspberry Pi Gaming 4 Kids - Dutch Version
Raspberry Pi Gaming 4 Kids - Dutch Version
 
JavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring FrameworkJavaFX 2 Using the Spring Framework
JavaFX 2 Using the Spring Framework
 
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
 
Internet of Things Magic Show
Internet of Things Magic ShowInternet of Things Magic Show
Internet of Things Magic Show
 
JavaFX and Scala in the Cloud
JavaFX and Scala in the CloudJavaFX and Scala in the Cloud
JavaFX and Scala in the Cloud
 
Mary Had a Little λ (QCon)
Mary Had a Little λ (QCon)Mary Had a Little λ (QCon)
Mary Had a Little λ (QCon)
 
Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)Raspberry Pi with Java (JJUG)
Raspberry Pi with Java (JJUG)
 
Raspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXRaspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFX
 
DukeScript
DukeScriptDukeScript
DukeScript
 
Confessions of a Former Agile Methodologist
Confessions of a Former Agile MethodologistConfessions of a Former Agile Methodologist
Confessions of a Former Agile Methodologist
 
Hacking JavaFX with Groovy, Clojure, Scala, and Visage
Hacking JavaFX with Groovy, Clojure, Scala, and VisageHacking JavaFX with Groovy, Clojure, Scala, and Visage
Hacking JavaFX with Groovy, Clojure, Scala, and Visage
 
Zombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the UndeadZombie Time - JSR 310 for the Undead
Zombie Time - JSR 310 for the Undead
 
OpenJFX on Android and Devices
OpenJFX on Android and DevicesOpenJFX on Android and Devices
OpenJFX on Android and Devices
 
Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7Building Java Desktop Apps with JavaFX 8 and Java EE 7
Building Java Desktop Apps with JavaFX 8 and Java EE 7
 

Similar to RetroPi Handheld Raspberry Pi Gaming Console

May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-opt
Jeff Larkin
 
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptxPumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Amit Tripathi
 

Similar to RetroPi Handheld Raspberry Pi Gaming Console (20)

Possibilities of generative models
Possibilities of generative modelsPossibilities of generative models
Possibilities of generative models
 
QCon London.pdf
QCon London.pdfQCon London.pdf
QCon London.pdf
 
AI Food detector; A model of Generative adversarial network for food Classifier
AI Food detector; A model of Generative adversarial network for food ClassifierAI Food detector; A model of Generative adversarial network for food Classifier
AI Food detector; A model of Generative adversarial network for food Classifier
 
How shit works: the CPU
How shit works: the CPUHow shit works: the CPU
How shit works: the CPU
 
The Spectre of Meltdowns
The Spectre of MeltdownsThe Spectre of Meltdowns
The Spectre of Meltdowns
 
Practical SPU Programming in God of War III
Practical SPU Programming in God of War IIIPractical SPU Programming in God of War III
Practical SPU Programming in God of War III
 
4667031.ppt
4667031.ppt4667031.ppt
4667031.ppt
 
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
[Pycon 2015] 오늘 당장 딥러닝 실험하기 제출용
 
Real time emotion recognition during presentations - Artemii Frolov
Real time emotion recognition during presentations - Artemii FrolovReal time emotion recognition during presentations - Artemii Frolov
Real time emotion recognition during presentations - Artemii Frolov
 
story_of_bpf-1.pdf
story_of_bpf-1.pdfstory_of_bpf-1.pdf
story_of_bpf-1.pdf
 
2018 02 20-jeg_index
2018 02 20-jeg_index2018 02 20-jeg_index
2018 02 20-jeg_index
 
Convolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision ApplicationsConvolutional Neural Networks for Computer vision Applications
Convolutional Neural Networks for Computer vision Applications
 
Gömülü Sistemlerde Derin Öğrenme Uygulamaları
Gömülü Sistemlerde Derin Öğrenme UygulamalarıGömülü Sistemlerde Derin Öğrenme Uygulamaları
Gömülü Sistemlerde Derin Öğrenme Uygulamaları
 
Parallelism in a NumPy-based program
Parallelism in a NumPy-based programParallelism in a NumPy-based program
Parallelism in a NumPy-based program
 
Practical Volume Rendering for realtime applications
Practical Volume Rendering for realtime applicationsPractical Volume Rendering for realtime applications
Practical Volume Rendering for realtime applications
 
look inside your (Liferay) portal
look inside your (Liferay) portallook inside your (Liferay) portal
look inside your (Liferay) portal
 
On-the-fly Visual Category Search in Web-scale Image Collections
On-the-fly Visual Category Search in Web-scale Image CollectionsOn-the-fly Visual Category Search in Web-scale Image Collections
On-the-fly Visual Category Search in Web-scale Image Collections
 
Parallelformers
ParallelformersParallelformers
Parallelformers
 
May2010 hex-core-opt
May2010 hex-core-optMay2010 hex-core-opt
May2010 hex-core-opt
 
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptxPumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
Pumping stationone20140628 real-timeprogrammingwithbeaglebonepr_us.pptx
 

More from Stephen Chin

More from Stephen Chin (8)

DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2DevOps Tools for Java Developers v2
DevOps Tools for Java Developers v2
 
10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community10 Ways Everyone Can Support the Java Community
10 Ways Everyone Can Support the Java Community
 
Java Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive GuideJava Clients and JavaFX: The Definitive Guide
Java Clients and JavaFX: The Definitive Guide
 
DevOps Tools for Java Developers
DevOps Tools for Java DevelopersDevOps Tools for Java Developers
DevOps Tools for Java Developers
 
Java Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJCJava Clients and JavaFX - Presented to LJC
Java Clients and JavaFX - Presented to LJC
 
Java 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and LegosJava 8 for Tablets, Pis, and Legos
Java 8 for Tablets, Pis, and Legos
 
LUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi HackingLUGOD Raspberry Pi Hacking
LUGOD Raspberry Pi Hacking
 
Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5Moving to the Client - JavaFX and HTML5
Moving to the Client - JavaFX and HTML5
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
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)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.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
 
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
 

RetroPi Handheld Raspberry Pi Gaming Console

Editor's Notes

  1. You would think easy because 2D and slow CPU No because mappers Separate buses for PPU and CPU, everything is memory mapped, need to emulate all accesses bankswitching program code and graphics in the middle of the screen sometimes even inside a line makes static recompilation impossible sloppy and clever coding synchronization Quirky hardware and analog effects (that flickering line in Super Mario Bros only happens when a register is written to during a single specific pixel) Input and video lag and synchronization
  2. The Raspberry Pi is a single board computer developed in UK by Raspberry Pi Foundation with the intention to stimulate the teaching of basic computer science in schools. It has a slightly slower ARM processor (ARMv6 700Mhz), but a better GPU than the BeagleBoard. Connectivity is via HDMI/Component, USBx2, Ethernet, and Audio out.
  3. Specs: 700 Mhz ARM1176JZF-S core, Broadcom VideoCore IV, OpenGL EX 2.0 512mb RAM, 3.5Watts@5v, 8 x GPIO, UART, I2C bus, SPI bus 2 USB 2.0, SD / MMC / SDIO, 10/100 Ethernet HDMI, DSI, Composite VideoCore IV, 3.5 mm Audio Jack Cost $35 + Shipping
  4. Swing video is slow at scaling output, not done in hardware on Linux, unnecessary buffer copies -> switch to JavaFX Synchronization wastes time constantly context switching, 90% of games don't need it Use of GetBit everywhere to make writing it easier but it wasn't being optimized out Double and Long math are same speed on PC but not Pi