Quarter Page Graphics "panes"

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
Serenarian
Posts: 29
Joined: Thu Oct 25, 2012 1:28 pm

Quarter Page Graphics "panes"

Post by Serenarian »

Going through my old notebooks I found this snippet that I wrote in 1984 while experimenting.
You may know it already. It's a graphics trick that splits a Pmode screen into 4 "panes"
Each pane still has coordinates of 256 x 192.
The individual panes are accessed using pokes:
-----------------------------
| &HBA=6 | &HBA=6 |
| &HBB=0 | &HBB=16 |
|------------|-------------|
| &HBA=18| &HBA=18 |
| &HBB=0 | &HBB=16 |
----------------------------
These values are for a machine without a DOS cartridge.
DOS moves the graphics screen addresses up by &H600,
so for DOS machines replace the 6s with 12s, and the 18s with 24s

10 PMODE 4,1:SCREEN1,1:PCLS1:COLOR0
20 POKE &HB6,0
30 FOR N=1 TO 20
40 POKE &HBA,6:POKE &HBB,0:REM CHANGE 6 TO 12 FOR DOS
50 GOSUB 140
60 POKE &HBA,6:POKE &HBB,16:REM CHANGE 6 TO 12 FOR DOS
70 GOSUB 140
80 POKE &HBA,18:POKE &HBB,0:REM CHANGE 18 TO 24 FOR DOS
90 GOSUB 140
100 POKE &HBA,18:POKE &HBB,16:REM CHANGE 18 TO 24 FOR DOS
110 GOSUB 140
120 NEXT N
130 GOTO 130
140 REM DRAW SOMETHING
150 X1=RND(250):Y1=RND(190):X2=RND(250):Y2=RND(190)
160 LINE(X1,Y1)-(X2,Y2),PSET,B
170 RETURN
User avatar
robcfg
Posts: 1526
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Quarter Page Graphics "panes"

Post by robcfg »

Oh, that's an interesting snippet, thanks for sharing it!
Post Reply