Jump to content
IGNORED

PM Graphics using BASIC XE


TGB1718

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. 

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...