Hi! I did this sorta thing back in the day (w/o raster interrupts). There are registers with pollable bits indicating both vertical retrace and beam on/off. Initially, note the system timer at vertical retrace, count beam on/offs until correct scanline and note the new system timer. Now you know how to set the system timer interrupt on every vertical retrace. When the system timer-interrupt occurs (somewhere slightly wobbly on the scanline), your ISR polls a register indicating that the beam is on. Once it goes off, you know you are exactly at the end of a scanline and can do the palette-update. You don't lose much CPU time; just the polling from the timer-interrupt occurs (somewhere mid-line) until end of scanline.
@PCRetroTech Жыл бұрын
That sounds like a pretty reasonable way of doing it. It's a shame actually that polling is so slow on the earlier machines.
@asgerms Жыл бұрын
@@PCRetroTech The technique was great with 640x480 16-color VGA. A register allowed you to choose which bank of 16 colors (of the adapters 256 palette entries), for fast switch (no slow update of RGB-registers). Polling time was not an issue. Fast or slow, you waste the time from system interrupt to scanline end.Cheers!
@PCRetroTech Жыл бұрын
@@asgerms Yes, I'd heard about this fast switch of palette bank for 16 colour mode. Lots of interesting effects could be done using this, including 16 colour palette cycling. But yeah, thanks for filling in the information. I must make a more in depth VGA video some time.
@LoftBits Жыл бұрын
Inspired by your channel, I began a 'quest for CGA-redeeming' soft, testing anything that goes beyond 4uglycolours on my faithful 5150. California Games remains a 'reference product' from the original era, as the composite mode looks also amazing (I just got myself a broadcasting multi system monitor from the era, to see this in NTSC). CGA seems to be the most misunderstood video card of all times - especially in Europe, where PAL (or SECAM!) made this little unassuming cinch output at the back largely unused and covered with dust. P.S. Congratulations on winning the Evoke 2022! Area 5150 resurrected the CGA in a truly biblical style.
@PCRetroTech Жыл бұрын
Indeed, it's a surprise that it wasn't more popular to sell some kind of converter back in the day. But this might've been as expensive as the card. I've thought about making a video on some of the other things that could have been done with CGA in games back in the day. But it's a lot of work for a single video.
@RaposaCadela Жыл бұрын
Awesome, I love it
@MurrayDagostino2 жыл бұрын
Back in the day, I tried this on our 8 Mhz XT with an ATI CGA+ (supporting Plantronics mode) card and I didnt have the palette timing issues shown here. I was really impressed with how they pulled this off.
@PCRetroTech2 жыл бұрын
Very interesting. There's little information about games that support Plantronics, mainly I think because so few do. I'd be surprised if it was actually using a Plantronics only mode. But the 8MHz might explain it. If there's sufficient time due to the CPU running faster then it is possible that the timing issues I observed would just not occur.
@MurrayDagostino2 жыл бұрын
@@PCRetroTech I dont think it used plantronics mode for this and its just the clever CGA tricks that the devs used to make this more-color option possible. Our XT back in the day (Philips NMS9116) came with some software supporting plantronics mode, mainly a desktop publishing application that supported 640x200 in 4 colors. There were some demos displaying the 16 color modes, but besides that there was nothing at all on this matter, no software or anything else. It did come with a manual on how to program these special modes in assembler, but since I was a teen back then, I had no idea how and where I could program this. Much much later I did give Harekiet (the dev of DosBox) the scanned in documents on how to implement Plantronics mode (besides giving him the programming specs on the CMS/Gameblaster) but I dont think he ever did anything with it. He might've used the CMS/Gameblaster documentation, but thats a totally different story. As of later, I did learn that the plantronics mode was used in a picture viewer application (CompuShow 2000) supporting 320x200x16 and I know that The 8-Bit Guy added a Plantronics mode in his Planet X3 ms-dos game. Besides that however, I have no examples of what software used the Plantronics mode.
@PCRetroTech2 жыл бұрын
@@MurrayDagostino There certainly wasn't much that used it. There's a few videos on Plantronics on the channel. I did find a few things that supported it, and viewers pointed out some more. But in the end I wrote my own code to make use of it. I don't suppose you still have the docs for Plantronics mode do you? That's the sort of thing which a lot of people would love to see uploaded somewhere.
@MurrayDagostino2 жыл бұрын
@@PCRetroTech Its an incredible long time ago, I will have to scour super old harddisks for those documents and maybe its on a zip disk somewhere, I will try to find it, but the chances to find them is very slim, I'm pretty sure it was near the end of the 90s or beginning 2000s that I scanned that manual.
@PCRetroTech2 жыл бұрын
@@MurrayDagostino That's a long time ago. Let us know if you find it. There's so little original information available on these rare boards.
@bananaboy414 жыл бұрын
I never realised how impressive California Games was on CGA! Great channel, subscribed!
@bobns5093 жыл бұрын
Yes, here is very good explanation and examples: kzbin.info/www/bejne/pJquk5-dj9qjhcU
@marccaselle8108 Жыл бұрын
It's a great game
@ryanyoder75734 жыл бұрын
Your channel rocks. This is very cool.
@PCRetroTech4 жыл бұрын
Thanks!
@salpha87142 жыл бұрын
amazing, i would say that was EGA 16-colors if i saw it without knowing
@e8root5 ай бұрын
Cool trick. I guess with even more programmer effort it would be possible to accomplish on non-original hardware. But then again at the time developer had IBM PC and nothing else so it makes sense he implemented palette swap logic tied to that machine timings. A lot of very early games really needed IBM. Unlike later DOS games which were made on clone machines instead.
@psychedelicbear21594 жыл бұрын
I used to play California Games all the time, although admittedly is was on the NES. Really cool to see on an old IBM PC though
@lurkerrekrul Жыл бұрын
I'm confused about something: You say that the surfing game is using a standard CGA palette of light blue, white and red, but I have never seen a CGA game that had such a combination of colors. Every 4-color CGA game that I've seen has either used a palette of red, yellow, green, and black, or light blue, purple, white, and black. If the colors from different palettes can be combined in standard CGA mode, why did virtually no games use this ability?
@PCRetroTech Жыл бұрын
There were some games that used it, but it wasn't a widely documented palette. It's basically one of the other palettes with one of the colors changed, so it's set up in a different way to the main two palettes. I guess just not that many programmers knew about it back in the day.
@intel386DX4 жыл бұрын
very cool ways to trick the CGA limitations!
@Aeduo2 жыл бұрын
I'm kinda curious how they set the player "sprite" palette for the surfing event. Do they set the interrupt timer for each row?
@PCRetroTech2 жыл бұрын
I'm not sure the palette is changing there. It's just the alternative palette, red white and blue with a dark blue background colour. The rest is just dithering. In any event, it is exceptionally unlikely that they change the palette more than once or twice on a screen anywhere in this game. Changing palette every line is extremely advanced and I don't know that it was done in any games back then.
@sixpie.4 жыл бұрын
Thanks ! I used to play California Games on my Tandy 1000 HX computer back in the 80s (in 16 colors :-D). Not even sure this MORE-COLOR mode was even supported by my Tandy-1000 ? I probably tried all the graphics options back then, I probably ended up with corrupt graphics using this mode on the Tandy. Not sure. Anyway: great and very instructive video, Dude ! :-)