Collaboration

Fantasy Console

5

McPepic 2024-02-28 20:12 (Edited)

Hey guys!
I’ve begun work on a fantasy console I’m designing to run inside of LowRes, but I could use some help with it.
If you have any questions, ideas, or suggestions for it, that would be appreciated!

Update:
'256 BYTE MEMORY
'4-BIT COLOR (BRGG)
'CUSTOM INSTRUCTION SET
'PROGRAMS WRITTEN IN BINARY (MIGHT MAKE AN ASSEMBLER)
'8-BIT ALU
'2-CHANNELS, SQUARE WAVE - FREQENCY, PULSE WIDTH, VOLUME
'GAMEPAD, A & B BUTTONS
'CARTIDGE: 256 64-BYTE BANKS ($00-$FF). BANKS $00 & $01 LOADED ON STARTUP
' SETTING THE BANK WILL COPY THE DATA FROM THE ROM TO ACCESSIBLE MEMORY.
' THIS DATA CAN BE MODIFIED BUT WILL BE RESET WHEN THE BANK IS SWITCHED.
'SCREEN 56X56 PIXELS (8 PIXELS HIDDEN ON RIGHT AND BOTTOM OF "PLAYFIELD" TO HIDE GRAPHICS)
'GRAPHICS DATA CAN BE CHANGED WHILE RASTER IS DRAWN (AKIN TO THE ATARI 2600).
' BG COLOR VALUES WILL BE DRAWN THE SAME FOR EVERY ROW OF PIXELS UNTIL DATA IS CHANGED.
' SPRITES ARE ALL 8X1 PIXELS 1 BIT PER PIXEL. CAN BE MOVED FREELY AROUND THE SCREEN.
'TIMING:
'4,096 CC, 60 FPS - 245,760 HZ CLOCK | HBLANK: 8 CC, VBLANK: 512 CC, SCREEN: 3,576 CC
'
'MEMORY:
' PROGRAM: - 128 BYTES
' BANK 0: 64 BYTES
' BANK N: 64 BYTES
' 16 SPRITES: - 48 BYTES
' BIT PATTERN: 8 BITS
' X POSITION: 6 BITS
' Y POSITION: 6 BITS
' COLOR: 4 BITS
' BACKGROUND X8: - 4 BYTES
' COLOR: 4 BITS
' BG SCROLL: - 1 BYTE
' AUDIO REGISTERS: - 4 BYTES
' CHANNEL 1:
' FREQUENCY: 1 BYTE
' PULSE WIDTH: 4 BITS
' VOLUME: 4 BITS
' CHANNEL 2:
' FREQUENCY: 1 BYTE
' PULSE WIDTH: 4 BITS
' VOLUME: 4 BITS
' INPUT REGISTERS: - 1 BYTE
' GAMEPAD: 4 BITS
' BUTTONS: 2 BITS
' COUNTERS: - 5 BYTES
' SOUND TIMER 1: 1 BYTE
' SOUND TIMER 2: 1 BYTE
' GENERAL TIMER: 1 BYTE
' ROW: 6 BITS
' COLUMN: 6 BITS
' BANK: - 1 BYTE
' WRAM: - 48 BYTES
' STACK: - 16 BYTES


nathanielbabiak 2024-02-28 21:48 (Edited)

Check out Chip-8, just for some background reading. It's also on the discord.

https://en.m.wikipedia.org/wiki/CHIP-8

You should also try to mimic the LowRes NX architecture in your fantasy console, looks like you're down that path already.

Honestly, getting Chip-8 working was a pain, since it doesn't follow the architecture of LowRes NX at ALL.


nathanielbabiak 2024-02-29 05:34 (Edited)

Here's the specific links I mentioned.

A fantasy console: https://lowresnx.inutilis.com/topic.php?id=2135

A Chip-8 console: https://lowresnx.inutilis.com/topic.php?id=1648

My super chip-8 console, developer version: https://lowresnx.inutilis.com/topic.php?id=2217

My super chip-8 console, play version with 11 fully-working (!) games: https://lowresnx.inutilis.com/topic.php?id=2214

The discord I mentioned, if you're not there already.
https://discord.com/channels/938150270804820078/939245951078502472


McPepic 2024-02-29 16:40

Thanks, Nathan! I appreciate the help!


McPepic 2024-02-29 22:12

Discord link's not working BTW.


nathanielbabiak 2024-03-01 02:28

I just grabbed that address off my web browser. Search this forum for the word discord, and there's maybe a half dozen links in just a few posts. They all go to the app for me, idk why the address doesn't work?


McPepic 2024-03-01 19:43

Link didn't work because I hadn't gotten an invite. Now that I have it on the server list the link works.


McPepic 2024-03-05 20:54

I see why checking for timing is important to do before you get too far into a project. This timing gives me about 17 cycles to update the registers, draw the pixel, and run the next instruction. It's taking about 256 times that number of clock cycles and I don't even have the CPU implemented yet! I might have to shelve this project.


nathanielbabiak 2024-03-06 03:28 (Edited)

Just from the terms you're using (not from what you've written explicitly) it seems like you're trying to write the hardware emulation too close to bare metal; if that makes any sense? (Maybe it doesn't?) Try developing an interpreter instead.

You can check out my schip play (not dev) upload and use the menu to adjust the number of instructions per second.

For the default game, where you control an ant, the speed is 1800 instructions/second. But, in the menu, you can adjust the speed up to 3600 and the game just goes faster. Beyond 3600 though, the interpreter just max's out.


McPepic 2024-03-06 12:51

I was trying to model it after the Atari 2600, but I definitely agree that speed is just always going to be a concern when writing the program so close to the hardware. I’ll workshop it a bit. Thanks for the help!


McPepic 2024-03-06 15:00

Still don’t have the CPU implemented, but I did get the frame down to use only 74 LowRes frames.


Log in to reply.