Thread View: rec.games.programmer
6 messages
6 total messages
Started by Court Demas
Wed, 05 Aug 1992 15:06
VGA Latches
Author: Court Demas
Date: Wed, 05 Aug 1992 15:06
Date: Wed, 05 Aug 1992 15:06
14 lines
1087 bytes
1087 bytes
I'm fairly new to VGA hardware programming, but I think I've really gotten the hang of the registers and latches and such (for Mode-X in particular). The problem: is there ANY way to perform logical functions between the latches and video memory? I can AND/OR/XOR pixels onto the screen very easily - just setting the rotate/function select, reading from video (to prime the latches) and then writing back. This makes sense, but many of my routines write to all planes at once - like rectangle fills, horizontal lines, and all bitblts. Animating with ModeX seems a tad bit less attractive if it takes 4x as long just to do an XOR. any suggestions? -court
Re: VGA Latches
Author: Daniel Reznick
Date: Wed, 05 Aug 1992 18:54
Date: Wed, 05 Aug 1992 18:54
18 lines
1437 bytes
1437 bytes
as my understanding goes, when you read from the VGA, 4 latches are set, one from each plane, so, the reasoning goes, that if you want to prime the latches to user the VGA to do your logical operations (AND/OR...) then you will simply have to read ONCE per write, so it will take 2X longer to do things, which if you are updating 4 planes at a time is STILL 2X faster than mode 13h, assuming of course that 13h and ModeX really do work at the same speed, as there is some debate and I haven't done any experimenting myself yet. on another note, does anyone know of a good way to debug programs that use ModeX without killing the graphics display? Turbo Debugger fails miserably at this. I would be happy with suggestions for other debugging software that leaves the VGA registers alone. I am mainly interested in debugging graphics code on a system with one monitor, as I can't really afford to go and buy a new one right now. dan reznick reznick@acf3.nyu.edu
Re: VGA Latches
Author: Daniel Reznick
Date: Fri, 07 Aug 1992 03:39
Date: Fri, 07 Aug 1992 03:39
11 lines
903 bytes
903 bytes
I just re read my previous message and realized that I am indeed wrong. I went through this same dilemma - the VGA's ALU (Arithmetic Logic Unit) is pretty useless, because it only works when 1) the latches are primed, and 2) on data coming FROM the cpu, which means at most two bytes at a time, and it also means that you CAN'T use the latches to copy from off screen display memory in Mode X, IF you want to use the ALU. daniel reznick reznick@acf3.nyu.edu
Re: VGA Latches
Author: Robert Schmidt
Date: Fri, 07 Aug 1992 16:43
Date: Fri, 07 Aug 1992 16:43
38 lines
2187 bytes
2187 bytes
In article <62430004@acf3.NYU.EDU>, reznick@acf3.NYU.EDU (Daniel Reznick) writes: > as my understanding goes, when you read from the VGA, 4 latches are set, > one from each plane, so, the reasoning goes, that if you want to prime > the latches to user the VGA to do your logical operations (AND/OR...) > then you will simply have to read ONCE per write, so it will take 2X > longer to do things, which if you are updating 4 planes at a time is > STILL 2X faster than mode 13h, assuming of course that 13h and ModeX > really do work at the same speed, as there is some debate and I haven't > done any experimenting myself yet. > > on another note, does anyone know of a good way to debug programs that > use ModeX without killing the graphics display? Turbo Debugger fails > miserably at this. I would be happy with suggestions for other > debugging software that leaves the VGA registers alone. I am mainly > interested in debugging graphics code on a system with one monitor, as I > can't really afford to go and buy a new one right now. I've heard this, but can't confirm it... In an assembler source set up a segment in the VGA video buffer: SEGMENT VGA PUBLIC AT 0A000h data db 64000 dup (?) ENDS VGA or something similar. This will force (?) TD to keep that area clean (again ?). Link the resulting .obj file with your c prog or whatever. > dan reznick > reznick@acf3.nyu.edu -- Cheers from Robert Schmidt, aka Ztiff Zox, aka Buuud (IRC). E-mail to robert@solan.unit.no, snail-mail to Stud.techn. Robert Schmidt, Stud.post 170, Norwegian Institute of Technology, 7034 Trondheim, NORWAY Warlords: Now do you think my .sig is boring enough?
Re: VGA Latches
Author: sl8nl
Date: Fri, 07 Aug 1992 19:31
Date: Fri, 07 Aug 1992 19:31
7 lines
574 bytes
574 bytes
> or something similar. > This will force (?) TD to keep that area clean (again ?). No, what he was referring to is that TD restores mode 13h on return...not the tweaked registers. Josh
Re: VGA Latches
Author: Daniel Reznick
Date: Sun, 09 Aug 1992 04:56
Date: Sun, 09 Aug 1992 04:56
14 lines
1064 bytes
1064 bytes
I read, in _Power Graphics Programming_ (which, BTW, I bought at a local chain bookstore off the shelf a few days ago - I think it is still in print, by QUE), that Turbo Debugger STILL screws with the VGA's registers, EVEN when using another monitor, so as to make it almost impossible to use TD for Mode X. Abrash suggessts hooking an entire another computer into a serial port and doing it from there.. but I don't have a computer to spare. I was actually looking for suggestions of ANOTHER source level debugger that will be more polite with my precious VGA registers.. daniel reznick reznick@acf3.nyu.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads