benz@cs.Buffalo.EDU (David Benz) (11/17/88)
How do I get at and manipulate the second plane of video memory? I know one must change the value in one of the registers of the CRT-C, port 0xDC, to display the second plane. To read/write to it one must change the value of the CPU Address latch, port 0xDA. If there are any other interesting things that can be done by manipulating these registers please tell. Such as can you reprogram the cursor, do simultaneous writes so as to get identical planes of video memory, can you do horizontal (left - right) scrolling, etc.... Dave Benz SUNY at Buffalo CS Dept. internet:benz@cs.buffalo.edu bitnet: benz@sunybcs.BITNET csnet: benz@buffalo.csnet uucp: ..!{ames,boulder,decvax,rutgers}!sunybcs!benz
GUBBINS@RADC-TOPS20.ARPA (Gern) (11/22/88)
This is a hack out of my SCRIBBLE program that is a doodle type of demo program for Z-100 joysticks. The same routines can be found in the FILMPROJ.ARC in the PD LIB. 8590 REM Subroutines - Page Flip & Page Switch 8591 REM These subroutines switch between the Z-100's two screen 8592 REM pages in order to present screen information AND preserve the 8593 REM artwork screen. This requires the Z-100 to have 192KBytes 8594 REM of video RAM (using 64KByte RAM chips) and video board jumper 8595 REM J307 set to 64K for the subroutines to function properly. 8600 GOSUB 8660:CLS' Page Switch & Clear & Flip 8620 OUT 220,12:OUT 221,((INP(221)+8) AND 15):RETURN' Page Flip 8640 GOSUB 8620' Page Flip & Switch 8660 OUT 218,((INP(218)+128) AND 255):RETURN' Page Switch If I can remember what these do, the page switch will send screen writes to the other page (display one page while loading other). Page Flip will display the other page. In order to USE the other page, you must switch and flip to it (display as you write to it, like normal). The video memory system is a loop of two screens 640x225 (only one screen in interlace mode 640x512max). The two screens are address interwoven, if you are into the RAM layout info. Scrolling the screen 'rotates' the loop so the top of the screen is always at address=0000, though physically it is not. If I remember right, switch messes with the logical CPU addressing of the loop and flip messes with the CRTC addressing of the loop. So it is probably not relevant to refer to the screens as 1 or 2, but more like the current one and the other one. Have fun with it! Gern -------