News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

addhead

Started by arnoldemu, 21:23, 21 September 10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

My "addhead" tool has been updated.

http://www.cpctech.org.uk/download/addhead.zip

As well as adding or removing an amsdos header from a file, you can also now check if a file exceeds a maximum memory address, useful if you want to limit the length of the file.

addhead -c <max address> <file>

You can use -s to override start address (if the file has header), or to set start if the file doesn't have a header.
If file has header you can use -h to use length from header otherwise length of file on filesystem is used.
If file doesn't have a header length on filesystem is used.

I use this tool when I make my games.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

For removing headers I use a hex editor :-) But adding one it a good idea ;-)

Does it support FutureOS headers?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: TFM/FS on 00:50, 22 September 10
For removing headers I use a hex editor :-) But adding one it a good idea ;-)

Does it support FutureOS headers?
no it doesn't.

But it could ;)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

#3
Quote from: arnoldemu on 09:13, 22 September 10
no it doesn't.

But it could ;)

That sounds promising... let me provide some basic informations... and if you like to add these featrues, don't hesitate to ask for details. Here is an overview about Amsdos and FutureOS headers:

 

Construction of a 128 byte file-header under Amsdos and FutureOS
----------------------------------------------------------------




AMSDOS:
=======
    0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
00 UU N0 N1 N2 N3 N4 N5 N6  N7 E0 E1 E2 00 00 00 00 - User, Name, Ext.
10 00 00 TY 00 00 SL SH 00  LL LH AL AH 00 00 00 00 - Typ,St.,Len,A.St
20 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 - unused
30 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 - unused
40 LL LH 00 CL CH ?? ?? ??  ?? ?? ?? ?? ?? ?? ?? ?? - Lenght, Checksum
50 ?? ?? ?? ?? ?? ?? ?? ??  ?? ?? ?? ?? ?? ?? ?? ?? - not defined
60 ?? ?? ?? ?? ?? ?? ?? ??  ?? ?? ?? ?? ?? ?? ?? ?? - not defined
70 ?? ?? ?? ?? ?? ?? ?? ??  ?? ?? ?? ?? ?? ?? ?? ?? - not defined
Abbreviations: Typ = file-type, St = Start-/Load-Address,
Len = file-length and A.St = Auto-Start-Address. L = low, H = high.
   

Under Future OS a file-header is expanded. The bytes which are defined
by AMSDOS keep their function. But all other bytes are used too.







FutureOS:
=========
    0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
00 UU N0 N1 N2 N3 N4 N5 N6  N7 E0 E1 E2 I0 I1 I2 I3 - User, Name, Ext.
10 I4 I5 TT XX YY SL SH SB  LL LH AL AH OL AB I6 I7 - Typ,X,Y,St,L,ASt
20 I8 I9 IA IB IC ID IE IF  I0 I1 I2 I3 I4 I5 I6 I7 - Icon-data 08-17
30 I8 I9 IA IB IC ID IE IF  I0 I1 I2 I3 I4 I5 I6 I7 - Icon-data 18-27
40 LL LH IT PL PH I8 I9 IA  IB IC ID IE IF I0 I1 I2 - Len,IcoTyp,PrSm.
50 I3 I4 I5 I6 I7 I8 I9 IA  IB IC ID IE IF I0 I1 I2 - Icon-data 33-42
60 I3 I4 I5 I6 I7 I8 I9 IA  IB IC ID IE IF I0 I1 I2 - Icon-data 43-52
70 I3 I4 I5 I6 I7 I8 I9 IA  IB IC ID IE IF I0 I1 I2 - Icon-data 53-62



FutureOS - 128 byte file-header, byte by byte:
----------------------------------------------


Byte(s) ! meaning, function
--------!----------------------------
     00 ! Usernumber of file &00..&FE, don't use &E5 or &FF!
01 - 08 ! Filename (8 bytes)
09 - 0B ! Extent (3 bytes)
0C - 11 ! I00 to I05 (6 bytes) icon-data
     12 ! Filetype: &00 = basic, &02 = binary, &0A = Prowort
        ! Protected files: add &01, example: &01 = protected basic
        ! FutureOS files: add &80, 8. bit is set
     13 ! Horizontal range or X-width for semi-graphic-icon
     14 ! Vertical range or Y-lines for semi-graphic-icon
15 - 16 ! Low, High-byte start/load-address of file
     17 ! Physical RAM-block of start/load address: &C0,&C4,&C5-&FF
18 - 19 ! Low, High-byte file-length (first 16 bit)
1A - 1B ! Low, High-byte auto-start-address, else &0000
     1C ! Over-byte of file-length ==> file-length up to 16 MB
     1D ! Physical RAM-block of auto-start-address: &C0,&C4,&C5-&FF
1E - 3F ! I06 to I27 (34 bytes) icon-data
40 - 41 ! Repeat of L, H-byte file-length, but NOT USED!
     42 ! Icon-type: text-, graphic- or semi-graphic icon
43 - 44 ! Low, High-byte checksum of this file-header
45 - 7F ! I28 to I62 (59 bytes) icon-data
--------!----------------------------------


Such a header contains  &63  =  99  byte icon-data. The icon-type-byte
(&42) decides which kind of icon the file-header contains. This can be
a graphic icon with 4 * 3  or  6  *  2 chars, a semi-graphic-icon or a
text-icon. The're four different icon-types.  All  icons must be shown
in screen mode 1 with 32 chars and 32 lines.
If the icon is  a  text-icon  (icon-type  is  &00),  the text can give
informatinos about the contents of the file or what ever.
A semi-graphic-icon (type &02)  contains  text  in  its icon-data too.
These chars are displayd as  an  ASCII-rectangle. The header-bytes &13
and &14 contain the rectangles X and Y range. But X * Y must be < &64.
Text and semi-grafic icons can  contain  all  256 chars. All chars are
displayd as chars and NOT as control codes. The difference is that the
text of a text-icon is  displayd  as  one string, whereas a semigrafic
icon is a rectangle made of chars.
The true graphic icons contain  only  screen mode 1 graphic-data. They
can have the format of 2 * 3 (type &01) or 3 * 2 (type &03) chars.
Therefore a graphic-icon uses only 4 * 3  *  8 = 96 bytes from the 99.
The remaining three bytes can be used freely.


TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

TFM

@Arnoldemu: Is it a good or a bad sign if you don't answer (immediately)?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

redbox

Quote from: TFM/FS on 18:37, 06 October 10
@Arnoldemu: Is it a good or a bad sign if you don't answer (immediately)?

Obviously he has been too busy writing uber-fast Plus sprite routines to worry about FutureOS headers for now  ;)

TFM

Quote from: redbox on 20:22, 06 October 10
Obviously he has been too busy writing uber-fast Plus sprite routines to worry about FutureOS headers for now  ;)


Obviously he is busy integrating FutureOS file headers into his great application  ;)  (you know, hope dies last)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: TFM/FS on 18:37, 06 October 10
@Arnoldemu: Is it a good or a bad sign if you don't answer (immediately)?
Neither good or bad.

I've read over the information, I understand it, and I will implement it, but at this time I have not done anything with the information.
(Blue Angel 69 is finished now I think, just one last thing to test).
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

Quote from: arnoldemu on 09:27, 07 October 10
I've read over the information, I understand it, and I will implement it, but at this time I have not done anything with the information.

Take you time, if you need more informations or what ever don't hesitate to tell me.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: TFM/FS on 18:42, 07 October 10

Take you time, if you need more informations or what ever don't hesitate to tell me.
I haven't implemented futureos header yet, but I fixed some bugs.
I did not set basic file type correctly, and also it ignored any file type, start and execution that you forced.

Now this works
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

GUNHED

Hi Arnie, is there any update to this interesting project?
http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

Powered by SMFPacks Menu Editor Mod