Diego's random questions and ramblings

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
User avatar
nicksen782
Posts: 667
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Diego's random questions and ramblings

Post by nicksen782 » Wed Sep 19, 2018 4:23 pm

I have had strong luck with SPIRAM streaming music and also for just shifting data around. Yes, the 4k RAM limit is real but if managed it can be enough. Uzebox isn't the first computer to swap memory back and forth.

If only just for the music streaming you would save loads of space in flash.

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Diego's random questions and ramblings

Post by D3thAdd3r » Wed Sep 19, 2018 5:04 pm

I am in the pro-SPI Ram camp. To me it is canonical enough, and is becoming more so rapidly. Definitely need a "wow game" from it though to get more interest.

It is a different type of direction in that it forces a larger game to justify it's usage, which needs more items coordinated around the slow access speed. Same machine, very different challenge, in my opinion.

User avatar
nicksen782
Posts: 667
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Diego's random questions and ramblings

Post by nicksen782 » Wed Sep 19, 2018 5:20 pm

With SPIRAM I came up with a trick. There was a data structure that took up 154 bytes of RAM. It would take those bytes even when not actually needed. So, I came up with an idea. I instead pointed that data structure to the end of ram_tiles. Then I could copy those bytes out to SPIRAM and back in once needed again. Result? During the parts where I didn't actually need the 154 byte data structure I gained 154 bytes. That is two ram tiles for the price of some swapping. "PPPPPPP".

I intend to see how much I can "abuse" the Uzebox ram in this manner.

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Diego's random questions and ramblings

Post by Jubatian » Wed Sep 19, 2018 7:15 pm

Just to add some to it if you started mentioning capabilities relating the SPI RAM.

Mode 748 has both the map VRAM in the SPI RAM, and also sources sprites from there, the sprite scroller example demonstrates both. In this mode there are always 256 ROM tiles as it has a different technique for RAM tiles than usual (an overlay VRAM), just that the SPI RAM isn't necessarily just a slow extra data storage.

More similar video mode designs would be possible, Lee also experiments with a Mode 3 variant which has the VRAM in SPI RAM, and Mode 74 also offers the same method for sourcing sprites from SPI RAM like Mode 748. Of course since these modes are a bit complex and messy, they may be difficult to tackle. Later this area could become better with cleaner code and more straightforward interface.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest