G2F

From Atariki

(Różnice między wersjami)
Jump to: navigation, search
Wersja z dnia 17:41, 6 mar 2011
Tebe (Dyskusja | wkład)

← Previous diff
Wersja z dnia 20:43, 6 mar 2011
Tebe (Dyskusja | wkład)

Next diff →
Linia 3: Linia 3:
Pliki kompresowane są przy pomocy ogólnie dostępnej biblioteki ZLIB, posiadają wówczas nagłówek G2FZLIB. Pliki kompresowane są przy pomocy ogólnie dostępnej biblioteki ZLIB, posiadają wówczas nagłówek G2FZLIB.
-Format pliku G2F: 
<pre> <pre>
-$0000 - Screen_Width = [32, 40, 48]+G2F file format
-$0001 - bit 0..2 Pixel = [1,2,4]+-----------------------------
- bit 3..7 Charset Compress ($80-Normal, $40-Optymizing, $20-Original, $10-JGP, $08-JGP2)+
-$0002 - Charsets_Count+offset type desc
-$0003..30*Screen_Width - Screen, Invers Data+------ ---- ----
 +0 BYTE SCRW Screen Width (32, 40, 48)
 +1 BYTE bit 0-2 Pixel (1,2,4)
 + bit 3-7 Charset Compress ($80-Normal, $40-Optymizing, $20-Original, $10-JGP, $08-JGP2)
-(Charsets_Count+1)*1024 - Charsets Data+2 BYTE CHRC Charset Count
 +3 BYTE Screen and Invers Data (30*SCRW)
-30 bytes - bit 0..6 Table with Charsets+3+(30*SCRW) BYTE Charsets Data (CHRC+1)*1024
- bit 7 newFnt+
-$500 bytes - Colors ($100-Background, $100-Color0, $100-Color1, $100-Color2, $100-Color3)+3+(30*SCRW)+(CHRC+1)*1024 BYTE bit 0-6 Charsets Table
-$400 bytes - PMG Colors ($100-PM0, $100-PM1, $100-PM2, $100-PM3)+ bit 7 newFnt
-$200 bytes - Player0 DATA+33+(30*SCRW)+(CHRC+1)*1024 BYTE Bitmap Colors - Background
-$200 bytes - Missile0 DATA+33+(30*SCRW)+(CHRC+1)*1024+$100 BYTE Bitmap Colors - Color 0
 +33+(30*SCRW)+(CHRC+1)*1024+$200 BYTE Bitmap Colors - Color 1
 +33+(30*SCRW)+(CHRC+1)*1024+$300 BYTE Bitmap Colors - Color 2
 +33+(30*SCRW)+(CHRC+1)*1024+$400 BYTE Bitmap Colors - Color 3
-$200 bytes - Player1 DATA+33+(30*SCRW)+(CHRC+1)*1024+$500 BYTE PMG Colors - Player Missile 0
-$200 bytes - Missile1 DATA+33+(30*SCRW)+(CHRC+1)*1024+$600 BYTE PMG Colors - Player Missile 1
 +33+(30*SCRW)+(CHRC+1)*1024+$700 BYTE PMG Colors - Player Missile 2
 +33+(30*SCRW)+(CHRC+1)*1024+$800 BYTE PMG Colors - Player Missile 3
-$200 bytes - Player2 DATA+33+(30*SCRW)+(CHRC+1)*1024+$900 WORD PMG DATA - Player 0
-$200 bytes - Missile2 DATA+33+(30*SCRW)+(CHRC+1)*1024+$B00 WORD PMG DATA - Missile 0
-$200 bytes - Player3 DATA+33+(30*SCRW)+(CHRC+1)*1024+$D00 WORD PMG DATA - Player 1
-$200 bytes - Missile3 DATA+33+(30*SCRW)+(CHRC+1)*1024+$F00 WORD PMG DATA - Missile 1
-$800 bytes - Smask+33+(30*SCRW)+(CHRC+1)*1024+$1100 WORD PMG DATA - Player 2
 +33+(30*SCRW)+(CHRC+1)*1024+$1300 WORD PMG DATA - Missile 2
-240*290 bytes - Sprajt+33+(30*SCRW)+(CHRC+1)*1024+$1500 WORD PMG DATA - Player 3
-240*290 bytes - SprajtX+33+(30*SCRW)+(CHRC+1)*1024+$1700 WORD PMG DATA - Missile 3
-$100 bytes - 5th_Player[0..255]+33+(30*SCRW)+(CHRC+1)*1024+$1900 BYTE Smask ($800)
- 5th_Player[1] bit0..2 = g2f_mode = [1,2,3]+
- bit6 = 0 - DLI MODE+
- 1 - DLI+ MODE+
- bit7 = 0 - GED+ MODE+33+(30*SCRW)+(CHRC+1)*1024+$2100 BYTE Sprajt (240*290)
- 1 - GED+ disabled badlines MODE+
-240*24 bytes - Raster program+33+(30*SCRW)+(CHRC+1)*1024+$130E0 BYTE SprajtX (240*290)
-30 bytes - Graphics Mode = [1,2,4,255]+33+(30*SCRW)+(CHRC+1)*1024+$240C0 BYTE 5th Player [0..255]
 + 5th_Player[1] bit 0-2 = g2f_mode (1,2,3)
 + bit6 = 0 - DLI MODE
 + 1 - DLI+ MODE
-210 bytes - unused+ bit7 = 0 - GED+ MODE
 + 1 - GED+ disabled badlines MODE
-16 bytes - [0..15]+33+(30*SCRW)+(CHRC+1)*1024+$241C0 BYTE Raster program (240*24)
- raster_ofset = [0]-8+
-1 bytes - CHARSET LIMITATIONS - LAST CHAR+33+(30*SCRW)+(CHRC+1)*1024+$25840 BYTE Graphics Mode (1,2,4,255)
-$500 - Lock Colors ($100-Background, $100-Color0, $100-Color1, $100-Color2, $100-Color3)+63+(30*SCRW)+(CHRC+1)*1024+$25840 BYTE unused (210)
-1 bytes - unused+63+(30*SCRW)+(CHRC+1)*1024+$25912 BYTE raster [0..15]
 + raster_ofset = raster[0]-8
-3 bytes - Video_Chipset [0..2]+63+(30*SCRW)+(CHRC+1)*1024+$25922 BYTE CHARSET LIMITATIONS - LAST CHAR
- [0] = 0 - ANTIC+GTIA, 1 - ANTIC+VBXE+
- [1] = color map cell width+
- [2] = color map cell height+
-48*240 bytes - VBXE color map+64+(30*SCRW)+(CHRC+1)*1024+$25922 BYTE Lock Colors - Background
 +64+(30*SCRW)+(CHRC+1)*1024+$25A22 BYTE Lock Colors - Color 0
 +64+(30*SCRW)+(CHRC+1)*1024+$25B22 BYTE Lock Colors - Color 1
 +64+(30*SCRW)+(CHRC+1)*1024+$25C22 BYTE Lock Colors - Color 2
 +64+(30*SCRW)+(CHRC+1)*1024+$25D22 BYTE Lock Colors - Color 3
-1 bytes - CHARSET LIMITATIONS - FIRST CHAR+64+(30*SCRW)+(CHRC+1)*1024+$25E22 BYTE unused
-30*Screen_Width bytes - Invers2 Data (DLI+ mode)+65+(30*SCRW)+(CHRC+1)*1024+$25D22 BYTE Video Chipset [0..2]
 + [0] = 0 - ANTIC+GTIA, 1 - ANTIC+VBXE
 + [1] = color map cell width
 + [2] = color map cell height
-30 bytes - Table2 Data+68+(30*SCRW)+(CHRC+1)*1024+$25D22 BYTE VBXE Colors Map (48*240)
-128 bytes - Charset limitations+68+(30*SCRW)+(CHRC+1)*1024+$28A22 BYTE CHARSET LIMITATIONS - FIRST CHAR
-240*2 bytes - Raster line offset program+69+(30*SCRW)+(CHRC+1)*1024+$28A22 BYTE Invers2 Data (DLI+ mode)
-1 bytes - unused+69+(60*SCRW)+(CHRC+1)*1024+$28A22 BYTE Table2 Data
 + 
 +99+(60*SCRW)+(CHRC+1)*1024+$28A22 BYTE Charset limitations (128)
 + 
 +99+(60*SCRW)+(CHRC+1)*1024+$28AA2 BYTE Raster line offset program (240*2)
 + 
 +99+(60*SCRW)+(CHRC+1)*1024+$28C82 BYTE unused (1)
</pre> </pre>

Wersja z dnia 20:43, 6 mar 2011

Format pliku G2F jest przeznaczony dla programu Graph2Font. Autor z lenistwa uprościł go maksymalnie, przez co objętość plików G2F jest dosyć spora, średnio 160 kB. Duża objętość i podatność na kompresję wynika głównie z tego, że jest to zrzut pamięci zarezerwowanej na tablice używane przez G2F. W ostatnich wersjach programu umożliwiona została kompresja plików G2F.

Pliki kompresowane są przy pomocy ogólnie dostępnej biblioteki ZLIB, posiadają wówczas nagłówek G2FZLIB.

G2F file format
-----------------------------

offset					type	desc
------					----	----
0					BYTE	SCRW Screen Width (32, 40, 48)
1					BYTE	bit 0-2	Pixel (1,2,4)
			  			bit 3-7	Charset Compress ($80-Normal, $40-Optymizing, $20-Original, $10-JGP, $08-JGP2)

2					BYTE	CHRC Charset Count
3					BYTE	Screen and Invers Data (30*SCRW)

3+(30*SCRW)				BYTE	Charsets Data (CHRC+1)*1024

3+(30*SCRW)+(CHRC+1)*1024		BYTE	bit 0-6	Charsets Table
						bit 7	newFnt

33+(30*SCRW)+(CHRC+1)*1024		BYTE	Bitmap Colors - Background
33+(30*SCRW)+(CHRC+1)*1024+$100		BYTE	Bitmap Colors - Color 0
33+(30*SCRW)+(CHRC+1)*1024+$200		BYTE	Bitmap Colors - Color 1
33+(30*SCRW)+(CHRC+1)*1024+$300		BYTE	Bitmap Colors - Color 2
33+(30*SCRW)+(CHRC+1)*1024+$400		BYTE	Bitmap Colors - Color 3

33+(30*SCRW)+(CHRC+1)*1024+$500		BYTE	PMG Colors - Player Missile 0
33+(30*SCRW)+(CHRC+1)*1024+$600		BYTE	PMG Colors - Player Missile 1
33+(30*SCRW)+(CHRC+1)*1024+$700		BYTE	PMG Colors - Player Missile 2
33+(30*SCRW)+(CHRC+1)*1024+$800		BYTE	PMG Colors - Player Missile 3

33+(30*SCRW)+(CHRC+1)*1024+$900		WORD	PMG DATA - Player 0
33+(30*SCRW)+(CHRC+1)*1024+$B00		WORD	PMG DATA - Missile 0

33+(30*SCRW)+(CHRC+1)*1024+$D00		WORD	PMG DATA - Player 1
33+(30*SCRW)+(CHRC+1)*1024+$F00		WORD	PMG DATA - Missile 1

33+(30*SCRW)+(CHRC+1)*1024+$1100	WORD	PMG DATA - Player 2
33+(30*SCRW)+(CHRC+1)*1024+$1300	WORD	PMG DATA - Missile 2

33+(30*SCRW)+(CHRC+1)*1024+$1500	WORD	PMG DATA - Player 3
33+(30*SCRW)+(CHRC+1)*1024+$1700	WORD	PMG DATA - Missile 3

33+(30*SCRW)+(CHRC+1)*1024+$1900	BYTE	Smask ($800)

33+(30*SCRW)+(CHRC+1)*1024+$2100	BYTE	Sprajt (240*290)

33+(30*SCRW)+(CHRC+1)*1024+$130E0	BYTE	SprajtX (240*290)

33+(30*SCRW)+(CHRC+1)*1024+$240C0	BYTE	5th Player [0..255]
						5th_Player[1]	bit 0-2 = g2f_mode (1,2,3)
								bit6 =	0 - DLI MODE
									1 - DLI+ MODE

								bit7 =	0 - GED+ MODE
									1 - GED+ disabled badlines MODE

33+(30*SCRW)+(CHRC+1)*1024+$241C0	BYTE	Raster program (240*24)

33+(30*SCRW)+(CHRC+1)*1024+$25840	BYTE	Graphics Mode (1,2,4,255)

63+(30*SCRW)+(CHRC+1)*1024+$25840	BYTE	unused (210)

63+(30*SCRW)+(CHRC+1)*1024+$25912	BYTE	raster [0..15]
						raster_ofset = raster[0]-8

63+(30*SCRW)+(CHRC+1)*1024+$25922	BYTE	CHARSET LIMITATIONS - LAST CHAR

64+(30*SCRW)+(CHRC+1)*1024+$25922	BYTE	Lock Colors - Background
64+(30*SCRW)+(CHRC+1)*1024+$25A22	BYTE	Lock Colors - Color 0
64+(30*SCRW)+(CHRC+1)*1024+$25B22	BYTE	Lock Colors - Color 1
64+(30*SCRW)+(CHRC+1)*1024+$25C22	BYTE	Lock Colors - Color 2
64+(30*SCRW)+(CHRC+1)*1024+$25D22	BYTE	Lock Colors - Color 3

64+(30*SCRW)+(CHRC+1)*1024+$25E22	BYTE	unused

65+(30*SCRW)+(CHRC+1)*1024+$25D22	BYTE	Video Chipset [0..2]
						[0] = 0 - ANTIC+GTIA, 1 - ANTIC+VBXE
						[1] = color map cell width
						[2] = color map cell height

68+(30*SCRW)+(CHRC+1)*1024+$25D22	BYTE	VBXE Colors Map (48*240)

68+(30*SCRW)+(CHRC+1)*1024+$28A22	BYTE	CHARSET LIMITATIONS - FIRST CHAR

69+(30*SCRW)+(CHRC+1)*1024+$28A22	BYTE	Invers2 Data (DLI+ mode)

69+(60*SCRW)+(CHRC+1)*1024+$28A22	BYTE	Table2 Data

99+(60*SCRW)+(CHRC+1)*1024+$28A22	BYTE	Charset limitations (128)

99+(60*SCRW)+(CHRC+1)*1024+$28AA2	BYTE	Raster line offset program (240*2)

99+(60*SCRW)+(CHRC+1)*1024+$28C82	BYTE	unused (1)

Ten artykuł to tylko zalążek. Możesz pomóc rozwojowi Atariki poprzez rozszerzenie go o więcej informacji.

Personal tools