Posted: Mon Oct 31, 2011 4:45 pm
Here's another small utility which allows to prepend a MG picture as intro or splash screen to a BASIC program, which itself would not use MINIGRAFIK (contained in the *.d64 of the MG batch suite):
You specify the source program, the name of the MG picture to prepend, and the name of the target. The combine procedure of the two files then takes a few minutes. I didn't really bother to make this a ML program.
When you LIST the result, you'll see a SYS statement. The picture is displayed, and after a key press, the screen display is returned to normal and your program is started.
Such a combined program needs at least a +8K expansion, and when the program is run, the screen start address also corresponds to +8K or more, i.e. screen at 4096, colour RAM at 37888. The BASIC program is now located at $2215, and the remaining range from $1200 to $2213 is free for other uses, for example to store UDGs (up to $1FFF) or ML code parts. If you want to use a program for the unexpanded VIC-20, add these commands at the very beginning of your program:
... which will move the screen start address to 7680 and colour RAM to 38400. Furthermore, if the program/game uses UDGs, remove all POKEs that allocate memory from the top, i.e. POKE55,xxx:POKE56,xxx (and POKE51,xxx:POKE52,xxx if you happen to use them). Otherwise the program is stopped with an '?OUT OF MEMORY' error.
The utility was used to add the title screen to the game 'Takeover'.
Greetings,
Michael
Code: Select all
1 INPUT"SOURCE PRG";S$:INPUT"MG PICTURE";P$:INPUT"TARGET PRG";T$:OPEN2,8,2,P$+",P,R"
2 OPEN3,8,3,T$+",P,W":GET#2,A$,A$:PRINT#3,CHR$(1)CHR$(18);:FORT=1TO4086:GET#2,A$
3 PRINT#3,LEFT$(A$+CHR$(0),1);:NEXT:CLOSE2:OPEN2,8,2,S$+",P,R":GET#2,A$,A$:FORT=1TO30
4 READA:PRINT#3,CHR$(A);:NEXT:FORP=-1TO0:GET#2,A$:P=ST=0:PRINT#3,LEFT$(A$+CHR$(0),1);
5 NEXT:CLOSE2:CLOSE3:DATA76,0,34,2,254,254,235,0,12,32,24,229,169,21,133,43,169,34,133
6 DATA44,32,51,197,32,89,198,76,174,199,0
When you LIST the result, you'll see a SYS statement. The picture is displayed, and after a key press, the screen display is returned to normal and your program is started.
Such a combined program needs at least a +8K expansion, and when the program is run, the screen start address also corresponds to +8K or more, i.e. screen at 4096, colour RAM at 37888. The BASIC program is now located at $2215, and the remaining range from $1200 to $2213 is free for other uses, for example to store UDGs (up to $1FFF) or ML code parts. If you want to use a program for the unexpanded VIC-20, add these commands at the very beginning of your program:
Code: Select all
POKE648,30:SYS58648
The utility was used to add the title screen to the game 'Takeover'.
Greetings,
Michael