summaryrefslogblamecommitdiffstats
path: root/2020/info/27.md
blob: 08810efca37039237fcaf6da1a1a53bc1cbc3357 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


                                









                                                                                                                                                                                                                







                                                                                                             










                                                                                                                       
                                                                                                                                                                  









                                                                                                                                                                                    
                                                                            





                                                                                         
                                                                                                                                                          
 
                                                                                                                                                                               



                                                                       
                                                                                                                                                                                      



                                                                                          
                                                                          




       

                                                                     
 
                                                             
 

 
 
# State of Retro Gaming in Emacs
Vasilij "wasamasa" Schneidermann

[[!template id=vid src="https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8--vasilij-wasamasa-schneidermann.webm"]]  
[Download .webm video, 720p, 12M](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8--vasilij-wasamasa-schneidermann.webm) 
- [chip8 demo - alien, .webm video, 720p, 2M](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8-demo-alien--vasilij-wasamasa-schneidermann.webm)
- [chip8 demo - brix, .webm video, 720p, 1M](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8-demo-brix--vasilij-wasamasa-schneidermann.webm)
- [chip8 demo - car, .webm, 720p, 1M](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8-demo-car--vasilij-wasamasa-schneidermann.webm)
- [chip8 demo - joust, .webm video, 720p, 2M](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8-demo-joust--vasilij-wasamasa-schneidermann.webm)
- [chip8 demo - kaleidoscope, video, 720p, 2M](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8-demo-kaleidoscope--vasilij-wasamasa-schneidermann.webm)
- [chip8 demo - sierpinski, video, 720p, 357K](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8-demo-sierpinski--vasilij-wasamasa-schneidermann.webm)
- [chip8 demo - tetris, video, 720p, 843K](https://mirror.csclub.uwaterloo.ca/emacsconf/2020/emacsconf-2020--27-state-of-retro-gaming-in-emacs-chip8-demo-tetris--vasilij-wasamasa-schneidermann.webm)

Many jokes have been made about the true nature of Emacs, such as it
being a fully-fledged operating system.  This talk will demonstrate
its suitability for playing retro games, then explore the inner
workings of a [CHIP-8](https://en.wikipedia.org/wiki/CHIP-8) emulator capable of smooth video game emulation.

[1]: <https://depp.brause.cc/talks/chicken-saar/>
[2]: <https://depp.brause.cc/talks/openchaos-2019-11/>

<!-- from the pad --->

-   Actual start and end time (EST): Start 2020-11-29T13.23.01; End: 2020-11-29T13.33.00
-   Alternative stream for extended talk: <http://live.emacsconf.org/alt.html> or <http://live0.emacsconf.org/alt.webm>


# Questions


## Q5: Do you think would be possible to write some compiler in order to write chip-8 games on elisp?

It could be possible if you restrict yourself to some very limited elisp subset or lispy assembler. For the latter, here's some projects to draw inspiration from:

-   <https://ahefner.livejournal.com/20528.html>

-   <http://www.dustmop.io/blog/2019/09/10/what-remains-technical-breakdown/> -> <http://www.pawfal.org/dave/blog/2016/05/a-6502-lisp-compiler-sprite-animation-and-the-nesfamicom/>

-   <https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp> -> <https://blog.jakspeedruns.com/opengoal-project-update-september-2020/>


## Q4:  What's the biggest perf bottleneck for your emulator? does it spend time executing your lisp or something else in the Emacs infrastructure (eg redisplay)?

Redisplay was super slow, it's like 3-4x as slow as executing the CPU cycles

-   Okay that's the reason why Gccemacs does not help :)


## Q3: do you think that you make our tiny console based in the chip ATMega like Arduboy?

I'm sorry, I didn't quite understand the question, could you please clarify it? I'm not exactly a hardware person, might have to defer it to someone else.

I've looked at Arduboy and I believe the DEFCON CHIP-8 Badge is the closest to this: <https://hackaday.io/project/19121-andxor-dc25-badge/log/53223-chip8-schip-game-emulation>


## Q2: Any tutorial to start? I want to make my game now, no, for chip8

I'm not aware of tutorials, but there's CHIP-8 resources online. You can of course study the assembly of existing games, that's how I figured out the tricks that broke my emulator :>


## Q1: How did you manage to present a game engine without showing any game? :-) Show us!!

See the alt stream, it has several demos not shown due to time constraints


# Notes


-  Slides available at <https://depp.brause.cc/talks/emacsconf-2020/>


-  Repository available at <https://depp.brause.cc/chip8.el/>