LOG 3: ROM LOADER, GRAPHICS ENGINE, KEYBOARD, FONTSET, TEST CODE
FOREWORD
FEATURES
I kinda didnt click post on my last devlog which is why this is a combination of two devlogs but ig this has to suffice
ROM LOADER
I implemented a rom loader that opens and copies roms (.ch8 files) and then executes their instructions when the program runs. The rom reader opens the file with fopen and reads them into memory using fread once.
GRAPHICS ENGINE
I use my (beloved) ncurses for graphics and a function is called every cycle to print out the graphics on the 64x32 screen using either # for spots where the graphic display is true and ’ ’ for spots where it isnt
KEYBOARD
The keyboard uses getch that doesnt stop the loop but rather just listens for input and then sets the keyboard value of the pressed button to true
FONTSET
The fontset is pretty basic (its just an array of the standard chip-8 fontset that gets loaded into the memory array starting from 0x50)
TEST CODE
Ive written some very basic test code for testing purposes. Current functions are printing to the screen, setting variables and printing when a button is pressed. I coded the code in hex and used hexed.it to convert the hex code into .ch8 files
BUG FIXES
Luckily there where no major bugs previously in the code (there wasnt that much to be buggy) but obviously there where issues on the way to the current code. Because i dont remember everything i fixed on the way i wont list it in todays devlog (overall i just list bugs if they where in a previious commited/devlogged version)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.