I'm fiddling about programming my Vic again. I am much better at it now than I was as a kid..
I'm a bit stuck with UDG's though. I've worked through the programmers reference guide and understand most of it, but I can't figure out how it works with expansion memory.
What do I poke where to protect some space for the UDG's without making my Vic think it only has 2.5k free?
Thanks.
UDG's
Moderator: Moderators
I think poking 36869, 255 only makes use of 512 bytes for user defined graphics.
YOu don't really need to protect it. But if you are worried about variables runninig into graphic space, you'll need to alter the memory locations 52 and 56. THe memory must be restricted somehow, but I don't think you need to restrict a full 1k.
YOu don't really need to protect it. But if you are worried about variables runninig into graphic space, you'll need to alter the memory locations 52 and 56. THe memory must be restricted somehow, but I don't think you need to restrict a full 1k.
Well, if you are going to use expansion ram and want to use your own graphics, then you need to move the basic memory. (You alter the start address of the basic memory instead of the ending address). If you for example do this:
poke44,32:poke32*256,0:new
Then your basic memory will start at the expansion ram and leave the whole graphics mem free for your own graphics, a bigger screen, etc... You might not need to move it that far though. For example on my Tribbles game, I have it at 28*256 I think (poke 44,28:poke28*256,0:new)
Also read this thread:
http://sleepingelephant.com/ipw-web/bul ... .php?t=116
/Anders
poke44,32:poke32*256,0:new
Then your basic memory will start at the expansion ram and leave the whole graphics mem free for your own graphics, a bigger screen, etc... You might not need to move it that far though. For example on my Tribbles game, I have it at 28*256 I think (poke 44,28:poke28*256,0:new)
Also read this thread:
http://sleepingelephant.com/ipw-web/bul ... .php?t=116
/Anders
PRG Starter - a VICE helper / Vic Software (Boray Gammon, SD2IEC music player, Vic Disk Menu, Tribbles, Mega Omega, How Many 8K etc.)
Generally, if you have 0 or 3K expansion, it is enough to lower the roof (POKE 52,28:POKE 56,28:CLR for 64 UDGs starting at 7168, activate with POKE 36869,255). If you have 8K expansion or more, you rather have to move Basic forwards as Boray mentions. Normally this means that the program has to load into two parts or you need some advanced programming and tools to save your program (I'm thinking saving a memory dump consisting of both graphics and program in one, using some nifty POKE or SYS combination to put things right).
Anders Carlsson
Look at "Programming/Moving Basic memory while running", there's a nice solution from Boray and others for moving the basic pointers around and loading a programm consisting of Basic/ML(Graphics)/BASIC in one part.
I tried his solution and it worked perfectly well, now I can load a Basic program which has it's own UDG without worrying about Multi-Part loading etc.
Schlowski
PS: Link to topic: http://sleepingelephant.com/ipw-web/bul ... .php?t=116
I tried his solution and it worked perfectly well, now I can load a Basic program which has it's own UDG without worrying about Multi-Part loading etc.
Schlowski
PS: Link to topic: http://sleepingelephant.com/ipw-web/bul ... .php?t=116