Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

RetroPi Handheld Raspberry Pi Gaming Console

2,514 views

Published on

In this session I will walk you through how to build your own retro handheld console that is powered by Java, runs on a Raspberry Pi, and is printed on a 3D printer. Some of the topics that we will cover along the journey include:
• Hacking Java on the Raspberry Pi
• Rigging input devices with Pi4J
• Insane performance tuning on the JVM
• Why your boss [or SO] needs to buy you a 3D printer!

And of course your retro gaming mettle will be put to the test, so make sure to dust off your old 8 and 16 bit consoles to prepare.

This presentation is about the most fun you can have while still legitimately calling this conference “work.” In fact, I will hopefully inspire you to do your own creative “work” leveraging Java and Raspberry Pi to hack the real world.

Published in: Technology
  • Be the first to comment

RetroPi Handheld Raspberry Pi Gaming Console

  1. 1. BYO Java RetroPi Console Stephen Chin (@steveonjava) Lead Java Community Manager JavaOne Conference Co-Chair
  2. 2. 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. 3. 3 NEW CHALLENGER!!!
  4. 4. 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. 5. 5
  6. 6. 6
  7. 7. 7
  8. 8. Up-Up-Down-Down-Left-Right- Left-Right B, A, Start 8
  9. 9. 9
  10. 10. Electronics 10
  11. 11. https://commons.wikimedia.org/wiki/File:Raspberry_Pi_2_Model_B_v1.1_front_angle_new.jpg = Have Java With Your Dessert
  12. 12. http://elinux.org/File:Raspi-Model-AB-Mono-2-699x1024.png
  13. 13. And what are these for? http://i.imgur.com/k0Puu.jpg
  14. 14. 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
  15. 15. 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
  16. 16. NES Controller 16 1 2 3 45 6 7 8
  17. 17. 17
  18. 18. Diodes to the Rescue! 19 Left Right Start
  19. 19. 20
  20. 20. Button Layout 21
  21. 21. Soldering to the Kippah 22
  22. 22. All Wires Connected 23
  23. 23. 24
  24. 24. Java HalfNes Emulator 25
  25. 25. HalfNes Project 26 https://github.com/andrew-hoffman/halfnes
  26. 26. 27
  27. 27. 28
  28. 28. 29
  29. 29. 30
  30. 30. 32
  31. 31. 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
  32. 32. 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
  33. 33. 3D Printing a Case 35http://vidal-design.deviantart.com/art/Mario-Versus-Bullet-Bill-3D-printed-402524749
  34. 34. Ultimaker 2 36
  35. 35. 37
  36. 36. 38
  37. 37. 39
  38. 38. 40
  39. 39. Hinge Design 42
  40. 40. 43
  41. 41. 44
  42. 42. 45
  43. 43. 46
  44. 44. 47
  45. 45. 48
  46. 46. 49
  47. 47. 50
  48. 48. 51
  49. 49. 52
  50. 50. 53
  51. 51. 54
  52. 52. 55
  53. 53. 56
  54. 54. 57
  55. 55. 58
  56. 56. 59
  57. 57. 60
  58. 58. 61
  59. 59. 62
  60. 60. 63
  61. 61. 64
  62. 62. 65
  63. 63. 66
  64. 64. 67
  65. 65. Instructions on Thingiverse 69 http://www.thingiverse.com/thing:993901
  66. 66. Raspberry Pi with Java 70 raspberrypiwithjava.com
  67. 67. Stephen Chin tweet: @steveonjava blog: http://steveonjava.com nighthacking.com Real Geeks Live Hacking NightHacking Tour
  68. 68. 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

×