[HN Gopher] DOS demo/game development template
___________________________________________________________________
DOS demo/game development template
Author : mariuz
Score : 112 points
Date : 2022-12-23 10:27 UTC (12 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| mmastrac wrote:
| DJGPP was great, but if you want to drop to assembly for
| performance reasons, NASM was the way to go. AT&T syntax on Intel
| was a poor choice IMO, and the pain of juggling inline assembly
| register requirements was just not worth it.
| analognoise wrote:
| Super strange to run into this - I've been using Dosbox Staging
| with MASM611 to do some MASM x86 assembly.
|
| I really want to understand the original packet driver assembly
| code; once I understand it, I can write a little packet driver
| (just as a learning exercise).
|
| I love when stuff like this (something very related) gets posted.
| Sheesh, HN is great.
| brink wrote:
| Thank you for libGDX, Mario. I developed using it in 2017, and it
| was a great experience.
| badlogic wrote:
| Aww, thank you for the kind words!
| thesnide wrote:
| Nah. Words cannot express it fully.
|
| It really showed that Java & JVM languages are perfectly able
| to power games.
|
| And the level of polish of the environment, is really great.
| winrid wrote:
| I'd also like to thank you. I still use it.
| _the_inflator wrote:
| This comes in handy. Yesterday I ordered a book that covers ASM/C
| demo effects from the 90th. It is called "PC Underground",
| available from the second hand book mark.
| codetrotter wrote:
| Is this the book?
| https://www.goodreads.com/en/book/show/2146200.PC_Undergroun...
| _the_inflator wrote:
| Yes. I owned it during the 90th. The only problem is, that it
| is in German. Over at archive.org I only found torrent images
| for the enclosed CD-ROM, which features source code as well
| as a couple of great demos from Iguana, Dust, Surprise and
| others.
| myth_drannon wrote:
| I found the book on archive.org but not the enclosed cd-
| rom.
| Jare wrote:
| Yay! One of the unexpected benefits of releasing a lot of
| source code for our work back then, is that we can now find
| it again on the internet [1] - most of it would have been
| (and was) lost otherwise :)
|
| [1] - https://hornet.org/cgi-bin/scene-
| search.cgi?search=iguana
| pixelpoet wrote:
| Hey cool it's Jare^Iguana, creator of the classic fire
| demoeffect :)
| greenbit wrote:
| Was amused to see in the first review the comment that it was
| 'a bit disorganized'.
|
| This reminded me of the 'door stop' books of the 90s, those
| great thick things that weighed about 3 lbs. In the early
| days they tended to be worth every penny, but toward the end
| of the decade the publishers seemed to have gotten some kind
| of gold-rush mentality, because while there was a sudden
| proliferation of these hefty tomes, the quality definitely
| became hit or miss, and it became work to find the gems.
| EvanAnderson wrote:
| Door stop books. Heh heh. Michael Abrash's "Graphics
| Programming Black Book"[0] comes to mind. That thing weighs
| a ton. (I also didn't realize how pricey it has gotten in
| the used market! Yikes!)
|
| [0] https://github.com/jagregory/abrash-black-book
| myth_drannon wrote:
| yes,too bad. 500$ for a book is too much. Why not re-
| print it...
| [deleted]
| winrid wrote:
| I have a copy I got for $100, but someone had written
| "trash" on the sides, I guess until someone realized it's
| worth something lol
| hdjjhhvvhga wrote:
| Great work! I hope someone adds out of the box Allegro support...
| qwerty456127 wrote:
| Cool. What about a modern setup for VB/VBA? The last time I had
| to define a custom statistical function for Excel and had limited
| time I felt handicapped and annoyed by how dumb the code editor
| (still the same as in VB5) is.
| wolpoli wrote:
| Depending on your requirement, it might be better to create
| custom functions in Javascript [1]. One difference is that the
| functions are tied to the Excel installation, and not on the
| workbook like VBA.
|
| [1]: https://learn.microsoft.com/en-us/office/dev/add-
| ins/excel/c...
| pjmlp wrote:
| That would be VB.NET with the Office SDK.
|
| https://learn.microsoft.com/en-us/dotnet/csharp/programming-...
| ataru wrote:
| That looks really cool. I'd need more help for the next steps - a
| game loop that runs the game at a consistent speed on different
| processors, and a sound library.
| AnIdiotOnTheNet wrote:
| As I recall, at least in mode 13h on VGA cards you can poll a
| register for vsync status, so a simple way is to just busywait
| on that.
|
| Alternatively you can install your own timer interrupt for a
| higher precision counter you can monitor.
|
| Typically we wrote directly to the sound hardware back then,
| but if you're looking to have all that complexity abstracted
| (it isn't really that bad, there's good documentation out there
| and these are pretty simple devices), you could use the old DOS
| version of the Allegro library.
| badlogic wrote:
| In DJGPP, you can use uclock() to get a sort of high precision
| timer, at least much higher precision than the 18.2Hz timer
| usually employed in DOS apps.
|
| As for audio, I'm afraid I have no suggestions. My memory is
| blurry, likely because audio programming in DOS was very not
| good.
| thesnide wrote:
| I'd suggest to simply use GUS programming for audio, since it
| does all the heavy mixing in HW.
|
| It was a breeze for programmers, but a bane for consumers as
| it wasn't really compatible with the SB yet not cheap.
|
| But as dosbox emulates it very nicely, it sounds like a good
| match now.
| thesnide wrote:
| Have a look into https://bespin.org/~qz/pc-gpe/ for a trip
| down the memory lane
| mseepgood wrote:
| Just toggle the turbo button if it runs too fast.
| DanielG75 wrote:
| Does this make DOS .com files or DOS MZ executables (.exe, .com,
| .dll)?
| LocalH wrote:
| It uses DJGPP, so it makes protected mode EXEs.
___________________________________________________________________
(page generated 2022-12-23 23:01 UTC)