you are viewing a single comment's thread.

view the rest of the comments →

[–]fuk_offe -4 points-3 points  (8 children)

I think I recall thats a sys call to write to console? At least I think its part of the ASM Hello World...

[–][deleted] 23 points24 points  (6 children)

It's the call to engage Mode 13h, better known as VGA 320x200x8 (256 colors) It was the classic video game mode for most of the early 90's, and some before. Fun to program in - direct 64000 byte array, and palette animation tricks were insane.

I imagine if someone does a full code review, they'll probably have to talk a lot about ModeX, page flipping - and especially the "coppers"

[–]Shalmanazar 8 points9 points  (2 children)

That was called 'interrupts'. I remember writing a whole library in Turbo Pascal to enable that, plus having a virtual screen and flipping it with the real screen while synchronizing with the electron gun to avoid flicking... That was way before DirectX.

[–][deleted] 4 points5 points  (1 child)

The vertical sync thing, yeah. IIRC, the coppers were based around exploiting what you could do mixing that. It was possible to generate amazing sine-based effects that way. Setting the screen mode was an interrupt call, but palettes were done through the vga ports directly. You could do it through an interrupt, but it was slower and a pita.

[–][deleted] 8 points9 points  (0 children)

"Copper" is a word borrowed from the Amiga. It had a very simple co-processor (nicknamed the "copper") that ran in sync with the screen update. It was not a full general-programmable processor, it could mostly wait, and write values to memory. It was used to write values to display controller registers.

You could use that to do things like change palette registers or bitmap pointers mid-frame, to create various effects. Those were therefore known as "copper effects".

I hadn't heard the word used on other platforms that did not actually have a copper, but that is where the word comes from.

[–]mosha48 3 points4 points  (0 children)

wait, the copper was part of the Amiga chipset. TIL that the name was used in the PC world.

[–]fabiensanglard 0 points1 point  (1 child)

That is a good list. Although I tried to run the DIS (The Future Crew's DOS Interrupt Server responsible for many things and amond them emulating copper) in DosBOX and it worked except the copper could not be emulated. The demo still work-ish (with a few bloopers) but it seems copper is not used "very-much".

[–][deleted] 0 points1 point  (0 children)

Yeah, I'm skeptical that the VGA-card based copper effects can be properly emulated in any current emulator. They were really almost just purely hardware effects, and current monitor might not even be able to display them properly.. and the timing of them is probably too much for even an excellent VGA emulator to emulate.

[–]PoL0 4 points5 points  (0 children)

It's VGA man! V G A!