NaOH Posted September 27, 2022 Share Posted September 27, 2022 (edited) The other day I talked to someone who had an Atari, and I got interested in doing homebrew, which I've never done before. Attached are gifs of my first demo (purple), and a 3-pixel scrolling example which could be interesting to some. Normally, the playfield only allows scrolling in 4-pixel increments, so this is interesting perhaps. In the horizontal scrolling example, the playfield isn't used at all. Instead, the cpu rapidly writes different colours to the background color register (COLUBK). This allows image data to be written with 3-pixel precision, because there are 3 pixels per cpu cycle. This means that while drawing to the screen, every single instruction must write to COLUBK, and there is no time for any logic to read image data from the ROM. So, how can dynamic image data -- such as a scrolling marquee -- be produced? Well, during VBLANK, the image data is read from the ROM and is dynamically compiled on the fly into a sequence of bytecode instructions that can produce the image shown, and then that routine is executed directly from RAM. (As an aside, the squishing effect shown below is produced by running subsections of this dynamically-compiled routine a different number of times -- at its thinnest, each section of the routine is run only once. Each section comprises exactly one scanline, so if the section is run multiple times in succession, then it will be stretched vertically.) Are there any other games which are known to execute instructions from RAM? Or is this unusual? Demo 1: Demo 2 (3-pixel horizontal scrolling) Edited September 27, 2022 by NaOH 5 Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted September 27, 2022 Share Posted September 27, 2022 Here's a game that can run entirely from RAM: ALSO, the Supercharger games are actually all RAM games (tape is loaded into 6k of RAM). 1 Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted September 27, 2022 Share Posted September 27, 2022 A while back I collected a few games that could be made with RAM: http://www.atari2600land.com/articles/ram.html 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted September 27, 2022 Share Posted September 27, 2022 Seems there were some 1 and 2 pixel scrolling experiments but not every emulator and even actual TV liked it. Quote Link to comment Share on other sites More sharing options...
NaOH Posted September 27, 2022 Author Share Posted September 27, 2022 (edited) Wouldn't you know it -- the thread right before this one is using the same RAM kernal technique as I am. Clever use of SAX too -- I think I will steal that trick to get a fourth colour. Edit: and so does the thread right after! Also using the SAX trick, even! Is there something in the air, or is this just a very common technique? Edited September 27, 2022 by NaOH 1 Quote Link to comment Share on other sites More sharing options...
+SvOlli Posted September 29, 2022 Share Posted September 29, 2022 On 9/27/2022 at 2:20 AM, NaOH said: In the horizontal scrolling example, the playfield isn't used at all. Instead, the cpu rapidly writes different colours to the background color register (COLUBK). This allows image data to be written with 3-pixel precision, because there are 3 pixels per cpu cycle. You might want to take a look at ISO by JAC! who does the same thing in a really nice way: https://www.pouet.net/prod.php?which=58044 On 9/27/2022 at 2:20 AM, NaOH said: and then that routine is executed directly from RAM. This works with a lot of cartridges containing RAM like CommaVid and SuperCharger. It does NOT work with SARA aka SuperChip. I don't know about CBS, though. (They all work within microcontroller simulated bankswitching.) Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 12, 2022 Share Posted October 12, 2022 On 9/26/2022 at 8:33 PM, splendidnut said: Here's a game that can run entirely from RAM: ALSO, the Supercharger games are actually all RAM games (tape is loaded into 6k of RAM). So, dragon stomper is only 6K? Wow. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted October 12, 2022 Share Posted October 12, 2022 22 minutes ago, Ecernosoft said: So, dragon stomper is only 6K? Wow. Bigger than that, Dragonstomper uses the Supercharger's Multi Load feature. Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted October 12, 2022 Share Posted October 12, 2022 Just now, SpiceWare said: Bigger than that, Dragonstomper uses the Supercharger's Multi Load feature. I would've thought that had I known it could do that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.