VOGONS


Reply 40 of 48, by orynider

User metadata
Rank Newbie
Rank
Newbie

Just for fun is working with gus=ace or 1 or any true, other then a not null/false value like gus=0 😀

I have the original CD for the Gravis UltraSound ACE, but the driver is a workaround that I used wile I switched to more new operating system (W98 and WME).
http://en.wikipedia.org/wiki/Gravis_Ultrasound#Versions

Here I have it with other stuff like the gus ddk and some examples:
http://pubory.uv.ro/pub/index.php?dir=drv/

This is from the doc that comes with gusinit:

This is how GUSInitialize works: At first it looks for the ULTRASND environment variable. If it exists, the base add […]
Show full quote

This is how GUSInitialize works:
At first it looks for the ULTRASND environment variable. If it
exists, the base address of the GUS is being read. If it doesn't
exist (or the address is invalid), it tries to detect the GUS
at 220h (the standard default address). If this fails too, it
looks at very address from 210h to 260h.

GUSPresent (boolean) is set to True, if a GUS is detected.
GUSBAse (word) is set to its base address.
GUSEnv (string) contains the ULTRASND environment variable (or an
empty string if it doesn't exist).
GUSMem (word) contains the amount of GUS memory installed in Kb,
i.e. 256, 512, 768, or 1024.

GUSInitialize sets the maximum number of voices to 16. If you you
needn't that much voices, don't worry, it's okay. If you need more
than 16 (up to 32 simultaneous), use GUSInit(16) (see below).

Base 240h was used back then for GUS only since 220h was used for the sb16 or vibra or pro or awe32, in small games or programs that ignored the settings from config.sys or autoexec.bat files.

Reply 41 of 48, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

I have some free time today so I will post the latest updates of DOSBox-x and will try to get Battlecruiser 3000 working on my end.

http://jon.nerdgrounds.com/dosbox-x-hackipedi … 828-1452.tar.gz

Updates:
- ISA Plug & Play emulation, based on the Plug & Play BIOS specification. Emulation of the actual PnP I/O ports (0x279, 0xA79, and a movable I/O port for reading) is not yet implemented, which is OK. I have an old Toshiba laptop that implements Plug & Play in the same manner, no actual PnP IO ports but the BIOS is compliant. Windows 95 is happy. The installer sees the PnP BIOS and enumerates the devices just fine.

I'd like to note that in typical Microsoft fashion, they helped design the Plug & Play specification, then built Windows 95 to rely on an undocumented "quirk" with the 16-bit protected mode entry point, which probably explains why Win95 installs in Bochs and QEMU always end up with the Device Manager showing a "Plug & Play BIOS" with a yellow icon and a complaint that the PnP BIOS is not working.

And the quirk is..... the implication that the entry points are 16-bit (real or protected) and therefore all pointers involved including the stack pointer are 16-bit. So of course... Windows 95 calls the 16-bit entry point with a stack pointer set to something like 0x30:0xC127BDAF and expects the PnP BIOS to make full use of all 32 bits of the stack pointer.

I wonder how many BIOSes Microsoft broke pulling that stunt? 😀

Reply 42 of 48, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

Updates on Battlecruiser 3000:

If no VESA BIOS is present: Game starts up, hangs with PC speaker left on (BEEEEEEEEEEEEEP). Which means the lame ass programmer couldn't be bothered to exit to DOS cleanly with "VESA BIOS not found". Durrh.

With >= 64MB of RAM, whether within Windows 95 or not, the game crashes. It causes DOSBox to exit with the error message described in prior posts, while under Windows 95 it just causes the DOS Box to exit.

I still see the intro video glitch out mid-way.

I am not however seeing the same problem described in that post. I am able to click on "configure" and other menu items without problems. This is running in the Windows 95 dos-box though, I see the same "Gate selector" error message in Windows 95 DOS mode even with 48MB or even 31MB of memory. DOSBox DOS mode (without booting) gets the game going, but then, yeah, the menu screen doesn't respond to mouse input unless you say "start game".

This game seems like a great idea that was implemented by hackjobs calling themselves programmers. I can't imagine what magic voodoo they chose to code that happens to require Windows 95. From what I've seen of the game so far, there's absolutely no reason for something like this to require 32MB of RAM. Quake has far more detail and logic than this and I remember running that quite comfortably in 16MB of RAM, even under Windows 95!

Holy crap---in the 5 minutes it took to type the prior paragraph the "start new game" selection screen finally came up! And the game worked fine up until I selected "systems" "config"----oh, nope. 1 minute later the config menu came up.

Again they must have had some absolutely horrible memory management system in this game to crawl THIS long in DOS mode. Shame!

Reply 43 of 48, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

Almost forgot.

Exiting to DOS is also a long painful wait.
And running the game in Windows 95 DOS mode with 16, 24, 32, 48, and 64MB of RAM always results in the "invalid selector type 0" message.

Reply 44 of 48, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

I also read reviews on the game as well as the history as told by the developer. It sounds like the game is crashy because the game actually is crashy on real hardware too. The developer's history log suggests it came about because of incomplete programming and Take Two cutting it up to make a sale. I don't think it's worth breaking DOSBox to make it work. It might be worth it instead to break out the hex editor and do some executable patching, such as adding code to properly initialize things or to patch out whatever is causing the long delays in DOS mode. If done right, you could hack the game to actually work properly.

First, the game crashes constantly, more than any game I have ever played. Almost any action you perform will cause the program to go south. I didn't know what half the functions were or how to use them. Most of them don't work: going into orbit around a planet, using jump points, navigating to distant star systems, docking, and so on; the list is long. Objects pass through other objects. Ships don't do what they're told. Equipment won't work. I won't even go into the alleged ground combat mode because I couldn't make heads or tails of it, never got it to work, and haven't been able to find anyone who can even tell me if it's even in the game or not. Best of all, the campaign can't be played past the second mission, which is structured in such a way that it cannot possibly ever end.

And then this hilarious gem:

All of this is made a thousand times worse by a manual that is more like an un-manual. If I fed my dog a set of Scrabble tiles he could have crapped a better manual.

http://www.gamespot.com/pc/strategy/battlecru … y%3Bread-review

Reply 45 of 48, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

Finally, whether or not a DPMI server is present doesn't seem to matter.
Or else, it doesn't like CWSDPMI.EXE. I thought that might matter because it refers to INT 31h which is how you call DPMI.

Reply 46 of 48, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

Alright I have some interesting findings for you.

I just found out that on a GUS MAX card I obtained from ebay, the Ultrainit software will give you the same result. Obviously it can see the card and initialize it to some degree (enough to make a slight "pop" sound in the speakers) but it gives the same error message. But playing with the SETUP program showed me why: The program will not init a GUS MAX unless ULTRA16 is also set to point at the onboard "codec" on the GUS MAX. Only then did ultrinit work (on real hardware). I had to look at what SETUP.EXE was adding to AUTOEXEC.BAT.

Test machine is a 133MHz Pentium MMX with 32MB of RAM on a motherboard I bought back in 1996. Just to clarify that the motherboard originally had a 100MHz Pentium that I later replaced with the MMX version. The GUS is connected to one of 3 ISA slots and the BIOS is configured so the PCI-ISA bridge passes through IRQ 5 and DMA channels 1 & 5. The ultrasound PLAYMIDI program works perfectly, as do several mid-1990's MS-DOS demos including 2nd Reality (with GUS) and Dope. The "hard drive" is a 2GB compact flash card connected through an IDE-CF adapter because the original hard drive died a few years ago and the BIOS (dated sometime 1995) seems to max out at 2GB anyway.

Why Gravis didn't write ultrinit to detect a GUS MAX, but init as GUS classic if ULTRA16 wasn't set, is beyond me. Going 'round and 'round with SETUP.EXE reporting the card OK and ULTRINIT.EXE whining is definitely a sanity test. I have a PDF of the Interwave (GUS ACE and higher) chipset that shows the MAX/ACE and later cards faithfully reproduce the legacy register set and behavior until "enhanced" bits are set, then you can remove the sample rate limit beyond 14 voices, program the voices beyond the 1MB boundary and do GUS DMA transfers with finer accuracy to onboard RAM.

Now apparently you're running a newer version of DOSBox from SVN that has new emulation code for gus classic, max, ace, etc. I'm not using the latest SVN copy but I would definitely try setting gus=max and then manually adding in ULTRA16=34C,0,0,1,0. I would say that if DOSBox truely wants to emulate a GUS MAX it needs to automatically add that for you, just as it does the ULTRASND variable.

I also toyed with SBOS and MEGAEM on real hardware. They absolutely suck donkey balls and I can't believe Gravis would even ship such utter crap with their excellent software. SBOS pretends to be a SoundBlaster 2.0 (DSP v2.1, not even a Pro) but doesn't support auto-init DMA like a real one does, which probably choked quite a few DOS games I'm sure. It also responds to the DSP copyright string command with ASCII byte 0x01 for some weird reason. MEGA-EM is even more downlevel, pretending to be a Sound Blaster with DSP v1.3 and an extremely limited DSP command set complete with hanging with system and crashing with an error message if the program dares to use any unsupported DSP commands.

And when MEGA-EM is resident, don't run anything that depends on DOS 4/GW or other DOS extenders unless you want your system to immediately crash and reset. Especially if SMARTDRV is resident, and running a system spawned from a Windows 95 boot floppy. I don't know if MS-DOS 6.22 has this problem. If SMARTDRV is not loaded, you can unload MEGA-EM and use DOS extenders again without crashing.

I also noticed neither attempts to correctly emulate Sound Blaster DMA timing. In a SoundBlaster test program I wrote you normally see the program play a sound block, and the DMA counter moves right along with the sound, with the IRQ firing off the minute terminal count finishes. With Gravis SBOS/MEGA-EM, the program starts a block and DMA transfers *way* too fast, sits at terminal count for 3/4 of the time, then the IRQ fires at the proper time. If anyone here has memories of DOS games skipping and stuttering horribly with SBOS/MEGA-EM, well, now you know why, considering there were plenty that relied on the DMA counter for timing. Also, SBOX ignores ADPCM playback while MEGA-EM emulates it but decodes the packed bits wrong, giving staticky distorted audio.... I mean more staticky and distorted than when decoded correctly by DOSBox or an actual SB.

I'm starting to wonder if perhaps Gravis failed not necessarily because Creative had stronger marketing, but because Gravis apparently had such poor code and design in emulating a Sound Blaster. It's sketchy enough the card re-uses some GUS registers to fake via NMI the SoundBlaster DSP, the least they could've done is have the card respond to an adjacent port range (like 220-22F if the card sat at 240-24F) and write some better NMI code to fake the whole card. They could've had proper DMA timing emulated by allowing SBOS, MEGA-EM, or the driver to have finer control over the DMA transfer rate (instead of a 2-bit register to select between 650KHz divided by 1, 2, 3, or 4). Frankly if their emulation sucks this bad I think it would have been better to not do SB emulation at all.

I also wrote a test program to run the GUS through it's paces and I found a few differences from DOSBox' emulation.

1. DMA status/terminal count register. There is a DMA terminal count IRQ bit pending and a bit to enable the actual IRQ when DMA finishes. DOSBox does not set the pending bit if IRQ is not enabled. A real GUS MAX will always set the bit on DMA transfer complete, though it doesn't fire the IRQ unless enabled.
2. DMA terminal count clearing and starting a new transfer. DOSBox: you can always start a new transfer by writing a new transfer into place and unmasking the DMA. Real GUS hardware: you must write 0x00 to the register to shut off DMA, then read the register to clear the DMA terminal count event, and THEN program a new DMA transfer. The card won't do any DMA transfers until the terminal count event is cleared.
3. DMA reliability issues. DOSBox: DMA transfers are always 100% reliable and all sound data makes it through. Real GUS MAX hardware: If you set up a DMA transfer, unmask the channel, then program the DMA transfer, the GUS MAX will sometimes carry out the DMA but randomly NOT write the acquired bytes to DRAM (about once every 100th sample or so). If your program uploads samples and they sound staticky or buzzy, and bits of the previous DRAM data are audible, then your program is suffering from this hardware bug. You have to set up the DMA controller channel, leave the channel masked while setting up the GUS DMA transfer, and then finally start the transfer unmasking the channel on the DMA controller. Final note: writing your code to do block DMA transfer mode does NOT help, the GUS can't seem to keep up in that scenario and it will miss about every other byte. You have to use single or demand DMA transfers.
4. GF1 chip reset procedure. DOSBox: writing 0x00 to the reset control, then writing 0x03 to end reset and enable line-out, will read back 0x03 from the same register. Real GUS hardware: Writing the register as described above seems to read back 0x01 instead, indicating that for some reason the DAC wasn't turned on by the write, pehaps the leading edge of the RESET signal triggered by your I/O turns it off. Writing 0x03 and reading back again then yields 0x03.
5. Voices: bidirectional looping. DOSBox: Programming a start value of 0 and an end value of the last sample, and setting current position to 0 will cause the sample to play forwards, then backwards, then forwards again. Real GUS MAX hardware: The sample will play forwards, then play backwards, then completely miss the starting point and wrap around to 0xFFFFF and beyond still going backwards and playing whatever junk was left there (the last used MIDI patches if you recently ran PLAYMIDI.EXE, for example). If you made the mistake I did, writing the mode byte first, the card will immediately start at 0 and play backwards down from 0xFFFFF. Workaround: write the voice "mode" byte last. Program the starting position at sample offset 1 (or 2 if 16-bit) and the current position at the start position.

I hope this information is useful for making the GUS emulation more accurate in case any DOS program relies on it.

Reply 47 of 48, by TheGreatCodeholio

User metadata
Rank Oldbie
Rank
Oldbie

Another DOSBox-x update:

- Fixed coding typo that caused the build to suck up 1GB of RAM regardless of ramsize. My laptop can load DOSBox-x without swapping heavily now 😀

- Full ISA Plug & Play emulation, including CSN card assignment and PnP IO port functions enabling configuration and IO resource assignment. Not yet tested with Windows 95, but a test program I wrote is happy and able to "see" the devices.

- Fixed a bug in Sound Blaster emulation where Goldplay mode would not stay enabled if the DOS program used auto-init DSP commands

- Added SB16 ViBRA Plug & Play emulation. Set sbtype=sb16vibra to enable. Currently functions exactly as sbtype=sb16 with the addition of ignoring mixer bytes 0x80-0x81 (like real hardware) and responding to ISA PnP I/O to retrieve and accept configuration changes. Reports itself as CTL0070 (Creative Sound Blaster 16 ViBRA C Plug & Play) Note that at this time, limitations in DOSBox's architecture do not permit PnP emulation to change IO port resources, especially for the MPU, OPL3 and gameport devices listed in PnP resource data.

Enjoy!

http://jon.nerdgrounds.com/dosbox-x-hackipedi … 003-2310.tar.gz

Reply 48 of 48, by orynider

User metadata
Rank Newbie
Rank
Newbie

I found this capture of "Untitled Dust Demo from ASM '93" that is on the Gravis Ultrasound CD in DEMOS\UNTITLED\:
UNTITLED.ZIP
edit: right click the file to download, then use Save As, since the host prevents direct refrence from another site.
http://www.youtube.com/watch?v=gy2igHZjBgg

I can see, or not, that the video dies just after the loader, wile the main demo, when the ball is in the labrint and the video is back at credits part.