VGA machine and Tandy audio for Maniac Mansion?

Having problems with a specific game or application? Post your problems here!

VGA machine and Tandy audio for Maniac Mansion?

Postby celebi23 » 2012-3-09 @ 08:24

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-3-09 @ 18:59, edited 1 time in total.
User avatar
celebi23
Newbie
 
Posts: 5
Joined: 2008-6-07 @ 18:06

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby ripsaw8080 » 2012-3-09 @ 12:34

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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4232
Joined: 2006-4-25 @ 23:24

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby Mau1wurf1977 » 2012-3-09 @ 13:13

Mac version? What about a Mac emulator?
User avatar
Mau1wurf1977
l33t++
 
Posts: 7652
Joined: 2010-8-27 @ 04:15
Location: Western Australia

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby IIGS_User » 2012-3-09 @ 15:16

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... :wink:
Klimawandel.
User avatar
IIGS_User
Oldbie
 
Posts: 898
Joined: 2007-3-14 @ 19:59
Location: native_lang=ger

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby celebi23 » 2012-3-09 @ 18:58

Thanks for the responses guys :happy:

@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!
User avatar
celebi23
Newbie
 
Posts: 5
Joined: 2008-6-07 @ 18:06

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby ripsaw8080 » 2012-3-09 @ 23:51

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:
Code: Select all
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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4232
Joined: 2006-4-25 @ 23:24

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby Mau1wurf1977 » 2012-3-10 @ 08:24

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.
User avatar
Mau1wurf1977
l33t++
 
Posts: 7652
Joined: 2010-8-27 @ 04:15
Location: Western Australia

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby Great Hierophant » 2013-6-04 @ 05:28

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
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby Great Hierophant » 2014-1-27 @ 05:48

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
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby ripsaw8080 » 2014-1-27 @ 12:09

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.

Code: Select all
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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4232
Joined: 2006-4-25 @ 23:24

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby Great Hierophant » 2014-1-27 @ 17:21

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
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby ripsaw8080 » 2014-1-27 @ 17:53

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.
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4232
Joined: 2006-4-25 @ 23:24

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby Great Hierophant » 2014-1-27 @ 18:20

That did it! All is well on DOSBox.
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby Great Hierophant » 2014-2-01 @ 22:52

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
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: VGA machine and Tandy audio for Maniac Mansion?

Postby Great Hierophant » 2014-2-05 @ 21:59

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
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: CGA Composite Mode under DOSBOX (Commited r3804)

Postby Great Hierophant » 2014-2-06 @ 05:43

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

zak_000.png
zak_000.png (3.94 KiB) Viewed 2835 times


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 :

Image

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

Image

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

Image

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
IMAG1666.jpg
(134.87 KiB) Not downloaded yet
IMAG1670.jpg
(100.89 KiB) Not downloaded yet
IMAG1667.jpg
(164.52 KiB) Not downloaded yet
http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog
User avatar
Great Hierophant
l33t
 
Posts: 2374
Joined: 2003-4-27 @ 08:20

Re: CGA Composite Mode under DOSBOX (Commited r3804)

Postby NewRisingSun » 2014-2-06 @ 18:01

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.
NewRisingSun
Oldbie
 
Posts: 798
Joined: 2005-9-02 @ 02:26

Re: CGA Composite Mode under DOSBOX (Commited r3804)

Postby VileRancour » 2014-2-06 @ 23:09

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
User avatar
VileRancour
Oldbie
 
Posts: 1648
Joined: 2003-5-14 @ 22:11
Location: 1-01-80 0:00a

Re: CGA Composite Mode under DOSBOX (Commited r3804)

Postby ripsaw8080 » 2014-2-06 @ 23:20

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: http://www.vogons.org/viewtopic.php?f=33&t=31657
User avatar
ripsaw8080
DOSBox Author
 
Posts: 4232
Joined: 2006-4-25 @ 23:24

Re: CGA Composite Mode under DOSBOX (Commited r3804)

Postby NewRisingSun » 2014-2-06 @ 23:32

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
ZAKJR.zip
updated Feb 7
(73.41 KiB) Downloaded 62 times
Last edited by NewRisingSun on 2014-2-07 @ 18:03, edited 1 time in total.
NewRisingSun
Oldbie
 
Posts: 798
Joined: 2005-9-02 @ 02:26

Next

Return to DOSBox Games/Apps

Who is online

Users browsing this forum: BLEXBot [Bot] and 1 guest