This was kind of what I was thinking, load the map into SPIRAM and scroll around the map from there. But I don't have nearly as much AVR Assembly experience as the rest of you all do. Your first bit in the first paragraph sounds fun and interesting, but WAAAYYYY out of my current league. I might have to try my hand at a game once I finish the base SPIRAM code and the SPIRAM Emu mods. I think I might post my diffs to the kernel in the next day or so. I still have work to do on the emulator though, since I accidentally re-broke the SD code again... still not sure how though. I'm sure it's pretty simple.D3thAdd3r wrote: Just read into the ram from the SD, scroll into local ram as needed. Gauntlet seems like a good nail for this hammer.
Playing with SPI RAM
-
- Posts: 86
- Joined: Sun Jan 04, 2015 4:38 am
Re: Playing with SPI RAM
-
- Posts: 1445
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Playing with SPI RAM
Sounds like a good case for a custom video mode where all of VRAM is in SPI RAM and just ROMTiles and RAMTiles are in the AVRD3thAdd3r wrote:Gauntlet seems like a good nail for this hammer.
IN Rx, SPDR
OUT SPDR, Rx
is two clocks so thats the exact same time as and LDS
Just gets much slower to manipulate it during game-time
Re: Playing with SPI RAM
Interesting. I have never done anything with SPI directly and I am not sure I understand the timing on a basic level. Lets say the ram is sitting idle, already set to sequential read, the address is set up, and we are just starting a scanline. What would the fastest assembly(naive no tricks approach) look like for back to back 8 bit pixel outs to the video port from that point?
-
- Posts: 1445
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Playing with SPI RAM
Yyou have to
Out spdr
Wait 18 clock cycles
In spdr
There does not need to be any wait between IN and OUT
So you can go
IN SPDR. ;get the next tile from vram in SPI RAM
OUT SPDR ; cue the next byte
You then can do all the normal getting tile data and putting out pixels forthe next 4048/56 or how ever many clocks
Out spdr
Wait 18 clock cycles
In spdr
There does not need to be any wait between IN and OUT
So you can go
IN SPDR. ;get the next tile from vram in SPI RAM
OUT SPDR ; cue the next byte
You then can do all the normal getting tile data and putting out pixels forthe next 4048/56 or how ever many clocks
Re: Playing with SPI RAM
Now I get it, thanks for clearing that up.CunningFellow wrote:There does not need to be any wait between IN and OUT
-
- Posts: 1445
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Playing with SPI RAM
Guessing most of you have seen this by now
http://hackaday.com/2015/03/18/new-part ... ontroller/
Didn't see a price though.
http://hackaday.com/2015/03/18/new-part ... ontroller/
Didn't see a price though.
Re: Playing with SPI RAM
I love the first comment in the article:
Nice, but I agree with most commenters, I doubt this will ever see the light of day considering composite is already on its way out.
About 10 years to late.
Nice, but I agree with most commenters, I doubt this will ever see the light of day considering composite is already on its way out.
-
- Posts: 1445
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Playing with SPI RAM
I think it is aimed at the aurdwino market. You can charge a lot per mm2 in that market.
It can output vga also.
It wont be useful for games I dont think. Even with the parallel interface, the high colour depth makes it impractical.
Nice for static pictures though
It can output vga also.
It wont be useful for games I dont think. Even with the parallel interface, the high colour depth makes it impractical.
Nice for static pictures though
Re: Playing with SPI RAM
Alec do you still have the program you used to test your ram around? Even at a basic level I'd like to see this ram in action!
Re: Playing with SPI RAM
Sure! Made a video mode using it, 360x240 1bpp. I really don't think the spi ram will fly for video modes in general. Trying to share the spi ram between two asynchronous processes is a mess.
Here's a simple demo that load the spi ram with a picture and scrolls it around. I'm in the process to load the whole 128k from the card sd to make a simple slide show.
Here's a simple demo that load the spi ram with a picture and scrolls it around. I'm in the process to load the whole 128k from the card sd to make a simple slide show.
- Attachments
-
- Mode13Demo.hex
- (48.11 KiB) Downloaded 404 times
-
- mode13demo.zip
- (496.26 KiB) Downloaded 420 times