toddtmw Posted February 18, 2017 Share Posted February 18, 2017 Hi. I developed an Atari BASIC program using Altirra that uses redefined characters. It plays great on Altirra, but when I try to run it on my RetroPie, none of the redefined characters show up. The characters that have not been redefined show up fine. The program is using Graphics 1+16. Also, when I compile it using the Datasoft BASIC compiler, I get the same issue. Regular characters show up fine, but redefined characters are just not there. Has anyone else seen this? Any ideas on a workaround? Thank you. -Todd Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 18, 2017 Share Posted February 18, 2017 Does it work on real hardware? If it does then its an emulator problem. Quote Link to comment Share on other sites More sharing options...
toddtmw Posted February 19, 2017 Author Share Posted February 19, 2017 Does it work on real hardware? If it does then its an emulator problem. I do not have real hardware to test it on, but it works in Altirra, which is as close to real as I've seen in an emulator. I'm sure it is an emulator problem, but, I'm thinking that maybe I did something unusual with my custom character set and maybe if I did it differently, it would work on other emulators. Thanks. Quote Link to comment Share on other sites More sharing options...
+David_P Posted February 19, 2017 Share Posted February 19, 2017 Where are you storing the redefined characters? Are you on a properly aligned boundary? Lots of ways for charsets to go south on you... 1 Quote Link to comment Share on other sites More sharing options...
toddtmw Posted February 19, 2017 Author Share Posted February 19, 2017 I moved the top of memory down 4 pages and used that space. The redefined 6 characters. All of the caracters display fine except the six that I redefined. (I'm using BASIC XE as an editor, but I have not used any BASIC XE specific functionality, the game runs fine in normal BASIC on Altirra.) 8010 Nmemtop=Peek(106)-48020 Poke 106,Nmemtop 8030 Graphics 0 8035 Startlist=Nmemtop*256 8040 ? "HOLD ON...":For Moveme=0 To 10 23:Poke Startlist+Moveme,Peek(57344+Mo veme):Next Moveme 8050 Poke 756,Nmemtop 8110 Start=Nmemtop*256+(8*7) 8120 For I=0 To 47 8130 Read A:Poke Start+I,A:Next I 8170 Return Every time I enter a graphics mode, I poke the address of the new character set. 120 Graphics 1+16 121 Poke 756,Nmemtop I know it is using my new character set becase the characters I redefined are missing. But I cannot figure out how they could be missing. Thanks Quote Link to comment Share on other sites More sharing options...
phaeron Posted February 19, 2017 Share Posted February 19, 2017 Check if the emulator on the RetroPie is using the OS-B ROM, which is default for a 400/800 system. This OS version has a bug where screen clear operations can stomp up to 255 bytes above RAMTOP, which in your case will overwrite some of the low characters of your custom character set. The XL/XE OS can also do this, but in rarer circumstances. Dropping RAMTOP by 8 pages (2K) instead of 4 pages (1K) will also confirm this. Note that you can get corrupted graphics in higher graphics modes when dropping RAMTOP by values that are not a multiple of 16. You'll know if this happens because you'll get a big stripe of garbage in the middle of the screen. 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted February 19, 2017 Share Posted February 19, 2017 Also to remember ... Graphics 1 will only display the uppercase range. To show the other range you add 2 to the value you put into CHBAS(756) Quote Link to comment Share on other sites More sharing options...
toddtmw Posted February 19, 2017 Author Share Posted February 19, 2017 Check if the emulator on the RetroPie is using the OS-B ROM, which is default for a 400/800 system. This OS version has a bug where screen clear operations can stomp up to 255 bytes above RAMTOP, which in your case will overwrite some of the low characters of your custom character set. The XL/XE OS can also do this, but in rarer circumstances. Dropping RAMTOP by 8 pages (2K) instead of 4 pages (1K) will also confirm this. Note that you can get corrupted graphics in higher graphics modes when dropping RAMTOP by values that are not a multiple of 16. You'll know if this happens because you'll get a big stripe of garbage in the middle of the screen. WE HAVE A WINNER! Adding 4 more pages of RAM fixed the issue! Thank you! 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 20, 2017 Share Posted February 20, 2017 You should check memory size from location 740, otherwise if each time you run without pressing Reset the value creeps down. 8010 Nmemtop=Peek(740)-4 8020 Poke 106,Nmemtop No reason I can see that your chrs aren't showing. Maybe try setting up your program to debug, like: 8130 Read A:Poke Start+I,A: ? A, :Next I : ? Quote Link to comment Share on other sites More sharing options...
Gury Posted February 20, 2017 Share Posted February 20, 2017 (edited) Graphics command from BASIC resets this pointer, right? So Graphics 0 sufficies for initializing the values again before using above commands for setting new memtop value. No need for manual reset? Edited February 20, 2017 by Gury Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 20, 2017 Share Posted February 20, 2017 Not really. Each warmstart the contiguous Ram size is determined and stored in dec. 740 and copied to 106. The location at 106 is used when opening any graphics/text screen and will be the high address (page) used. It needs to fall on certain boundaries for some graphics modes, e.g. must be on a 4K boundary for Gr. 8 or 15 to work properly, and if too close after a 4K boundary will cause most other modes to not work properly. Not sure about Display List 1K problems, chances are they won't occur. It's good practice to use 740 as basis for setting 106, since if you use 106 then bump it down it can just keep creeping downwards esp in language environments if you do reruns without pressing Reset. Quote Link to comment Share on other sites More sharing options...
Gury Posted February 20, 2017 Share Posted February 20, 2017 (edited) Ok, this is then the best solution, but strangely it is not used so often in the listings. So, the principle is to read value from location 740 like in your example excerpt every time you want to set, for example, new character set or player/missiles. Here is a link which proove your solution: http://www.atarimagazines.com/v6n3/atarianimation.html Edited February 20, 2017 by Gury 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.