VOGONS

Common searches


Reply 20 of 24, by mkarcher

User metadata
Rank l33t
Rank
l33t
Peter Swinkels wrote on 2024-04-23, 07:04:

Also, how I am going to figure out the application code if I don't know what C function's they're calling or what part of the binary is application code?

As a DOS EXE file does not contain any kind of function name information, all names displayed by IDA (like _open or __dtoxmode) are there because IDA recognized these functions. While IDA knows the MS C library quite well and is able to recognize nearly all parts of it, it does not know anything about application code, and thus won't recognize application functions. So any named function (except main) is library code, and also flagged as such by the "L" attribute and the bright cyan color coding of the addresses, as already mentioned by llm. You can figure out what parts are application code by just looking at the code that has not yet been named by IDA (and of course by looking at main, too).

Reply 21 of 24, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

Thank you llm. That looks useful. 😀

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels

Reply 22 of 24, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

@mkarcher: yeah I get it, once I know what is C library code I will need to start to figure out what application function does what. C functions are pretty standardized but the code specific to the application is not. However even though the version of Cartooners I am reverse engineneering is a MS-DOS program it is a port from a program originally released for the Apple IIGS and as such retains traces of that origin:

https://gswv.apple2.org.za/a2zine/GS.WorldView/v1999/Sep/GSWV.A2.Error.Code.files/IIgs.Error.Codes.txt

$0 - None
$201 - Unable to allocate
$202 - Illegal operation on an empty handle
$203 - Illegal operation on a handle that is not empty
$204 - Illegal operation on a locked or immovable block
$205 - Attempt to purge an unpurgeable block
$206 - Invalid handle
$601 - The Event Manager has already been started
$607 - Insufficient memory available for queue
$6FF - ???
$E02 - Unable to allocate window record
$E03 - Some reserved bits were not clear in Window Manager - TaskMask field of Window Manager TaskRec record
$150A - Inappropriate item type
$150B - Item creation failed
$150C - No such item

Stored at [0x80C0] according to the disassembled code.

I can give more examples of Apple IIGS related remnants if anyone is interested.

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels

Reply 23 of 24, by Peter Swinkels

User metadata
Rank Oldbie
Rank
Oldbie

It's been a while, but I am still working on reverse engineering Cartooners.

For anyone interested, I found some graphics VGA 320 x 200 256 colors video mode routines:
1. A routine that draws images.
2. A routine that draws text.
3. A routine that restores the background covered by the mouse cursor when it's moved.

And yes, Cartooners does actually support VGA despite the big decorated "EGA" text in the title screen. It still uses only 16 colors in VGA but takes advantage of the more refined palette supported by it. Try running Cartooners with "machine=EGA" in DOSBox - the colors will be less subtle.

Do not read if you don't like attention seeking self-advertisements!

Did you read it anyway? Well, you can find all sorts of stuff I made using various programming languages over here:
https://github.com/peterswinkels

Reply 24 of 24, by mkarcher

User metadata
Rank l33t
Rank
l33t
Peter Swinkels wrote on 2024-05-28, 20:22:

And yes, Cartooners does actually support VGA despite the big decorated "EGA" text in the title screen. It still uses only 16 colors in VGA but takes advantage of the more refined palette supported by it. Try running Cartooners with "machine=EGA" in DOSBox - the colors will be less subtle.

This mode is especially interesting for owners of a PS/2 model 30 (8086), if that program runs on 8086 processors: This computer uses the MCGA graphics chip, which is in no way EGA/VGA compatible (it is way more simple), but still provides the 320x200x256 framebuffer mode. A lot of classic 16-color LucasArts adventures also have this mode as "MCGA mode", often without any color refinement compared to the EGA mode.