+Gemintronic Posted December 19, 2023 Share Posted December 19, 2023 Al_Nafur demonstrated a technique to share sprite data in the 1942 homage. I made a very rough demo here: https://forums.atariage.com/topic/327795-rough-demo-of-al_nafuur-sprite-data-sharing-code/ As far as I follow (and I could be wrong) the technique involves recording the data statement start and stop positions as constants. To change shared sprite data you change the players playerXpointerhi and playerXpointerlo values. It seems like 4k works as expected. However, only sprite data statements placed in the last bank work in multi bank games. Is there a way to use Al_Nafurs technique when the data is in other banks than the only one or last? Quote Link to comment Share on other sites More sharing options...
+Karl G Posted December 20, 2023 Share Posted December 20, 2023 33 minutes ago, Gemintronic said: Is there a way to use Al_Nafurs technique when the data is in other banks than the only one or last? Unfortunately not. The last bank is where the display kernel runs, so it needs to be able to access the sprite data from there. 1 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted December 20, 2023 Author Share Posted December 20, 2023 3 minutes ago, Karl G said: Unfortunately not. The last bank is where the display kernel runs, so it needs to be able to access the sprite data from there. Just to be clear Al_Nafurs technique uses normal data statements and not playerX: data statements. rem //** Sprite data as normal data statement. Note extra row of zeros at the beggining **// rem //** which tells the kernel to stop drawing player0 sprite **// asm PAD_BB_SPRITE_DATA 4 end data _Sprite_Draggin %00000000 %01111100 %10111111 %00110001 %01100001 %00111110 %01100000 %01111100 %11100000 %11010101 %11111111 %01011010 %01101100 end Quote Link to comment Share on other sites More sharing options...
+Karl G Posted December 20, 2023 Share Posted December 20, 2023 3 minutes ago, Gemintronic said: Just to be clear Al_Nafurs technique uses normal data statements and not playerX: data statements. I understand that. The point is that the player graphics pointer is accessed from the last bank during the display kernel. No matter what you set these pointers to, it will only pull data from the active bank. 1 1 Quote Link to comment Share on other sites More sharing options...
+Al_Nafuur Posted December 20, 2023 Share Posted December 20, 2023 if you have many different (small) players you might use SC-RAM to copy/modify the data in your code from other banks. Quote Link to comment Share on other sites More sharing options...
+Karl G Posted December 20, 2023 Share Posted December 20, 2023 One more option for overcoming the 4K limit: RevEng's multi-kernel framework. It's a bit more work and a bit of a learning curve, but for projects that need the additional sprite space, it can be a good option. It works well if you have different sections in your game that might use different sprites: 1 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.