Subversion Repositories aysalia

Compare Revisions

No changes between revisions

Regard whitespace Rev 8 → Rev 9

/trunk/Nostalgie/AyDos.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/MSDos.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/AyDosMnu.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/AyDos.dpr
File deleted
/trunk/Nostalgie/AyDos1.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/AyDos2.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Deleted: svn:mime-type
-application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/AyDosMnu.bas
File deleted
/trunk/Nostalgie/AyDos.cfg
File deleted
/trunk/Nostalgie/AyDos.dof
File deleted
/trunk/Nostalgie/AyDos.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/Nostalgie/AyDos.mnu
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/AyDos1.gam
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/AyDos2.gam
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/DOSBox.conf
239,5 → 239,5
[autoexec]
mount c "."
c:
AyDosMnu.exe
aydos.exe
exit
/trunk/Nostalgie/Source/AyDos.cfg
0,0 → 1,35
-$A+
-$B-
-$C+
-$D+
-$E-
-$F-
-$G+
-$H+
-$I+
-$J+
-$K-
-$L+
-$M-
-$N+
-$O+
-$P+
-$Q-
-$R-
-$S-
-$T-
-$U-
-$V+
-$W-
-$X+
-$YD
-$Z1
-cg
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-H+
-W+
-M
-$M16384,1048576
-K$00400000
-LE"c:\program files (x86)\borland\delphi5\Projects\Bpl"
-LN"c:\program files (x86)\borland\delphi5\Projects\Bpl"
/trunk/Nostalgie/Source/AyDos.dof
0,0 → 1,82
[Compiler]
A=1
B=0
C=1
D=1
E=0
F=0
G=1
H=1
I=1
J=1
K=0
L=1
M=0
N=1
O=1
P=1
Q=0
R=0
S=0
T=0
U=0
V=1
W=0
X=1
Y=1
Z=1
ShowHints=1
ShowWarnings=1
UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
[Linker]
MapFile=0
OutputObjs=0
ConsoleApp=1
DebugInfo=0
RemoteSymbols=0
MinStackSize=16384
MaxStackSize=1048576
ImageBase=4194304
ExeDescription=
[Directories]
OutputDir=
UnitOutputDir=
PackageDLLOutputDir=
PackageDCPOutputDir=
SearchPath=
Packages=
Conditionals=
DebugSourceDirs=
UsePackages=0
[Parameters]
RunParams=
HostApplication=
[Language]
ActiveLang=
ProjectLang=$00000407
RootDir=
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1031
CodePage=1252
[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=
/trunk/Nostalgie/Source/AyDos.dpr
0,0 → 1,50
program AyDos;
 
uses
SysUtils,
ShellAPI,
Windows;
 
{$R *.RES}
 
function ShellExecuteWait(hWnd: HWND; Operation, FileName, Parameters,
Directory: PAnsiChar; ShowCmd: Integer): DWord;
var
Info: TShellExecuteInfo;
pInfo: PShellExecuteInfo;
exitCode: DWord;
begin
pInfo := @Info;
with Info do
begin
cbSize := SizeOf(Info);
fMask := SEE_MASK_NOCLOSEPROCESS;
wnd := hWnd;
lpVerb := Operation;
lpFile := FileName;;
lpParameters := PChar(Parameters + #0);
lpDirectory := PChar(Directory);
nShow := ShowCmd;
hInstApp := 0;
end;
ShellExecuteEx(pInfo);
 
repeat
exitCode := WaitForSingleObject(Info.hProcess, 1000);
until (exitCode <> WAIT_TIMEOUT);
 
result := exitCode;
end;
 
var
sFile: string;
begin
ShellExecuteWait(0, 'open', 'DOSBox.exe', '-noconsole -conf DOSBox.conf',
PChar(ExtractFilePath(ParamStr(0))), SW_NORMAL);
 
sFile := IncludeTrailingBackslash(ExtractFilePath(ParamStr(0))) + 'stdout.txt';
if FileExists(sFile) then DeleteFile(PChar(sFile));
 
sFile := IncludeTrailingBackslash(ExtractFilePath(ParamStr(0))) + 'stderr.txt';
if FileExists(sFile) then DeleteFile(PChar(sFile));
end.
/trunk/Nostalgie/Source/AyDos.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/Source/AyDos.res
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/Source/DOS Stub/DosStub.asm
0,0 → 1,49
 
; Aysalia DOS Launcher
; DOS Stub for AyDos.exe fat binary
; Revision 2018-12-01
; (C) 2018 Daniel Marschall, ViaThinkSoft
 
.model tiny
.code
org 100h
 
start:
 
jmp real_start
 
exename1 db "AYDOS.MNU",0
cmdargs db 0,'',0dh
 
dummy_fcb db 36 dup(0)
 
paramblk dw 0 ; use environment of parent
dw cmdargs ; command line arguments
dw 0 ; cmdargs_seg
dw dummy_fcb ; fcb1
dw 0 ; fcb1_seg
dw dummy_fcb ; fcb2
dw 0 ; fcb2_seg
 
 
real_start:
; Reduce size of own application to give the called applications more space
; TODO: Is that required for a COM file?
mov ah, 4ah
mov al, 00h
mov bx, 50 ; 50 paragraphs a 16 byte = 800 byte
int 21h
 
; Start Menu
mov ah, 4bh ; execute
mov al, 00h ; load and execute
mov bx, paramblk
lea dx, exename1
int 21h
 
; Return to DOS
mov ah, 4ch
mov al, 00h
int 21h
 
end start
/trunk/Nostalgie/Source/DOS Stub/DosStub.com
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/Source/DOS Stub/Make.bat
0,0 → 1,8
 
tasm DOSSTUB.ASM
 
tlink /t DOSSTUB.OBJ
 
del DOSSTUB.MAP
 
del DOSSTUB.OBJ
/trunk/Nostalgie/Source/Games/AyDos1.gam
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/Source/Games/AyDos2.gam
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/Source/MSDos.ico
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/Source/Menu/AyDos.mnu
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/trunk/Nostalgie/Source/Menu/AyDosMnu.asm
0,0 → 1,208
 
; Aysalia DOS Launcher
; Launches aydos1.gam and aydos2.gam
; Revision 2018-12-01
; (C) 2018 Daniel Marschall, ViaThinkSoft
 
.model small
.stack 10h
.data
 
exename1 db "AYDOS1.GAM",0
exename2 db "AYDOS2.GAM",0
cmdargs db 0,'',0dh
 
dummy_fcb db 36 dup(0)
 
paramblk dw 0 ; use environment of parent
dw cmdargs ; command line arguments
dw 0 ; cmdargs_seg
dw dummy_fcb ; fcb1
dw 0 ; fcb1_seg
dw dummy_fcb ; fcb2
dw 0 ; fcb2_seg
 
menu1 db '', 13, 10, '$'
menu2 db '', 13, 10, '$'
menu3 db '', 13, 10, '$'
menu4 db '', 13, 10, '$'
menu5 db ' Aysalia DOS',13,10,'$'
menu6 db '', 13, 10, '$'
menu7 db '', 13, 10, '$'
menu8 db ' Welches Spiel soll gestartet werden?',13,10,'$'
menu9 db '', 13, 10, '$'
menu10 db ' Dr',81h,'cke eine der folgenden Tasten:',13,10,'$'
menu11 db '', 13, 10, '$'
menu12 db ' 1 Aysalia DOS I',13,10,'$'
menu13 db ' 2 Aysalia DOS II',13,10,'$'
menu14 db '', 13, 10, '$'
menu15 db ' 9 Beenden',13,10,'$'
menu16 db '', 13, 10, '$'
menu17 db '', 13, 10, '$'
menu18 db '', 13, 10, '$'
 
gameover1 db '',13,10,'$'
gameover2 db 'Spiel zu Ende!',13,10,'$'
gameover3 db '',13,10,'$'
 
.code
 
clear_vga PROC
mov ax, 0a000h
mov es, ax
xor di, di
mov ax, 0
mov cx, 64000
rep stosb
ret
clear_vga ENDP
 
setup_paramblk PROC
mov ax, cs
mov [paramblk + 4], ax ; cmdargs_seg
mov [paramblk + 8], ax ; fcb1_seg
mov [paramblk + 12], ax ; fcb2_seg
ret
setup_paramblk ENDP
 
start:
mov ax, @data ; moving base address of data to ax
mov ds, ax ; moving contents of ax into ds
; data section now gets initialized
 
; Reduce size of own application to give the called applications more space
mov ah, 4ah
mov al, 00h
mov bx, 100 ; 100 paragraphs a 16 byte = 1600 byte
; EXE size is 1140 byte
int 21h
 
menu:
; Video Mode VGA 12
mov ah, 0
mov al, 12h
int 10h
 
; Flush keyboard buffer
mov ah, 0ch
mov al, 0
int 21h
 
; Print message
mov ah, 9
lea dx, menu1
int 21h
lea dx, menu2
int 21h
lea dx, menu3
int 21h
lea dx, menu4
int 21h
lea dx, menu5
int 21h
lea dx, menu6
int 21h
lea dx, menu7
int 21h
lea dx, menu8
int 21h
lea dx, menu9
int 21h
lea dx, menu10
int 21h
lea dx, menu11
int 21h
lea dx, menu12
int 21h
lea dx, menu13
int 21h
lea dx, menu14
int 21h
lea dx, menu15
int 21h
lea dx, menu16
int 21h
lea dx, menu17
int 21h
lea dx, menu18
int 21h
retry:
; Query keyboard input
mov ah, 07h ; Direct character input, without echo
int 21h
cmp al, '1'
je prog1
cmp al, '2'
je prog2
cmp al, '9'
je ende
 
; Invalid input
jmp retry
 
prog1:
; Clear screen
call clear_vga
 
; Setup parameter block for the EXEC command
call setup_paramblk
 
; Start game 1
mov ah, 4bh ; execute
mov al, 00h ; load and execute
mov bx, paramblk
lea dx, exename1
int 21h
; Notify the player that the game is finished
jmp gameover
 
prog2:
; Clear screen
call clear_vga
; Setup parameter block for the EXEC command
call setup_paramblk
 
; Start game 2
mov ah, 4bh ; execute
mov al, 00h ; load and execute
mov bx, paramblk
lea dx, exename2
int 21h
 
; Notify the player that the game is finished
jmp gameover
 
gameover:
; Print message
mov ah, 9
lea dx, gameover1
int 21h
lea dx, gameover2
int 21h
lea dx, gameover3
int 21h
 
; Sleep approx 5 seconds
mov ah, 86h
mov cx, 004bh
mov dx, 4000h
int 15h
 
; Go to the menu
jmp menu
ende:
; Reset video mode to DOS default
mov ah, 0
mov al, 3
int 10h
 
; Return to DOS
mov ah, 4ch
mov al, 00h
int 21h
 
end start
/trunk/Nostalgie/Source/Menu/Make.bat
0,0 → 1,10
 
tasm AYDOSMNU.ASM
 
tlink AYDOSMNU.OBJ
 
ren AYDOSMNU.EXE AyDos.mnu
 
del AYDOSMNU.MAP
 
del AYDOSMNU.OBJ
/trunk/Nostalgie/Source/Source Notes.txt
0,0 → 1,67
 
Annotations for the Aysalia DOS I & II source codes
===================================================
 
CALLING FLOW
------------
 
When running under Windows:
 
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)
 
1. AyDos.exe (32 Bit PE) calls DOSBox.exe (32 Bit PE) with config DOSBox.conf
2. DOSBox.conf starts AyDos.exe (16 Bit MZ) as autostart
3. AyDos.exe (16 Bit COM) calls AyDos.mnu (16 Bit MZ)
4. AyDos.mnu (16 Bit MZ) shows a menu and calls AyDos1.gam or AyDos2.gam (both 16 Bit MZ)
When running under DOS:
 
AyDos.exe (16 Bit COM) --> AyDos.mnu (16 Bit MZ) --> AyDos1/2.gam (16 Bit MZ)
 
1. AyDos.exe (16 Bit COM) calls AyDos.mnu (16 Bit MZ)
2. AyDos.mnu (16 Bit MZ) shows a menu and calls AyDos1.gam or AyDos2.gam (both 16 Bit MZ)
 
 
AYDOS.EXE
---------
 
AyDos.exe is a "fat binary" which can be called by DOS and Windows.
 
In Windows mode, it calls DOSBox.exe with the arguments "-noconsole -conf DOSBox.conf" and
the working directory being the directory where the EXE file is located.
 
In DOS mode, it executes the application "AYDOS.MNU" (which is actually a COM-file
containing the menu code that will eventually call AYDOS1.GAM or AYDOS2.GAM which are
actually MZ-executables).
 
To create this fat binary, do the following:
 
1. Compile AyDos.exe with Delphi
 
2. Compile DosStub.com with TASM
 
3. With an hex editor, copy the contents of DosStub.com into AyDos.exe to offset 0x40
 
 
AYDOS1.GAM and AYDOS2.GAM
-------------------------
 
These games were developed and compiled in QuickBasic, but unfortunately the source code is lost.
 
The EXE files have been modified with a hex editor to fix some small issues.
A side effect of one fix is that the video mode is not reset when the game exists.
Therefore, the EXE files have been renamed to GAM and will be called by the menu/launcher executable,
which resets the video mode correctly, in addition in showing a menu.
 
 
DISTRIBUTE
----------
 
AyDos.exe
AyDos.mnu
AyDos1.gam
AyDos2.gam
DOSBox.exe
DOSBox.conf
SDL.dll (required by DOSBox)
SDL_net.dll (required by DOSBox)
/trunk/Setup.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/Setup.iss
37,7 → 37,6
Name: "iss"; Description: "InnoSetup Installations-Quelltext"; Types: alles
 
[Dirs]
Name: "{app}\Nostalgie"; Components: aydos; Permissions: users-modify
Name: "{app}\Quelltexte"; Components: iss zdd_src sua_src aydos_src; Permissions: users-modify
Name: "{app}\Quelltexte\InnoSetup"; Components: iss; Permissions: users-modify
Name: "{app}\Quelltexte\Zeitalter der Dämonen"; Components: zdd_src; Permissions: users-modify
69,17 → 68,9
Source: "Schatten über Aysalia\*.jpg"; Flags: ignoreversion; DestDir: "{app}\Quelltexte\Schatten über Aysalia"; Components: sua_src
Source: "Schatten über Aysalia\*.bat"; Flags: ignoreversion; DestDir: "{app}\Quelltexte\Schatten über Aysalia"; Components: sua_src
; Aysalia DOS
Source: "Nostalgie\*.exe"; Flags: ignoreversion; DestDir: "{app}\Nostalgie"; Components: aydos
Source: "Nostalgie\*.dll"; Flags: ignoreversion; DestDir: "{app}\Nostalgie"; Components: aydos
Source: "Nostalgie\*.txt"; Flags: ignoreversion; DestDir: "{app}\Nostalgie"; Components: aydos
Source: "Nostalgie\*.conf"; Flags: ignoreversion; DestDir: "{app}\Nostalgie"; Components: aydos
Source: "Nostalgie\*.*"; Flags: ignoreversion; DestDir: "{app}"; Components: aydos
; Aysalia DOS Quelltext
Source: "Nostalgie\*.cfg"; Flags: ignoreversion; DestDir: "{app}\Quelltexte\Aysalia DOS"; Components: aydos_src
Source: "Nostalgie\*.dof"; Flags: ignoreversion; DestDir: "{app}\Quelltexte\Aysalia DOS"; Components: aydos_src
Source: "Nostalgie\*.dpr"; Flags: ignoreversion; DestDir: "{app}\Quelltexte\Aysalia DOS"; Components: aydos_src
Source: "Nostalgie\*.res"; Flags: ignoreversion; DestDir: "{app}\Quelltexte\Aysalia DOS"; Components: aydos_src
Source: "Nostalgie\*.ico"; Flags: ignoreversion; DestDir: "{app}\Quelltexte\Aysalia DOS"; Components: aydos_src
Source: "Nostalgie\*.bas"; Flags: ignoreversion; DestDir: "{app}\Quelltexte\Aysalia DOS"; Components: aydos_src
Source: "Nostalgie\Source\*"; Flags: ignoreversion recursesubdirs; DestDir: "{app}\Quelltexte\Aysalia DOS"; Components: aydos_src
; Setup Source
Source: "Setup.iss"; DestDir: "{app}\Quelltexte\InnoSetup"; Flags: ignoreversion; Components: iss
Source: "Wizard Image.bmp"; DestDir: "{app}\Quelltexte\InnoSetup"; Flags: ignoreversion; Components: iss
94,7 → 85,7
Filename: "{tmp}\Visual Basic 6.0 - Runtime Library SP6.exe"; StatusMsg: "Installiere Microsoft Visual Basic 6.0 Runtime Library..."; Flags: waituntilterminated; Components: vbrt
 
[Icons]
Name: "{group}\Aysalia DOS"; Filename: "{app}\Nostalgie\AyDos.exe"; WorkingDir: "{app}\Nostalgie"; Components: aydos
Name: "{group}\Aysalia DOS"; Filename: "{app}\AyDos.exe"; WorkingDir: "{app}"; Components: aydos
Name: "{group}\Aysalia - Zeitalter der Dämonen"; Filename: "{app}\Zeitalter der Dämonen.exe"; WorkingDir: "{app}\Zeitalter der Dämonen"; Components: zdd
Name: "{group}\Aysalia Quelltexte"; Filename: "{app}\Quelltexte"; WorkingDir: "{app}\Zeitalter der Dämonen"; Components: zdd_src sua_src aydos_src iss
Name: "{group}\Aysalia - Schatten über Aysalia"; Filename: "{app}\Schatten über Aysalia.exe"; WorkingDir: "{app}\Schatten über Aysalia"; Components: sua