You can support the development on the Github Sponsors page.


Tools > CHIP-80


A CHIP-8 Interpreter/VM/Emulator
made by The Beesh-Spweesh!
uploaded by StinkerB06
added:
updated:
download cartridge
- CLICK TO PLAY -

4


To load a ROM:
Add your .ch8 ROM file to TIC-80's root cartridge directory. Then, on the TIC-80 command line, type "import map <filename>.ch8". The ROM stored in the map is replaced with the new one.

Controls (QWERTY = CHIP-8):
1-2-3-4 = 1-2-3-C
Q-W-E-R = 4-5-6-D
A-S-D-F = 7-8-9-E
Z-X-C-V = A-0-B-F


*** What's a CHIP-8, you might ask? ***

CHIP-8 is a virtual machine standard that was originally designed for some late 70s computers, starting with the RCA COSMAC VIP kit computer. The VM could use up to 4 KB of RAM and featured rudimentary 64x32 monochrome graphics. The VM implemented a CPU with 16 8-bit general-purpose data registers, a 12-bit program counter, a call stack of at least 12 return addresses, a 12-bit pointer register, an 8-bit 60Hz timer, and access to the system buzzer. It was designed to ease game development for these COSMAC-based systems.

Read more: https://en.wikipedia.org/wiki/CHIP-8


Update 1, released September 25th, 2019:
- Fixed an error with the CALL opcode. Dumb typos. Pong 2 hack now plays.
- Prevent crashing with illegal opcode. Show a little message in the top-left corner instead.
- Re-positioned the CHIP-8 screen to the center, so that it's more comfortable.

Update 2, released September 28th, 2019:
- Stack memory and framebuffer are now independent from main RAM. Fixes Tetris's graphical glitches.
- Added code disassembly view at the bottom.
- More fixes.

Update 3, released November 27th, 2019:
- Forgot to change the number of one of the opcodes in the disassembly view. Fixed now.

Update 4, released August 2nd, 2020:
- OVR() is now being used to upscale the CHIP-8 display area in the TIC() framebuffer, so now I can properly show the screen at 3X scale, making it more comfortable to the eyes. Most drawing API functions in OVR() won't affect the framebuffer, so it doesn't mess with the work area.
- Now using format() with hex formatting, so I can display most registers in hexadecimal. Thanks to someone in Discord for helping me out, I don't understand a lot of this weird formatting stuff!
- Changed the TIC-80 default beeper tone to something more old-school! Why not recreate the RCA Studio II buzzer noise?
- More code optimizations.

Update 5, released November 5th, 2024:
- The screen scaling has been fixed for the latest stable version of TIC-80.
- The disassembly for opcode Fx0A now reports the register about to receive the key code.
- More emulator options have been added, namely scaling factor, stack top limit, and theme color.
- Minor changes.

Comments


masternama

Hmm... I see through code editor looks like hardware?

StinkerB06

Also, I decided to swap out the Pong ROM with a much less boring version.

Stinker2006

Here's my 2nd test account!

StinkerB06

I can't even see the notification about #1926, because on my main account (this one), the notifications page is showing a 502: Bad Gateway error no matter what I do. On my 2nd test account (@Stinker2006), it shows up just fine.

Could mean that my notifications page's data got corrupted (which results in the web server not fetching the page at all), but that's my guess.

masternama

I got Idea!.

Experiment:

Go to Sprite editor. draw a huge draw. Go to Map Editor edit your Map ROM.

Results

ROM gets corrupted while running CHIP-80 virtual machine see got error & Corruption effects.

SergioFLSgd

This is so cool. I've also tried making a CHIP-8 VM on another FC. It booted some programs but i've never got it to work properly.

StinkerB06

@SergioFLSgd Is that fantasy console PICO-8? Or something else?

masternama

Overlay Background?

function OVR()
for y=31,0,-1 do for x=63,0,-1 do
rect(X+x*3,Y+y*3,3,3,pix(X+x,Y+y))
end end

SergioFLSgd

#2879 It's Homegirl.


Post comment