Project I am working on: Tiny PC Person

Status
Not open for further replies.

jgoewert

Member
Ever since I was a kid, one of my favorite "games" was Little Computer People. I still run in on a C64 emulator and decided that it would be a fun project to create.

I started this project on a Teensy 2.0 and was using an 1024 byte SPI RAM chip and using the SDCard slot for storage to give me enough room to create a framebuffer. I went back to the drawing board with the 3.1, ditched the SPI RAM and the SDCard due to the additional PROGMEM and RAM.

I'm still added more art, but even so, resource use seems quite low for what I have going on so far. I currently use a 4-bit color palette per sprite graphic format similar to the NES and unpack those on the fly when building the framebuffer. I've been thinking of just going straight to storing RGB565 sprites, but when I started the project, storage and memory were a lot more cramped

Here is the current memory usage stats:
Code:
Binary sketch size: 47,516 bytes (of a 262,144 byte maximum)
Estimated memory use: 26,004 bytes (of a 65,536 byte maximum)

I have left my guy running for days with no memory leaks or freezes.

Here is a video demonstration of the project.

 
I currently use a 4-bit color palette per sprite graphic format similar to the NES and unpack those on the fly when building the framebuffer. I've been thinking of just going straight to storing RGB565 sprites, but when I started the project, storage and memory were a lot more cramped

That's pretty cool. I'd be interested in seeing some of the routines if you ever open source it. A framebuffer can take a big chunk of memory, so it is interesting to me to see methods of dealing with this (particularly if multiple render planes are involved, eg. for parallax scrolling or such).
 
Very nice!

Are you using Adafruit's version of the library, or mine with the native SPI speedup?

https://github.com/PaulStoffregen/Adafruit_ST7735

Your Teensy 3.x specific version.

The framebuffer I use is a 4 bit per pixel array is just an 128 x 160 x 4 bpp = 10240 bytes. On the draw, I do a conversion using a palette table to turn it the the RGB565 that the screen requires. I'll get it onto a branch on Github as right now I have it as an extension of the Adafruit_ST7735. I added functions to drawing 1 bpp bitmaps as well. I was just planning on finishing some code to allow palettes to be set be a function instead of only a hard set one and it should be what I considered a minimum viability.
 
Status
Not open for further replies.
Back
Top