Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can absolutely page in data from Flash memory as needed, it's just non-trivial (and not handled by the "OS"). On devices with flash memory as an extension of RAM (TI 83+, 89, and 89 titanium), this could help for read-only level data that isn't needed all of the time.

Edit: Of course, Joltima targets the TI-83 (different from the 83+), which doesn't have any flash memory. Bravo, Justin Karneges.



You can also go the "App" route and make the whole thing an application that runs straight from flash.

Advantages are you can use many flash pages so your application can be massive, and your program will be easier to launch/distribute. We have the App signing keys so these days this route is pretty simple.

On the other hand you have to "allocate" ram to write to or scrounge for ram in predetermined areas in the address space. With regular assembly programs you can have "static" allocations that you can write to. Also programs don't take up a minimum of a single page, so they are generally preferred by people who are more comfortable with their calculator.

Damn, now I really want to revisit that z80 scheme implementation I was working on a few years ago...


Paging really, really sucks to manage on a TI calculator.

That being said, I loved working with the 32KB limit and optimizing every single byte out of my code. You got to learn all of the tricks like "XOR A" = 1 byte vs "LD A,0" = 2 bytes. However, some things sucked, like having to frequently write new sprite routines or tilemap scroller routines. I even ended up writing a logo style scripting language to handle animations in a RPG just to save a few KB.

Yes, this is clearly the 3% case for Knuth's quote, "... 97% of the time: premature optimization is the root of all evil"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: