VOGONS


Problem with Tandy Video (Mac OSX + DOSBox 0.74)

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by nfitzkee

User metadata
Rank Newbie
Rank
Newbie

Hello,

I'm having difficulty with graphics when using DOSBox 0.74 in Tandy mode on my PowerBook G4 (Running Mac OSX 10.4.11). Specifically, I use machine=tandy to hear the 4-channel audio on old Sierra AGI games. This has worked fine on my PC, but recently when I tried doing it on my Mac, I get vertical scrambling when the game loads (an example is attached for Kings Quest 1). The scrambling also appears for other games as well (e.g. Railroad Tycoon running in Tandy mode).

I downloaded DOSBox 0.73 and the problem is also present there. As I mentioned, the games seem to run fine on the PC version of DOSBox (using machine=tandy), and the text mode (i.e. the DOS prompt) shows no problems. The video issues go away on the mac when running in svga_s3 mode.

Below I have included what I think are the relevant lines in my dosbox.conf file. This is the simplest resolution/scaling I can think of, but the defect appears for higher quality settings as well.

[sdl]
fullscreen=false
fulldouble=false
fullresolution=original
windowresolution=original
output=surface
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper-0.74.map
usescancodes=true

[dosbox]
language=
machine=tandy
captures=capture
memsize=16

[render]
frameskip=0
aspect=false
scaler=none

[cpu]
core=auto
cputype=auto
cycles=auto
cycleup=10
cycledown=20

[dos]
xms=true
ems=true
umb=true
keyboardlayout=auto

[autoexec]
MOUNT C "/DOS Volume"
C:

Attachments

  • sierra_000.png
    Filename
    sierra_000.png
    File size
    5.32 KiB
    Views
    2815 views
    File comment
    Screen shot of KQ1 on Tandy system.
    File license
    Fair use/fair dealing exception

Reply 6 of 24, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++

OT but you should try the Apple II versions.

These blow the PC and Tandy Music out of the water. Let me know if you want more details!

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

Reply 7 of 24, by nfitzkee

User metadata
Rank Newbie
Rank
Newbie

I'd be curious to know if the Apple II versions were better. I had an apple //c back in the day, and I recall the sounds being identical to the PC speaker (single channel). The IIgs versions often had better sounds, but I thought they were just using the four channel sound built in to the AGI scripts. The Tandy has the same sound hardware as the PCjr, and although I never compared directly I think the 4-channel sound I get from the Tandy emulation, e.g. Gold Rush, is similar to the sound I got on the IIgs version. Let me know if they were actually different.

Back to the point, if it is an endian issue it would be straightforward to fix, since presumably the same code already exists in the svga_s3 emulation (which reproduces the graphics correctly). On the other hand, I would have thought much more serious problems would have arisen if the chipset emulation was off in this way.

Reply 9 of 24, by nfitzkee

User metadata
Rank Newbie
Rank
Newbie

Sure, I'll take a look. I haven't poked around in the source before, but presumably there is a source file that handles the s3 hardware emulation, one that handles the tandy emulation, and a couple of macros/defines that determine how to handle addressing when there's a difference in the architecture (e.g. x86 on POWERPC). The endian conversion might actually be handled in the SDL, but I imagine there's probably something in the DOSBox code, too. I may be grossly oversimplifying, but it seems that this would be the minimum requirement for a program like DOSBox. I'm thinking that someone already had to solve this problem for the s3 emulation, and my plan would be to compare and see where the code was left out for the tandy video.

If any of that sounds correct, you could help me out by directing me to the code where s3/tandy emulation is handled (and the relevant define statements). Also, is there anything special to running DOSBox with a debugger? I prefer gdb/ddd, but there will be a learning curve either way, so I can learn another debugger if it's better.

Thanks in advance for any help. I can't guarantee I'll be able to make any headway, but I can at least try to contribute.

Reply 10 of 24, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Try compiling dosbox, then enable debug symbols so you can use gdb with it.

Another thing you can easily use is LOG_MSG() (like printf) that will output strings
into the console window, so you can track what code is called.

First check what happens in VGA_SetupHandlers() (vga_memory.cpp which also
contains much of the graphics memory related functionality).

vga_draw.cpp contains the routines that transfer data from emulated memory to
the graphics surface so that's most likely where the bug lies (put some LOG_MSGs
there to check wich function is used for the game).

Feel free to post here about progress or questions.

Reply 11 of 24, by Mau1wurf1977

User metadata
Rank l33t++
Rank
l33t++
nfitzkee wrote:

I'd be curious to know if the Apple II versions were better.

SQ1: http://www.youtube.com/watch?v=XdUfOohO8mU&feature=related

Even features digitized voice right at the start!

KQ1: http://www.youtube.com/watch?v=puof3EErVYw

The Amiga versions are also quite good for these older Sierra Games.

Reply 12 of 24, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

With machine=tandy the AGI games use the 4BPP line drawing, which looks to be working with bytes.

Have output options other than surface been tried? There is endian stuff in sdlmain.cpp, which might be a good place to investigate if the issue is limited to certain output types.

Reply 13 of 24, by Riyune

User metadata
Rank Newbie
Rank
Newbie

I just acquired an old iBook and the first thing I used it for was DOSBOX for OS X. Have the same "flipped" scrambling in Tandy modes. Glad I found this thread before posting. After 8 months, is there any news? This old iBook is a little slow for VGA games, but CGA and Tandy era generally run okay. The scrambling is consistent in several different games, and has not crashed anything yet.

Jesus loves you, unless you have tatoos. Then you are going to hell.

Reply 15 of 24, by Riyune

User metadata
Rank Newbie
Rank
Newbie

I could possibly come up with another old iBook like this. But I'm in central USA, and I think the Dosbox crew is in Europe? Shipping might be an issue. Send me a private message if you consider it worth doing.

Jesus loves you, unless you have tatoos. Then you are going to hell.

Reply 18 of 24, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I can test stuff if you need me to, I have both a PPC and Intel Mac around for testing stuff (I might need to look for the tandy KQ1, though),

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 19 of 24, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Thanks for the offer, I accept 😀

Attached a patch with logging of the video memory vs output values. They are logged to the console.
Go to the screen that is depicted above and post one line.

On x86 the line looks like this:
vram 00,0f,f0,00, output 00,00,00,0f,0f,00,00,00

Attachments

  • Filename
    4bpp_logging.diff
    File size
    921 Bytes
    Downloads
    204 downloads
    File license
    Fair use/fair dealing exception

1+1=10