Skip to content

A fun little proof of concept for mGBA-http where it takes in your CPU usage as what button to press.

License

Notifications You must be signed in to change notification settings

nikouu/CPU-Plays-Pokemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU Plays Pokemon

A fun little proof of concept for mGBA-http where it takes in your CPU usage as what button to press.

cpuplaysshort.mp4

Video is sped up.

How it works

Every second:

  1. The CPU usage is checked
  2. Some maths then the usage is mapped to a key
  3. The key is sent to mGBA-http and onwards to mGBA

How to run

  1. Have mGBA up and running
  2. Get and setup mGBA-http
  3. Get this project
  4. Run this project (either in Visual Studio/your IDE of choice, or with dotnet run)

Interesting bits

  • Uses the new PeriodicTimer object
  • The maths for the value to modulo is a mixture of both the whole and fraction because:
    • If just the whole value is used, then there may not be enough variation in CPU usage to modulo for all the keys
    • If it's just the fraction, the trailing zero is cut off, meaning we never get the A key
  • PerformanceCounter is now a NuGet package

Timelapse

The following is a whole hour of "playing" and "progress":

cpuplayslong.mp4

About

A fun little proof of concept for mGBA-http where it takes in your CPU usage as what button to press.

Topics

Resources

License

Stars

Watchers

Forks

Languages