Jump to content


TechBlog 95 - Creating a C64 emulator in GameMaker

  • Please log in to reply
5 replies to this topic

#1 Mike.Dailly


    Evil YoYo Games Employee

  • Administrators
  • 5277 posts
  • Version:GM:Studio

Posted 31 December 2014 - 12:11 PM

Part 1 - https://www.yoyogames.com/tech_blog/95



So I started this very much in the "can you even do this" spirit, and have been surprised how much I've been able to do with it. Sure, it does require YYC, but as YYC is now available to everyone, then I no longer see that as a dependency, but just another tool in the GameMaker box. There are several complications in even trying this, but the CPU emulation is "just" a program so should work easily enough, while rendering emulated memory is a tough nut to crack - but we'll come to that in a later part. The reason for writing these posts, is that I've come up with some interesting tricks to over come some GameMaker limitations - as well as good tricks to just help speed up your code (much as you would in any language). So I thought it would be a good idea to share them.

Still, enough of all that, what exactly IS an emulator, and how does all this work?

Okay... so the goal behind any emulator is to be able to play the BINARY files from the original machine, directly. These file are always assembly level instructions so if you're unfamiliar with assembler, let me give you a VERY quick overview of 8 bit assembly. Memory on 8 bit machines can store BYTES, values from 0 to 255. A 64K machine like the Commodore64..............




EDIT: I've updated this entry a little, with some new info on SWITCH() statements we've discovered.....

  • 20

#2 ShadeSpeed


    Procedural Generation King

  • GMC Member
  • 771 posts
  • Version:GM:Studio

Posted 31 December 2014 - 12:33 PM

Absolutely superb read! Can't wait for the next post. 

  • 0

Marketplace Resources


code.png page.png video.png

#3 faissialoo


    I get high on orange

  • GMC Member
  • 1372 posts
  • Version:GM:Studio

Posted 31 December 2014 - 06:06 PM

This is too awesome

  • 0

The YYGF subreddit: /r/YYGF

#4 lordvtp


    GMC Member

  • GMC Member
  • 785 posts
  • Version:GM:Studio

Posted 31 December 2014 - 09:32 PM


  • 3



#5 GameGoblin


    GMC Member

  • GMC Member
  • 4325 posts
  • Version:GM:Studio

Posted 01 January 2015 - 07:51 AM

Fantastic! Love it forever. I must say, it's really very good.
  • 0

#6 RujiK


    GMC Member

  • GMC Member
  • 841 posts
  • Version:GM:Studio

Posted 02 January 2015 - 04:27 PM

This is so beautiful it makes me cry.





  • 3