8bit-Dude Posted January 9, 2022 Share Posted January 9, 2022 Hi Guyz, Filippo has been testing the latest version of 8bit-Slicks for the 400/800, and found a bug that only affects the OS-A ROM version. The DLI multiplexed sprites appear multiple times instead of the way they appear on other ROM versions. Please refer to screenshots below. Is there something particular with the way that ROM version handles sprite addressing? Here is my DLI: https://github.com/8bit-Dude/8bit-Unity/blob/main/unity/targets/atari/DLI.s Here is my VBI: https://github.com/8bit-Dude/8bit-Unity/blob/main/unity/targets/atari/VBI.s And sprite copy code: https://github.com/8bit-Dude/8bit-Unity/blob/main/unity/targets/atari/blitSprites.s (My sprite multiplexing code is loosely based on the guide from https://playermissile.com/dli_tutorial/) slicks-demo-atari48k.atr 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 9, 2022 Share Posted January 9, 2022 (edited) PM graphics aren't used by the OS so shouldn't be directly affected in different ways. But, and this occurs with OS-B also - the interrupt handlers don't do a CLD early in the VBlank handler but with the XL it does which can lead to problems with programs that use ADC/SBC during VBlank or an IRQ (DLIs in all cases never have a CLD) Other than that all I could think of is some sort of timing issue but it'd likely be VBlank related and generally you have some variance in timing regardless of OS version. Does your sprite move routine get called during VBlank? I'd suggest - regardless of what you're doing, always do a CLD at the start of your VBlank code. Aside from this, all I can think of is some sort of memory conflict but I don't think OS-A uses any locations that OS-B doesn't. Late thought - ensure you're using an OS that's relevant to the region settings - the common A variant OS will often just be for PAL 800s - though that said, they should be just about identical except for keyboard timing and probably the cassette bitrate tables. Edited January 9, 2022 by Rybags 1 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted January 9, 2022 Share Posted January 9, 2022 The other thing to consider is what type of cpu card is in his 800, the OS and cpu card might have some bearing on things... sure sounds odd so it might be good for him to verify all the particulars right on down to GTI and ANTIC chips... Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted January 9, 2022 Author Share Posted January 9, 2022 9 minutes ago, _The Doctor__ said: The other thing to consider is what type of cpu card is in his 800, the OS and cpu card might have some bearing on things... sure sounds odd so it might be good for him to verify all the particulars right on down to GTI and ANTIC chips... Thanks for the feedback. The bug can be easily replicated in Altirra by setting PAL 800 with OS-A ROM. So not sure there is something specific to hardware... Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted January 9, 2022 Author Share Posted January 9, 2022 Thanks for several suggestions Rybag. I will try them out tomorrow when i get back home (particularly CLD). Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 9, 2022 Share Posted January 9, 2022 I'll have to try and get a copy of Rev A. Rev B doesn't do CLD so I doubt it's that. It might just come down to timing or there might be a memory usage difference. Quote Link to comment Share on other sites More sharing options...
phaeron Posted January 9, 2022 Share Posted January 9, 2022 This issue is due to a change between OS-A and OS-B in the implementation of the SETVBV routine for changing interrupt vectors. In OS-A, it resets NMIEN and turns off your DLIs. OS-B has a rewritten SETVBV routine that avoids doing this. The fix is to reset NMIEN after calling SETVBV or anything else that might indirectly call SETVBV (DOS/SIO). 3 1 Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted January 9, 2022 Author Share Posted January 9, 2022 2 hours ago, phaeron said: This issue is due to a change between OS-A and OS-B in the implementation of the SETVBV routine for changing interrupt vectors. In OS-A, it resets NMIEN and turns off your DLIs. OS-B has a rewritten SETVBV routine that avoids doing this. The fix is to reset NMIEN after calling SETVBV or anything else that might indirectly call SETVBV (DOS/SIO). Thanks for a very insightful reply Phaeron. My program is compiled with cc65 and relies on xBios for loading and file handling. Could the problem come cc65 or xBios calls to setvbv? Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 9, 2022 Share Posted January 9, 2022 (edited) The way I see it, you have 2 main choices for a fix: - don't use SETVBV, use your own code to do it. - set NMIEN to $C0 after any change of DLI or VBlank vector. Whether it's CC65 or XBios calling SETVBV - really it doesn't matter. Edited January 9, 2022 by Rybags 1 Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted January 10, 2022 Author Share Posted January 10, 2022 Sweet!!! I added NMIEN reset after all calls to SETVBV, and it fixed the problem! It is amazing to have received support so quickly from you guys, I would have had no chance figuring this out alone. Thanks a million times!!! 2 Quote Link to comment Share on other sites More sharing options...
snicklin Posted January 10, 2022 Share Posted January 10, 2022 On 1/9/2022 at 12:14 PM, 8bit-Dude said: Hi Guyz, Filippo has been testing the latest version of 8bit-Slicks ... slicks-demo-atari48k.atr 179.64 kB · 5 downloads This is a great game that you've got here. The turning mechanism is more realistic than in Grand Prix Simulator. I had a go a decade ago at something similar and didn't get the turning mechanism right... I had so many layers of logic for the movement (which used a lot of CPU time) that I ended up getting confused under all of it and eventually with the pressure of paid-work gave up. That isn't my game in the screenshot, but it is linked. Hit fire on the title screen. If you touch a key it will crash. 1 Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted January 10, 2022 Author Share Posted January 10, 2022 (edited) Thanks for the feedback Snicklin! The graphics look very good in the screenshot above, but when I click the link it just takes me to another thread (can't see any ATR). Edit: I managed to download the ATR. I see what you mean, the car moves in a straight line! In 8bit-Slicks, I used 2 angles: 1 for the angle of sprite, and 1 for the direction of travel. I then have a LERP function that progressively brings the angle of second close to the first (so there is a kind of lag allowing "drift"). Edited January 10, 2022 by 8bit-Dude 1 Quote Link to comment Share on other sites More sharing options...
8bit-Dude Posted January 10, 2022 Author Share Posted January 10, 2022 (edited) Here are the disks of fixed version for 48K (400/800) and 64K (XL/XE) Atari 8bit! This is the shareware version of the game, and it is compatible with 3 networking devices (see here for full version). I have also included a modified version of Altirra 4.0 that includes the 8bit-Hub for networked play (a Joy Port 2 accessory). (Configure System > Peripherals > Devices > Add > 8bit-Hub) slicks-demo-atari48k.atr slicks-demo-atari64k.atr Altirra-4.00-Hub-2022-01-10.zip Edited January 10, 2022 by 8bit-Dude There was a problem with Altirra link 1 2 Quote Link to comment Share on other sites More sharing options...
+Philsan Posted January 10, 2022 Share Posted January 10, 2022 Steve, you reminded me I was excited by your game WIP: https://atariage.com/forums/topic/148210-graphics-mode-12-overlay-code-required/?do=findComment&comment=2156101 Eleven years has passed and now I am the "Filippo" who tests 8bit-Slicks. Quote Link to comment Share on other sites More sharing options...
snicklin Posted January 12, 2022 Share Posted January 12, 2022 On 1/10/2022 at 10:25 PM, 8bit-Dude said: Thanks for the feedback Snicklin! The graphics look very good in the screenshot above, but when I click the link it just takes me to another thread (can't see any ATR). Edit: I managed to download the ATR. I see what you mean, the car moves in a straight line! In 8bit-Slicks, I used 2 angles: 1 for the angle of sprite, and 1 for the direction of travel. I then have a LERP function that progressively brings the angle of second close to the first (so there is a kind of lag allowing "drift"). Ahh, there is a version there where it turns, though it tends to slide a bit at times. I reckon that if I pulled out all the logic and started again, I might be able to succeed. I am not sure where the source code is though. On 1/11/2022 at 2:59 AM, Philsan said: Steve, you reminded me I was excited by your game WIP: https://atariage.com/forums/topic/148210-graphics-mode-12-overlay-code-required/?do=findComment&comment=2156101 Eleven years has passed and now I am the "Filippo" who tests 8bit-Slicks. Nice to hear you liked it. And I am glad that you are on a project that has a very high chance of success! 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.