Jump to content
IGNORED

Custom Character Display Issues


toddtmw

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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!

  • Like 1
Link to comment
Share on other sites

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 : ?
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Gury
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...