4 ms·
If anyone wants to do this in DOS, one thing I learned from the 1991 BLUE Book is that BLOAD can be used to load a binary file straight to graphics card memory.
by 1313ed01 1y ago
If anyone wants to do this in DOS, one thing I learned from the 1991 BLUE Book is that BLOAD can be used to load a binary file straight to graphics card memory.
https://github.com/robhagemans/hoard-of-gwbasic https://github.com/robhagemans/hoard-of-gwbasic
There was a site hosting the author's freeware utilities (now only on the web archive?), and one is a graphics editor made for that purpose ("EBS: Screen editor for BLOAD pages"):
https://web.archive.org/web/20060410121551/http://scottserver.net/basically/geewhiz.html https://web.archive.org/web/20060410121551/http://scottserve...
From a quick search BLOAD is available in Commodore BASIC as well. Would be interesting to hear how it compares to the optimized loop that PRINTs the image, if the same trick works on a C64?
* No... BLOAD was added in some later version, e.g. for C128, not any of the versions running on C64 https://www.c64-wiki.com/wiki/BASIC_7.0#Commodore_BASIC_Commands https://www.c64-wiki.com/wiki/BASIC_7.0#Commodore_BASIC_Comm... ... But I guess the speed of reading a few kB from a C64 disk drive compared to a 1991 PC hard disk may make it a pretty bad idea anyway if speed is important. On the other hand it would make the program itself smaller and faster to load, so difficult to guess if the total time to render the screen would have increased or not.
- classichasclass 1y agoYou can approximate BLOAD with SYS calls. Something like SYS57812"FILENAME",8,1:POKE780,0:SYS65493 will do it.
- dusted 1y agoI did this, I wrote a VGA slideshow for my "NUxT" 8088, and at its 9 mhz, it manages to switch from one full screen color image to another with about 3 fps. I did some optimization to get there, like turning the image upside down so that the first byte of the image data corrosponds to the first byte of vga memory. I was using some period correct-ish borland c, and had to deal with concepts such as "far" versus "near" pointers and page alignment which I never had to do on PC before, it was fun.
- Someone 1y agoFiles on cassette have a header that contains the starting address to load to (https://eden.mose.org.uk/download/Commodore%20Tape%20Format.pdf https://eden.mose.org.uk/download/Commodore%20Tape%20Format....), so while you cannot specify at load time where to load data, files that load into specific screen ranges can be created. I don’t remember how this was done, but chances are it involved manually calling a few undocumented ROM routines.
- michalpleban 1y agoYou just need to specify a secondary address of "1" when loading the file, so that it loads into the memory area specified in the header instead of the default location. This was rarely used with the tape though, but rather with autoloader programs on the disk - there would be a specially crafted program that loaded itself info the system stack or variable area and overwrote some vectors, so that it would be automatically run without the need to type RUN: LOAD "*", 8, 1 : REM 8 is the disk drive and 1 is the secondary address I consider this mostly a party trick, but it was cool when we were kids ;)
- satiated_grue 1y agoI want to get invited to your parties.