BBS: Inland Empire Archive Date: 05-19-92 (18:43) Number: 137 From: CORIDON HENSHAW Refer#: NONE To: JOHN GALLAS Recvd: NO Subj: video memory segment Conf: (2) Quik_Bas
In a msg on <May 17 10:41>, John Gallas of 1:282/30 writes: JG> @EID:111a 01e99a45 JG> @MSGID: 1:282/30 458acd8b JG> @PID: PB 1.21 JG> Is there a way that I can determine wether to use &HB000 or &HB800 JG> when doing stuff with the screen? And also, how do I save and load JG> screens with BSAVE and BLOAD? That depends on the screen mode, anything OVER mode 2 is &Ha0000. BUT if you POKE, PEEK, BLOAD or BSAVE &Ha0000, you'll only get the current bit-plain. You need to OUT to select bit-plains. here's some sample code to save and load screen 8-12 screens: 'Save a graphics screen DEFINT A - Z DEF SEG = &HA000 'Video segment FOR i = 0 TO NrBitPlanes - 1 OUT &H3CE, 4 'Select the Read Map Select Register OUT &H3CF, i 'Select the bit plane to save BSAVE "PLANE" + CHR$(i + 48), 0, NrBytes NEXT i ' The variables NrBitPlanes and NrBytes have the following values: ' ' Screen NrBitPlanes NrBytes ' ------ ----------- ------- ' 7 4 8000 ' 8 4 16000 ' 9 4 28000 ' 10 2 28000 ' 11 4 38400 ' 12 4 38400 ' ' You'll end up with 4 files (2 for SCREEN 10): ' ' Filename Contents ' -------- -------- ' PLANE0 Blue bit plane ' PLANE1 Green bit plane ' PLANE2 Red bit plane ' PLANE3 Intensity bit plane ' ' ' Restoring these screens is a little different: ' 'Restore a graphics screen DEFINT A - Z DEF SEG = &HA000 FOR i = 0 TO NrBitPlanes - 1 OUT &H3C4, 2 'Select the Map Mask Register OUT &H3C5, 2 ^ i 'Select the bit plane to restore BLOAD "PLANE" + CHR$(i + 48), 0 NEXT i --- msgedsq 2.0.5 * Origin: -=- Point Blank -=- Support Fidonet Reform -=- (1:250/804.200)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET