VOGONS


First post, by andrewwan1980

User metadata
Rank Newbie
Rank
Newbie

I was excited to get DOSBox running on PSP, run Turbo C++ 3.0 and compile a Hello World program and got it working. Fantastic! Now I can do oldskool DOS graphics programming that I should've learnt back in 1994 but found too hard.... on the move, train, waiting in queues, etc, etc.

Anyway, am following infamous Graphics Programming tutorials written by Grant Smith, aka Denthor of Asphyxia:

http://www.cprogramming.com/tutorial/denth.zip

To test I run the precompiled exes in DOSBox in Windows. They all run 100%. Then I compile them in DOSBox in Windows and that's fine too. Then I run the DOSBox Turbo C++ built exes in DOSBox. They don't run anymore.

Reply 2 of 9, by andrewwan1980

User metadata
Rank Newbie
Rank
Newbie

They all compile & run perfectly fine under native Windows XP 32-bit on a 32-bit CPU (like the old original P4). It's just if one compiles using DOSBox's Turbo C++ then it produces wrong machine code (I think).

But the point is, I want to help debug and get DOS graphics working from a Turbo C++ 3.0 build.... how can I go about this?

Reply 3 of 9, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Yes, they all run perfectly fine under native Windows XP

The compiled ones, right??

I want to help debug and get DOS graphics working from a Turbo C++ 3.0 build

What's wrong with them? Maybe you can put up a short sample (preferrably
.exe and .c files) with a short explanation what doesn't work. If you want to
play around with it yourself, try some debugger-enabled build of dosbox.

Reply 4 of 9, by jal

User metadata
Rank Oldbie
Rank
Oldbie
andrewwan1980 wrote:

They all compile & run perfectly fine under native Windows XP 32-bit on a 32-bit CPU (like the old original P4). It's just if one compiles using DOSBox's Turbo C++ then it produces wrong machine code (I think).

Ok, there's 2x2 situations, all of which you should test:

1) compiling with TC++ on Windows, run under real DOS (or Windows)
2) compiling with TC++ on Windows, run on DOSbox
3) compiling with TC++ on DOSbox, run under real DOS (or Windows)
4) compiling with TC++ on DOSbox, run under DOSbox

If I understand you correctly, you tried 1 and 4? You should also compare the EXE files from compiling under Windows and compiling under DOSbox, is there any difference?

JAL

EDIT: changed VC into TC.

Last edited by jal on 2008-01-08, 15:00. Edited 1 time in total.

Reply 5 of 9, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

That would be TC++, obviously, not VC++. As somebody who uses TC++ and TP a lot for DOS programming, I have had no problem using both under DOSBox. Then again, I've never used the BGI library under either.

My site: Ramblings on mostly tech stuff.

Reply 8 of 9, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

I checked the code from the ZIP file and they all compile and run correctly in both DOSBox and the Windows XP prompt (and it doesn't use BGI, just regular mode 13). andrewwan1980, are you sure you've set up the Turbo C++ IDE correctly according to the program notes at the top? Especially the memory model used may affect the resulting executable.

Reply 9 of 9, by andrewwan1980

User metadata
Rank Newbie
Rank
Newbie

Yes, you are right. I just remembered about large memory models (because of the 16-bit complications).

Yes, ALL DOS mode 13 graphics programming now fully compile and work.

Now... to test on PSP DosBox.....