TGB1718 Posted February 14, 2022 Share Posted February 14, 2022 Just having a play around with PM Graphics and BASIC XE, on the face of it, it looks very easy to get PM's up and running, however I think I've found a little issue, when you initialize PM Graphics, you can set the line resolution, but you can't specify where in memory you want the PM area. I tried a poke to 106 to lower the memory, but it just ignored it and placed the PM area in the same location. Anyone found a way round this, seems a pretty important thing to have omitted. Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 14, 2022 Share Posted February 14, 2022 After a quick play... Like you say it ignores the RAMTOP setting. It actually uses the MEMSIZ value (740 dec) Normally you'd not touch that - the done thing in Basic is you use MEMSIZ to determine top of free Ram then adjust RAMTOP downwards. But in this case you need to do both. You'd likely want to do 4K increments otherwise the 8K graphcis modes won't work properly (and it might also not justify PMBASE properly) The danger situation you can have is repeated runs of the program without pressing Reset - the MEMSIZ value can creep down to the point where you run out of memory or get some other weird stuff happening. You could use a flag value and keep the original MEMSIZ somewhere - e.g. the Basic free memory area around 203 dec. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted February 14, 2022 Author Share Posted February 14, 2022 Update: Found a way, bit of a "kludge" though, I had a thought it was using the screen address as a starting point, so what I found is if you lower RAMTOP to a value above the area you want reserved for your PM graphics, then do a Pmgraphics 1 call, it uses a lower memory area. I wanted my PM area to start at 32768 ($8000), I played with RAMTOP until it located the PM Area to this memory location. Further I tried this:- 16 A=DPeek(88):DPoke 88,34304: REM seems this is the value needed for a 32K boundary 20 Pmgraphics 1 25 DPoke 88,A : REM Restore screen pointer and that worked too Before changes:- ?PMADR(0)-1024 36864 After changes ?PMADR(0)-1024 32768 I think option 2 is the better way, Strange way to do it, but seems no other way. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted February 14, 2022 Author Share Posted February 14, 2022 1 minute ago, Rybags said: After a quick play.. I was playing too while you posted this Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted February 14, 2022 Author Share Posted February 14, 2022 Bit of a pointless question now as I've just found out once you set up Pm graphics, if you subsequently call any graphics mode it seems to deactivate Pm graphics. Just too much hassle have to restart Pm graphics and set everything back to where it was before the graphics call. My program switches back and forth (as required) between a text screen and a mode 9/11 screen and my program makes many graphics x calls, if you setup pm graphics by hand, they stay active. 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.