VOGONS


First post, by celebi23

User metadata
Rank Newbie
Rank
Newbie

Let me first say that I'm using DOSBox 0.74. I'm trying to replicate the Mac version of Maniac Mansion (that was included in Day of the Tentacle) as closely as possible. It has a VGA/MCGA graphics mode BUT, uses Tandy as the sound driver. I was wondering if there's any way to accomplish this in DOSBox? If I change the machine type (in the Dosbox.conf file) from tandy to say vga, the tandy audio reverts to whatever the default is (pc speaker?).

If I have the machine set to tandy and try and change Maniac Mansion's preference file (turning off tandy and turning on either vga or mcga), just a blinking cursor shows up when I start the game. If I try changing the graphics from tandy to vga (by pressing shift + v), nothing happens. I'm only able to change it to cga (by pressing shift + c). I've already accomplished this in ScummVM but, I wanted to try it in DOSBox because, I wanted to keep the original save/load menu. I know that this is a bizarre request but, any help would be awesome :happy Thanks!

Last edited by celebi23 on 2012-03-09, 18:59. Edited 1 time in total.

Reply 1 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Because you mention what is included in DOTT, I gather you're referring to the original and not the enhanced version of Maniac Mansion. AFAICT, the only notable difference in appearance between EGA/VGA and Tandy graphics is the text and pointer, so doesn't seem significant to me.

Most DOS games supporting Tandy sound will only use it when they detect a Tandy system, usually by looking for signatures in the BIOS. Those signatures are only visible in DOSBox with the machine=tandy setting; and currently there is no way to use VGA graphics with the Tandy machine type.

I was able to get VGA graphics and Tandy sound in the game with machine=svga_s3 and tandy=on settings in DOSBox by hacking MANIAC.EXE to recognize the BIOS signatures of a standard PC as those of a Tandy. The particular combination of graphics and sound is easier to get in ScummVM, because it is not bound by hardware detection.

Reply 3 of 28, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie

Why not simply browse ScummVM to the Maniac Mansion subfolder?

Leave the original Load/Save menu behind and use your options to run the game... 😉

Klimawandel.

Reply 4 of 28, by celebi23

User metadata
Rank Newbie
Rank
Newbie

Thanks for the responses guys 😀

@ripsaw8080, Yeah, sorry, I should've been mentioned that I'm using the original Maniac Mansion. I was wondering how you were able to hack Maniac.exe? What you were able to get (VGA graphics and Tandy sound) is exactly what I'm looking for. I know that it doesn't seem that significant but, I am trying to replicate the Mac port as closely as possible.

@Mau1wurf1977, I've tried Mini vMac, Basilisk II and SheepShaver. In Mini vMac, some graphics were missing and the game ran waaay too fast. In Basilisk II, the music was slow/glitchy. In SheepShaver, the game's music is a bit better but, the game just crashes SheepShaver.

@IIGS_User, I've already got that set up in ScummVM (there's no directory in the Mac version. Everything is lumped together in a "Day of the Tentacle Data" file. I extracted the Maniac Mansion game files from that) BUT, the game runs a bit too fast. I was wondering if I could accomplish the same thing in DOSBox so, I could keep the original save/load menu and have the game run at it's normal speed.

Thanks again for the responses!

Reply 5 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
celebi23 wrote:

I was wondering how you were able to hack Maniac.exe? What you were able to get (VGA graphics and Tandy sound) is exactly what I'm looking for.

This is the code in MANIAC.EXE that looks for Tandy BIOS signatures, but note that it might be slightly different and at different offsets in your executable if you have some other version:

006EF BB FF FF       MOV    BX,FFFF
006F2 8E C3 MOV ES,BX
006F4 BB 0E 00 MOV BX,000E
006F7 26 80 3F FF CMP BYTE PTR ES:[BX],FF
006FB 75 22 JNE 0071F
006FD BB 00 FC MOV BX,FC00
00700 8E C3 MOV ES,BX
00702 2B DB SUB BX,BX
00704 26 80 3F 21 CMP BYTE PTR ES:[BX],21
00708 75 15 JNE 0071F

It looks for specific bytes at addresses FFFF:000E and FC00:0000. Modifying two bytes at offset 006EF to EB 19 jumps over the test so a Tandy will always be detected no matter what is in the BIOS.

Running the hacked executable with machine=svga_s3 and tandy=on settings in DOSBox will result in VGA graphics and Tandy sound. Pressing Shift+T in the game to activate Tandy graphics will not work correctly with a VGA machine type, in case that isn't obvious.

Reply 6 of 28, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++

I think ScummVM is faster on purpose. For example the C64 version is heaps faster compared to the real thing 😀 Makes it easier to play IMO but I understand what you mean.

My website with reviews, demos, drivers, tutorials and more...
My YouTube channel

Reply 7 of 28, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

I hate to ressurect an old thread, but I found that the code that ripsaw8080 can be found in the executables of the low and high resolution versions of Maniac Mansion and Zak McKracken. One real-world benefit this change has is that it will allow these games to work with a PCjr. with "Tandy Graphics and Sound" instead of CGA graphics and PC Speaker sound.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 8 of 28, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

Actually, I was not quite correct in my previous post. I was able to use ripsaw's example to force Maniac and Zak to use Tandy sound in the pcjr. machine type. Still, the game will only give me CGA graphics with the Jr. How do I force them to use the Tandy graphics adapter with the Jr.?

Mau1wurf1977 wrote:

I think ScummVM is faster on purpose. For example the C64 version is heaps faster compared to the real thing 😀 Makes it easier to play IMO but I understand what you mean.

You can't complete the C64 or Apple II versions in ScummVM, at least not without some workaround for the basement vault door combination. You would think that they would have fixed this in the years since they implemented support, but they have been too busy trying to shoehorn new games to make sure that the first versions of the game from which the program derives its name can be fully completed.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 9 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
Great Hierophant wrote:

I was able to use ripsaw's example to force Maniac and Zak to use Tandy sound in the pcjr. machine type. Still, the game will only give me CGA graphics with the Jr. How do I force them to use the Tandy graphics adapter with the Jr.?

Maniac Mansion sets mode 4 and then switches to 16-color mode with register writes that are specific to Tandy. A hack that seems to work is to set mode 8 instead of mode 4, but a real PCjr might not be as tolerant as DOSBox.

0B9D5 C6 06 4A 30 04    MOV    BYTE PTR [304A],04

The above machine code example is from the original version of MANIAC.EXE, and the hack changes the 04 to 08. The code in this part of the program is rather oblique for something that could be done in a more direct way, and I haven't checked how similar it is to Zak and the enhanced games that were released later.

Reply 10 of 28, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

I was incorrect in my previous post, because to me the graphics looked like CGA once the Tandy detection had been bypassed, but were really 16 color graphics being displayed in a 4 color mode. Hence the serrated look to the text. The fix ripsaw posted to switch graphic mode 04 to 08 works in DOSBox for low resolution Maniac Mansion in the PCjr. mode, you get proper 16-color graphics. Whether it will work on a real PCjr is a question that will require someone with real hardware to test. I only have a 128K PCjr., so I can't test it yet. The low resolution versions of Maniac and Zak require 256K and the high resolutions 384K.

Now the high resolution versions of Maniac and Zak don't require the mode fix, presumably because they don't do the same thing that causes the graphics to fail on a PCjr. The detection fix will make them work in 16 colors on a PCjr, but on the real hardware they will be slow unless you have an overclocked jr and will require the "Tandy-mod" or only every other line will be displayed. Atlernatively, if you have good modding skills, you can hack the executable to change the graphics window.

Oh, and another PCjr./Tandy incompatibility : The Video Gate Array (VGA) on the PCjr. requires address and data writes to port 3DA. A read of 3DA sets the port into address write mode, otherwise it is in data write mode. Tandy must have thought that this was not ideal, so the Tandy VGA has address write port at 3DA and the data write port at 3DE. Unfortunately, this will break compatibility with any game that hits the VGA registers of one machine and neglects the other.

There is no exact equivalent of the code fix given for Maniac, above, for low resolution Zak.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 11 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The instruction to be hacked in Zak appears to be the same, but its offset and the memory address it references can vary. I've looked at two distinct versions of ZAK.EXE from July 1988: in the executable that is 74,965 bytes the instruction is at offset AF0A; in the executable that is 75,021 bytes the instruction is at offset AF12. It's reasonable to assume that the instruction will be around the same area in other versions.

Reply 13 of 28, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

Having obtained a jrIDE, not all is well. On DOSBox, moving the cursor in Maniac or Zak Enhanced, Indy 3, Loom or Monkey Island where Tandy is forced, whether by command line argument or hacking the tandy detection, the cursor will leave trails on the screen. This does not occur on a real PCjr.

However, the PCjr has an issue. With the low resolution versions of Maniac and Zak, the first five or six pixels on each line are not drawn on the screen. "Give" is "ive" for example.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 14 of 28, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

I fixed the Maniac and Zak low resolution cut-off picture in the PCjr. When the PCjr. enters Mode 08h in these games, it draws the active display too far to the left. A portion of the active display page is obscured by the monitor bezel. Shifting the screen to the right twice with Ctrl + Alt + Pg Down fixes the problem and centers the active screen on an RGB monitor. (Ctrl + Alt + Pg Up shifts the screen to the left). You can use these key combination just about anywhere, in BASIC, in DOS, or in game. I had an inkling that something like this was causing the problem but did not fully understand until I read my Guide to Operations and tested it on a TV screen.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 15 of 28, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

Regarding Tandy and PCjr composite output consider the following screen captures of this RGBI DOSBox base :

zak_000.png
Filename
zak_000.png
File size
3.94 KiB
Views
4634 views
File license
Fair use/fair dealing exception

Here is how this image of the game, hacked to work on the PCjr., looks on an IBM Model 5153 Color Display from the PCjr (after the necessary centering adjustment) or the Tandy 1000 SX :

file.php?mode=view&id=13792&sid=59ed5372b67b10a6007c56e8a4b7d542

Here is the image for that RGBI screen on a color TV using the Tandy 1000 SX's composite output :

file.php?mode=view&id=13793&sid=59ed5372b67b10a6007c56e8a4b7d542

Looks pretty close to the RGBI ideal, doesn't it? But check out the PCjr.'s composite output :

file.php?mode=view&id=13794&sid=59ed5372b67b10a6007c56e8a4b7d542

What is up with that? Usually the PCjr. composite output is pretty close to the RGBI colors with other 160x200 graphics, whether true 160x200 mode usage like Pitfall II or pseudo-160x200 King's Quest. But here when the game has been made to do identical things regardless of hardware, one system gives close colors and the other system gives bizarre colors.

Attachments

  • Filename
    IMAG1666.jpg
    File size
    134.87 KiB
    Downloads
    No downloads
    File license
    Fair use/fair dealing exception
  • Filename
    IMAG1670.jpg
    File size
    100.89 KiB
    Downloads
    No downloads
    File license
    Fair use/fair dealing exception
  • Filename
    IMAG1667.jpg
    File size
    164.52 KiB
    Downloads
    No downloads
    File license
    Fair use/fair dealing exception

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 16 of 28, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

Zak does not detect the PCjr at all, running in CGA mode.

You mentioned something about a hack. One would have to know what exactly this hack does. ZAK.EXE in Tandy mode sets up CGA mode 4 (320x200 4 colors), then writes directly to the registers to set up the 16 color mode. Unless the hack meticuously changed the Tandy register writes to PCjr register writes, the result will not as it should.

Therefore: Have you verified that the RGB image is correct on the PCjr? Otherwise it wouldn't be a composite problem, but just a case of the PCjr's registers being incompatible with the Tandy 1000, which is well-known.

Reply 17 of 28, by VileR

User metadata
Rank l33t
Rank
l33t
NewRisingSun wrote:

Therefore: Have you verified that the RGB image is correct on the PCjr? Otherwise it wouldn't be a composite problem, but just a case of the PCjr's registers being incompatible with the Tandy 1000, which is well-known.

Looks like he has (second image from the top).
I'd also be interested to know what that hack does; perhaps something about it messes with the display timing parameters causing an odd phase shift somewhere.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 18 of 28, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The hack is about as simple as can be contrived: set mode 8 instead of mode 4. However, the Tandy register writes, rather than being entirely ineffective on a PCjr, may instead cause issues...

The thread discussing the hack: VGA machine and Tandy audio for Maniac Mansion?

Reply 19 of 28, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie
VileRancour wrote:

Looks like he has (second image from the top).

I read that image's caption as having been taking from a Tandy 1000 SX.

ripsaw8080 wrote:

The hack is about as simple as can be contrived: set mode 8 instead of mode 4.

And the autodetection modification as well, I presume?

ripsaw8080 wrote:

However, the Tandy register writes, rather than being entirely ineffective on a PCjr, may instead cause issues...

Attached executable just sets BIOS mode 8 and bypasses the register writes completely. See if that makes any difference for the composite output, and how it affects the centering issue.

Attachments

  • Filename
    ZAKJR.zip
    File size
    73.41 KiB
    Downloads
    161 downloads
    File comment
    updated Feb 7
    File license
    Fair use/fair dealing exception
Last edited by NewRisingSun on 2014-02-07, 18:03. Edited 1 time in total.