|
[Allegro 4.2.2] blitter code questions |
hydexon
Member #23,394
June 2022
|
Hi, new here. started to use Allegro 4.2.2-xc, the one with the sound blaster fix patch. i forked the project to make it work under OpenWatcom 2 and CMake. I'm in the works to port Allegro 4.2.2 to the japanese computer NEC PC-9800 series, the PC-9821 in particular, which is a x86 non-IBM compatible very popular in japan,that never made it in western countries, looks like many the code in Allegro DOS can be reused for the PC-9821 platform, except the video, sound and inputs, which i'm in progress of research. So the main reason i wanted to port it instead to roll my own framework, is the software blitter assembly code present in Allegro which it looks fast and MMX support, i really want to know the i386 assembly code used for the blitter is independent of any graphics hardware/subsystem or not, so i can use it in that platform, the graphics hardware is similar to VGA like chunky pixel addressing modes. |
Chris Katko
Member #1,881
January 2002
|
Well, almost by definition, assembly is only used on platform specific code. The NEC PC-9800 either does use a VGA compatible videocard, or it doesn't. It does use a DOS compatible BIOS or it doesn't. Even if it uses the same CPU, that doesn't mean the motherboard design, BIOS, etc are remotely the same. The memory layout of how to control things is different. A quick google for this post below says they had bare compatibility for console applications and that's it. Bus is different, bios, ports, memory mapping (how you communicate with the hardware) is all different. https://nfggames.com/forum2/index.php?topic=6045.0 So it's extremely unlikely. You're much better off finding a NEC PC specific game programming library, possibly here: https://www.target-earth.net/wiki/doku.php?id=blog:pc98_devtools [edit] Okay, so the more I re-read your post, it looks like you know most of this and you're asking specifically only about the general internals. That's gonna be some oldschool insider dev knowledge so I'll STFU about that. -----sig: |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I can't help with your question, but I have a favor to ask. Can you apply your Watcom2 and CMake changes to a fresh fork of Allegro 4.4.3 and submit a pull request? We would greatly appreciate the patch if it applies cleanly. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
hydexon
Member #23,394
June 2022
|
I was able to make a 3D software renderer for that japanese computer somewhat easily since the hardware behaves like the VGA chunky pixel mode addressing (aka Mode 13h) as well trying some Window accelerators working under it. Inspected the assembly code and it looks like most the blitter assembly involved about system RAM buffer manipulation (aka Software BitBlt) and vector math code, i can't find any specific hardware register, interrupt, memory I/O calls at all, except calls to get the CPUID instruction result, as well some VGA planar graphics related code, which probably will not be called anyway because i'm targeting chunky pixel mode, not planar modes. About my fork the CMake code is a total mess because CMake cannot reliably detect DJGPP GNU Assembler, in fact is partially broken because OpenWatcom v2 had some changes in the tools command line syntax breaking the scripts, plus that also relies the user had DOSBox-X installed in your system and is able to detect it in a hardcoded path. Here's the repo anyway: https://github.com/hydexon/allegro-4.2.2-xc/ |
Edgar Reynaldo
Major Reynaldo
May 2007
|
What was the setup you used? DosBoXX and OpenWatcom? Did you need DJGPP? Can you show me the steps you took to build allegro? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|