Rev 10 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
9 | daniel-mar | 1 | |
2 | Annotations for the Aysalia DOS I & II source codes |
||
3 | =================================================== |
||
4 | |||
5 | CALLING FLOW |
||
6 | ------------ |
||
7 | |||
8 | When running under Windows: |
||
9 | |||
10 | AyDos.exe (32 Bit PE) --> DOSBox (32 Bit PE) --> AyDos.exe (16 Bit COM) --> AyDos.mnu (16 Bit MZ) --> AyDos1/2.gam (16 Bit MZ) |
||
11 | |||
12 | 1. AyDos.exe (32 Bit PE) calls DOSBox.exe (32 Bit PE) with config DOSBox.conf |
||
13 | 2. DOSBox.conf starts AyDos.exe (16 Bit MZ) as autostart |
||
14 | 3. AyDos.exe (16 Bit COM) calls AyDos.mnu (16 Bit MZ) |
||
15 | 4. AyDos.mnu (16 Bit MZ) shows a menu and calls AyDos1.gam or AyDos2.gam (both 16 Bit MZ) |
||
16 | |||
17 | When running under DOS: |
||
18 | |||
19 | AyDos.exe (16 Bit COM) --> AyDos.mnu (16 Bit MZ) --> AyDos1/2.gam (16 Bit MZ) |
||
20 | |||
21 | 1. AyDos.exe (16 Bit COM) calls AyDos.mnu (16 Bit MZ) |
||
22 | 2. AyDos.mnu (16 Bit MZ) shows a menu and calls AyDos1.gam or AyDos2.gam (both 16 Bit MZ) |
||
23 | |||
24 | |||
25 | AYDOS.EXE |
||
26 | --------- |
||
27 | |||
28 | AyDos.exe is a "fat binary" which can be called by DOS and Windows. |
||
29 | |||
30 | In Windows mode, it calls DOSBox.exe with the arguments "-noconsole -conf DOSBox.conf" and |
||
31 | the working directory being the directory where the EXE file is located. |
||
16 | daniel-mar | 32 | It also centers the DOSBox window and changes its window title and icon at runtime. |
9 | daniel-mar | 33 | |
34 | In DOS mode, it executes the application "AYDOS.MNU" (which is actually a COM-file |
||
35 | containing the menu code that will eventually call AYDOS1.GAM or AYDOS2.GAM which are |
||
36 | actually MZ-executables). |
||
37 | |||
38 | To create this fat binary, do the following: |
||
39 | |||
40 | 1. Compile AyDos.exe with Delphi |
||
41 | |||
42 | 2. Compile DosStub.com with TASM |
||
43 | |||
44 | 3. With an hex editor, copy the contents of DosStub.com into AyDos.exe to offset 0x40 |
||
45 | |||
46 | |||
47 | AYDOS1.GAM and AYDOS2.GAM |
||
48 | ------------------------- |
||
49 | |||
50 | These games were developed and compiled in QuickBasic, but unfortunately the source code is lost. |
||
51 | |||
52 | The EXE files have been modified with a hex editor to fix some small issues. |
||
53 | A side effect of one fix is that the video mode is not reset when the game exists. |
||
54 | Therefore, the EXE files have been renamed to GAM and will be called by the menu/launcher executable, |
||
55 | which resets the video mode correctly, in addition in showing a menu. |
||
56 | |||
57 | |||
58 | DISTRIBUTE |
||
59 | ---------- |
||
60 | |||
61 | AyDos.exe |
||
62 | AyDos.mnu |
||
63 | AyDos1.gam |
||
64 | AyDos2.gam |
||
65 | DOSBox.exe |
||
66 | DOSBox.conf |
||
67 | SDL.dll (required by DOSBox) |
||
68 | SDL_net.dll (required by DOSBox) |