Working RAM?


Seba06 2020-05-07 01:11

What does it do and what happens if we poke it with a stick?

nousername010 2020-05-07 01:31

From my observation with the pre-built BG and Char tools Timo made, I suspect it's the memory of the ROM that was loaded. I guess it's used by tools to load a ROM on it, edit it, save it, and overwrite the loaded ROM.

Seba06 2020-05-07 01:46 (Edited)

I’ve done some experiments and it seems that it’s pretty much empty, maybe it’s just a place of memory you can edit at you hearts content to store non-persistent data

nathanielbabiak 2020-05-07 01:47

I presume you're asking about the 16kB of RAM at $A000? You can also use it for VBL and raster effects, or for temporary copies of char/BG data or registers. I haven't noticed any other interesting uses for it though, but I haven't been looking very hard either!

was8bit 2020-05-07 03:30

Hardware Reference

Memory Map

$0000 - Cartridge ROM (32 KB)

$8000 - Character Data (4 KB)
$9000 - BG0 Data (2 KB)
$9800 - BG1 Data (2 KB)

$A000 - Working RAM (16 KB)

$E000 - Persistent RAM (4 KB)

$FE00 - Sprite Registers (256 B)
$FF00 - Color Registers (32 B)
$FF20 - Video Registers
$FF40 - Audio Registers
$FF70 - I/O Registers

was8bit 2020-05-07 03:32

Check this out....

Having absolutely NO starting character graphics and no sound data, with only POKE I have created this....


was8bit 2020-05-07 03:37

Also, using PEEK you can get real time feedback on things like sounds and create visual animations that respond in real time to the sounds being played...


was8bit 2020-05-07 03:42

If you have a game where the background IS the game status (say, a city a player built) you can use COPY to save the background ie game status to PERISTENT RAM which saves the game, and use COPY to reload persistent to background memory to reload the game to continue playing it

was8bit 2020-05-07 03:44

COPY with some clever use, can be used to reload from files a new Character set, a new background set, a new palette set... all while the game is still playing...

Flyingpizza264 2020-05-07 04:52

So basically just don’t worry about it. It’s there and it’s scary but you keep it. You keep it there so that way nothing more scary will take it’s place.

was8bit 2020-05-07 05:04

Very true... you can make games just fine without ever having to worry about working ram :)

Timo 2020-05-07 06:11

Working RAM has no specific function, you can do with it whatever you want. In a real console you would have variables there, but in NX they are handled internally. But it’s still useful:
1. The tools use it for their data, so they can store it using the SAVE command.
2. If you want to modify your ROM data in runtime, you can copy it to working RAM and use it there.

was8bit 2020-05-07 10:33 (Edited)

@Timo, quick question, is it possible to have 2 music files, and switch from one to another in mid game ? I haven't seen yet how to do this if it is possible... not that I need it, I was just curious....

EDIT: found it... if 2nd music file is saved to file 14, then use command SOUND SOURCE ROM(14)

Seba06 2020-05-07 10:53

Ok thanks for confirming it Timo because it’s what I used to store the memory in my Brainfrack program since I couldn’t find any other place to store it. And I like the idea of having a place where I can store data whether it be rom or just some values

was8bit 2020-05-07 10:59

You can create TOOL program that lets someone enter, edit, and save data to a DATA FILE in another program via LOAD SAVE, and then that program can access and use the data in that file via ROM()

Log in to reply.