Congratulations / Galactic Conquest v9 beta 55 (Announce)
> as I'm about to become a father and I have little time before then.
Congratulations to you both! Will it be your first? Time soon flies indeed I realized earlier that our kind host http://www.bttr-software.de/forum/forum_entry.php?... is almost coming up the 6 month mark as a dad :) Perhaps he can offer up some dad tips... !?!
> Okay...starting to work my way through some of this. To be honest, I don't
> know that I'm going to do much more with the game,
:) I understand - still importantly as it stands your game is playable/works !
> Renaming INTVFONT.COM - I will rename the file, however I tried renaming it
> to something other than .COM and it failed to run. Apparently it must be a
> .COM to work.
This shouldn't have been a problem.... Anyway it should no longer matter as whilst watching a film tonight, I decided to write the following code especially for your use in Galactic Conquest which will enable you to easily use http://www.bttr-software.de/forum/mix_entry.php?id=8024#p8171BINOBJ/BGIOBJ as I recently described elsewhere on the forum for someone else[/link] (see also below) which will enable you to convert INTVFONT.COM into an .OBJect file which you can then just directly link/use inside the game thus avoid the hassles of executing it.
{$L intvfont.obj}
procedure intvfont; external; {fool TP as $L is supposed to be for code only}
Begin
Asm
push bp {Save BP as Turbo Pascal requires us to preserve it}
mov ax, 0500h {AH = 05h Set active display page / AL = page number}
int 10h {function 1110h below requires page 0 to be active}
mov ax, seg intvfont {function 1110h expects ES:BP -> user font table}
mov es, ax {Set ES to point to the segment of our font data}
mov ax, offset intvfont+$63 {Add 63h to skip over the INTVFONT.com header}
mov bp, ax {Set BP to point to the offset of our font data}
mov cx, 100h {256d} {CX = Number of patters we wish to load}
xor dx, dx {0d} {DX = character offset into map 2 block}
xor bl, bl {0d} {BL = block to load in map 2}
mov bh, 10h {16d} {BH = number of bytes per character pattern}
mov ax, 1110h {text chargen http://www.ctyme.com/intr/rb-0142.htm}
int 10h {Load user-specified patterns (PS,EGA,VGA)}
pop bp {Restore BP}
End;
{Important - the following 2 lines should be the LAST lines in your game}
Halt; {Halt to ensure TP never executes the line below}
intvfont; {the following line MUST never be called directly}
End.
Note: The font data begins at 63h (99 decimal) bytes into the INTVFONT.COM file and carries on till the end. The font data is 8192bytes/2000h in length.
Importantly the above code does NOT use any of the PC magazine code which it deliberately skips over. Indeed I have also designed the above so that if you so choose you can link in "just" the 8k font data itself. HOWEVER if you wish to do that then you need to modify the code slightly by removing the +$63 and just removing the "skip over header" comment on the same line.
You can very easily extract the font data out of INTVFONT.COM by using trusty DEBUG and then typing exactly what I have shown directly below in BOLD:
C:\yourdevpath>debug intvfont.com
-n intvfont.dat
-RCX
CX 2063
:2000
-w 0163
Writing 02000 bytes
-q
I have however the choice to you as to which to use. Regarding BINOBJ all you need to do to convert either file into an object file to use with the above code is type either:
C:\yourdevpath>binobj intvfont.com intvfont intvfont
BIN to OBJ Converter Version 5.5 Copyright (c) 1987,1989 Borland International
8291 bytes converted.
C:\yourdevpath>
or if you have saved out the font data separately:
C:\yourdevpath>binobj intvfont.dat intvfont intvfont
BIN to OBJ Converter Version 5.5 Copyright (c) 1987,1989 Borland International
8192 bytes converted.
C:\yourdevpath>
Obviously if you save out the font data separately and the +$63 line you will save just over 99 bytes from your game. [Enough for 2 asm tiny .COM games ;)]
> CTR70 - Yes, confirmed to be CRT70 by Pedt Scragg. I patched the RTE200
> bug a long long time ago, have no idea where from.
> There's so many out there it would be impossible to figure out who did it,
Not necessarily but that is academic. Interestingly I did a test compile earlier using the standard TP7 library intentionally not using the CRT70 library and noted that the game is smaller (57,392bytes) but also has issues (i.e. it breaks logo display). I was expecting some issues but thought I would try a test anyway as no doubt someone will try a compile of your game using the with standard TP7 library.
> GPL concerns with CRT70 and fading text - I'm not sure GPL applies here.
> On both sites they say their code is freely usable. Adding GPL here would
> simply mean that any time their code is used that they get credit for it.
>
> but none of them are copyrighted so GPL isn't an issue here.
IANAL (I Am Not A Lawyer) however my understanding of copyright leads me to believe that this is not the case since from memory in many countries a person doesn't need to specifically put copyright on something for it to be copyrighted. As said earlier I would thus suggest checking at least with any authors (e.g. Pedt Scragg's email addresses can be found on his website), or for the sake of time/simplicity simply calling out what is your GPL source and what isn't. As before you are welcome to GPL the source that I have specifically shared with you for this project that I have said you can. To be clear that includes the source that I have shared with you here today.
> Added text to the title screens for CRT70, FONTEDIT, and fading text. Will
> also add to the text file. (Note that none of those EXE files or TPUs will
> be included with the final distro)
Ok, well as above we've now eliminated the need to include INTVFONT.COM but in terms of the source you may want to include a intvfont.obj or similar.
> Working on cleaning up the text help file.
Ok.
> Adding help to the game - If I can figure out how to do it quickly.
A really quick and dirty method would be to clear the screen (or overlay it), and a few Writeln's and wait for a Keypress (e.g. asm xor ax,ax int 16h end;)
> Compressing file space - I'll compile everything and try a tar, and see if
> it still runs.
tar?? Regarding file compression I would suggest shrinking with aPACK:
http://www.ibsensoftware.com/products_aPACK.html
aPACK's XT (-x) option will ensure that any resulting compressed EXE runs on older computers. Testing it on your supplied GALCON.EXE earlier it only added an extra 5 bytes (remember you save more losing the INTVFONT.COM header
, so it will worth your while using the XT option to help ensure all round compatibility particularly as text mode games are of extra interest to many with older computers.
This is example of using aPACK to shrink down galcon.exe:
C:\yourdevdir>apack -x galcon.exe galcon2.exe
===============================================================================
aPACK v1.00 Copyright (c) 1997-2009 by Joergen Ibsen / Jibz
All Rights Reserved
http://www.ibsensoftware.com/
===============================================================================
This copy of aPACK is freeware.
■ Packing code -> 65251 bytes
Done ... compression ratio: 67% (194256 bytes -> 65588 bytes)
C:\yourdevdir>
As you can see it achieves good results when compressing your current game.
> Adding .DAT contents (compname, etc) to main - Good idea for if those files
> are missing, I will add that to the main to recreate the files if they are
> missing. I want the files themselves to be external so they can be
> modified by the user.
Sounds like a good plan.
> that would work except I'm in ASCII mode, not VGA mode.
It would have been re-usable however for simplicity I would suggest using instead the object method above with the code that I have provided for you.
> As much as I'd seriously love to make this game VGA graphic-capable,
> I just don't have time right now, and may not in the future.
There are never enough hours in the day.
Complete thread:
- Galactic Conquest v9 beta 55 - sinclaj1, 29.12.2009, 20:53 (Announce)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Galactic Conquest v9 beta 55 - Rugxulo, 29.12.2009, 22:05
- Galactic Conquest v9 beta 55 - Deniska, 07.01.2010, 00:53
- Galactic Conquest v9 beta 55 - sinclaj1, 07.01.2010, 05:46
- Galactic Conquest v9 beta 55 - sinclaj1, 08.05.2010, 04:21
- Galactic Conquest v9 beta 55 - Arjay, 08.05.2010, 15:07
- Galactic Conquest v9 beta 55 - rr, 08.05.2010, 21:06
- Galactic Conquest v9 beta 55 - additional feedback - Arjay, 09.05.2010, 21:26
- Galactic Conquest v9 beta 55 - additional feedback - sinclaj1, 13.05.2010, 05:58
- Galactic Conquest v9 beta 55 - additional feedback - Arjay, 19.05.2010, 17:27
- Galactic Conquest v9 beta 55 - additional feedback - sinclaj1, 24.06.2010, 16:01
- Congratulations / Galactic Conquest v9 beta 55 - Arjay, 25.06.2010, 03:37
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - Arjay, 25.06.2010, 10:16
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - Arjay, 25.06.2010, 12:20
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - sinclaj1, 26.10.2010, 05:56
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - Arjay, 26.10.2010, 11:57
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - sinclaj1, 26.10.2010, 13:59
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - rr, 26.10.2010, 21:13
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - sinclaj1, 26.10.2010, 13:59
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - rr, 26.10.2010, 21:07
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - Rugxulo, 27.10.2010, 23:43
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - Arjay, 26.10.2010, 11:57
- Congratulations / Galactic Conquest v9 beta 55 - Rugxulo, 26.06.2010, 14:59
- Galactic Conquest v9 file compression / UPX vs aPACK - Arjay, 27.06.2010, 00:11
- Galactic Conquest v9 file compression / UPX vs aPACK - Rugxulo, 27.06.2010, 08:10
- TP5_2COM - an example of how to generate a COM file from TP5 - Arjay, 27.06.2010, 13:30
- Galactic Conquest v9 file compression / UPX vs aPACK - Arjay, 27.06.2010, 14:00
- Galactic Conquest v9 file compression / UPX vs aPACK - Rugxulo, 28.06.2010, 06:45
- early Turbo Pascal quirks - Rugxulo, 28.06.2010, 07:02
- Galactic Conquest v9 file compression / UPX vs aPACK - Rugxulo, 28.06.2010, 06:45
- Galactic Conquest v9 file compression / UPX vs aPACK - Rugxulo, 27.06.2010, 08:10
- Galactic Conquest v9 file compression / UPX vs aPACK - Arjay, 27.06.2010, 00:11
- Galactic Conquest: GCFONT.PAS (drop in LoadFont replacement) - Arjay, 25.06.2010, 10:16
- Congratulations / Galactic Conquest v9 beta 55 - Arjay, 25.06.2010, 03:37
- Galactic Conquest v9 beta 55 - additional feedback - sinclaj1, 24.06.2010, 16:01
- Galactic Conquest v9 beta 55 - additional feedback - Arjay, 19.05.2010, 17:27
- Galactic Conquest v9 beta 55 - additional feedback - sinclaj1, 13.05.2010, 05:58
Mix view