Chameleon

Chameleon Commit Details

Date:2010-08-08 12:46:41 (13 years 7 months ago)
Author:Tamás Kosárszky
Commit:327
Parents: 326
Message:Replaced default artwork with Blackosx's new set, but keeping the old default theme under artwork/legacy. Removed obsolete/unused boot1.asm.
Changes:
D/trunk/i386/boot1/boot1.asm
A/trunk/artwork/themes/legacy/progress_bar.png
A/trunk/artwork/themes/legacy/menu_verbose.png
A/trunk/artwork/themes/legacy/device_generic.png
A/trunk/artwork/themes/legacy/text_scroll_prev.png
A/trunk/artwork/themes/legacy/logo.png
A/trunk/artwork/themes/legacy/device_ext3.png
A/trunk/artwork/themes/legacy/boot.png
A/trunk/artwork/themes/legacy/menu_single_user.png
A/trunk/artwork/themes/legacy/device_scroll_prev.png
A/trunk/artwork/themes/legacy/menu_ignore_caches.png
A/trunk/artwork/themes/legacy/menu_verbose_disabled.png
A/trunk/artwork/themes/legacy/menu_boot.png
A/trunk/artwork/themes/legacy/font_console.png
A/trunk/artwork/themes/legacy/device_ntfs.png
A/trunk/artwork/themes/legacy/device_fat.png
A/trunk/artwork/themes/legacy/menu_single_user_disabled.png
A/trunk/artwork/themes/legacy/font_small.png
A/trunk/artwork/themes/legacy/text_scroll_next.png
A/trunk/artwork/themes/legacy/device_hfsplus.png
A/trunk/artwork/themes/legacy/device_selection.png
A/trunk/artwork/themes/legacy/menu_ignore_caches_disabled.png
A/trunk/artwork/themes/legacy/menu_video_info.png
A/trunk/artwork/themes/legacy/menu_memory_info.png
A/trunk/artwork/themes/legacy/theme.plist
A/trunk/artwork/themes/legacy/menu_selection.png
A/trunk/artwork/themes/legacy/device_scroll_next.png
A/trunk/artwork/themes/legacy/menu_help.png
A/trunk/artwork/themes/legacy
A/trunk/artwork/themes/legacy/background.png
A/trunk/artwork/themes/legacy/device_cdrom.png
A/trunk/artwork/themes/legacy/progress_bar_background.png
M/trunk/artwork/themes/default/device_scroll_prev.png
M/trunk/artwork/themes/default/device_fat.png
M/trunk/artwork/themes/default/device_ntfs.png
M/trunk/artwork/themes/default/font_small.png
M/trunk/artwork/themes/default/device_hfsplus.png
M/trunk/artwork/themes/default/device_selection.png
M/trunk/artwork/themes/default/theme.plist
M/trunk/artwork/themes/default/device_scroll_next.png
M/trunk/artwork/themes/default/device_cdrom.png
M/trunk/artwork/themes/default/progress_bar_background.png
M/trunk/artwork/themes/default/progress_bar.png
M/trunk/artwork/themes/default/device_generic.png
M/trunk/artwork/themes/default/device_ext3.png

File differences

trunk/artwork/themes/default/theme.plist
1313
1414
1515
16
16
1717
1818
1919
......
3131
3232
3333
34
34
3535
3636
3737
......
5353
5454
5555
56
56
5757
5858
5959
......
6969
7070
7171
72
72
7373
7474
7575
......
8181
8282
8383
84
84
8585
8686
8787
<key>screen_textmargin_v</key>
<string>10</string>
<key>screen_bgcolor</key>
<string>#222334</string>
<string>#53514C</string>
<key>background_pos_x</key>
<string>50%</string>
<key>background_pos_y</key>
<key>devices_pos_y</key>
<string></string>
<key>devices_bgcolor</key>
<string>#222334</string>
<string>#53514C</string>
<key>devices_transparency</key>
<string>0</string>
<key>devices_max_visible</key>
<key>bootprompt_textmargin_v</key>
<string>5</string>
<key>bootprompt_bgcolor</key>
<string>#222334</string>
<string>#53514C</string>
<key>bootprompt_transparency</key>
<string>1</string>
<key>infobox_pos_x</key>
<key>infobox_textmargin_v</key>
<string>10</string>
<key>infobox_bgcolor</key>
<string>#222334</string>
<string>#53514C</string>
<key>infobox_transparency</key>
<string>10</string>
<key>menu_pos_x</key>
<key>menu_textmargin_v</key>
<string>5</string>
<key>menu_bgcolor</key>
<string>#222334</string>
<string>#53514C</string>
<key>menu_transparency</key>
<string>1</string>
<key>progressbar_pos_x</key>
trunk/artwork/themes/legacy/theme.plist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Enabled</key>
<string>no</string>
<key>screen_width</key>
<string>1024</string>
<key>screen_height</key>
<string>768</string>
<key>screen_textmargin_h</key>
<string>10</string>
<key>screen_textmargin_v</key>
<string>10</string>
<key>screen_bgcolor</key>
<string>#222334</string>
<key>background_pos_x</key>
<string>50%</string>
<key>background_pos_y</key>
<string>0</string>
<key>logo_pos_x</key>
<string></string>
<key>logo_pos_y</key>
<string>3%</string>
<key>logo_bgcolor</key>
<string>#000000</string>
<key>logo_transparency</key>
<string>255</string>
<key>devices_pos_x</key>
<string></string>
<key>devices_pos_y</key>
<string></string>
<key>devices_bgcolor</key>
<string>#222334</string>
<key>devices_transparency</key>
<string>0</string>
<key>devices_max_visible</key>
<string>5</string>
<key>devices_iconspacing</key>
<string>20</string>
<key>devices_layout</key>
<string>horizontal</string>
<key>bootprompt_pos_x</key>
<string>%50</string>
<key>bootprompt_pos_y</key>
<string>-2</string>
<key>bootprompt_width</key>
<string>50%</string>
<key>bootprompt_height</key>
<string>20</string>
<key>bootprompt_textmargin_h</key>
<string>10</string>
<key>bootprompt_textmargin_v</key>
<string>5</string>
<key>bootprompt_bgcolor</key>
<string>#222334</string>
<key>bootprompt_transparency</key>
<string>1</string>
<key>infobox_pos_x</key>
<string></string>
<key>infobox_pos_y</key>
<string></string>
<key>infobox_width</key>
<string>650</string>
<key>infobox_height</key>
<string>406</string>
<key>infobox_textmargin_h</key>
<string>10</string>
<key>infobox_textmargin_v</key>
<string>10</string>
<key>infobox_bgcolor</key>
<string>#222334</string>
<key>infobox_transparency</key>
<string>10</string>
<key>menu_pos_x</key>
<string></string>
<key>menu_pos_y</key>
<string>-5%</string>
<key>menu_textmargin_h</key>
<string>10</string>
<key>menu_textmargin_v</key>
<string>5</string>
<key>menu_bgcolor</key>
<string>#222334</string>
<key>menu_transparency</key>
<string>1</string>
<key>progressbar_pos_x</key>
<string></string>
<key>progressbar_pos_y</key>
<string>-30%</string>
<key>progressbar_width</key>
<string>100</string>
<key>progressbar_height</key>
<string>40</string>
<key>countdown_pos_x</key>
<string></string>
<key>countdown_pos_y</key>
<string>-20%</string>
<key>boot_width</key>
<string>1024</string>
<key>boot_height</key>
<string>768</string>
<key>boot_bgcolor</key>
<string>#AAAAAA</string>
</dict>
</plist>
trunk/i386/boot1/boot1.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
; boot1.asm - boot1 written for turbo assembler, since gas only
; generates 32 bit code and this must run in real mode.
; To compile as hard disk boot1:
;tasm /m3 /dBOOTDEV=HDISK boot1
;tlink boot1
;exe2bin boot1
;ren boot1.bin boot1
; To compile as floppy boot1f:
;tasm /m3 /dBOOTDEV=FLOPPY boot1 ,boot1f
;tlink boot1f
;exe2bin boot1f
;ren boot1f.bin boot1f
;***********************************************************************
;This is the code for the NeXT boot1 bootsector.
;***********************************************************************
P486;enable i386 instructions
IDEAL
SEGMENT CSEG
ASSUME CS:CSEG,DS:CSEG
SDEBUG = 0
;BOOTSEG=100h; boot will be loaded at 4k
;BOOTOFF=0000h
BOOTSEG=00h
BOOTOFF=1000h
BUFSZ=2000h; 8K disk transfer buffer
; FDISK partition table in sector 0
PARTSTART=1beh; starting address of partition table
NUMPART=4; number of partitions in partition table
PARTSZ=16; each partition table entry is 16 bytes
BOOT_IND=0; offset of boot indicator in partition table
BEG_HEAD=1; offset of beginning head
BEG_SEC= 2; offset of beginning sector
BEG_CYL=3; offset of beginning cylinder
NAME_OFFSET=4; offset of partition name
PARTSEC=8; offset of partition sector specifier
NEXTNAME=0A7h; value of boot_ind, means bootable partition
LOADSZ=88; maxiumum possible size of unix boot-- 44k
FLOPPY=0
HDISK=80h
;BOOTDEV=?; set to 00h for floppy, 80h for hard disk
; (use a command line switch to set)
; NeXT disk label
DISKLABEL=15; sector num of 2nd disk label, 1st is trashed by bootsec
DL_DISKTAB=44
; We support disk label version 3 "3Vld" in our little endian world
DL_V3= 33566c64h
; NeXT disktab
DT_SECSIZE=48
DT_BOOT0_BLKNO=80
-
; This code is a replacement for boot1. It is loaded at 0x0:0x7c00
start:
movax,BOOTSEG
cli; interrupts off
movss,ax; set up stack seg
movsp,0fff0h
sti; reenable interrupts
xorax,ax
moves,ax
movds,ax
movsi,7C00h
cld; so pointers will get updated
movdi,0E000h; relocate boot program to 0xE000
movcx,100h; copy 256x2 bytes
repnzmovsw; move it
off1= 0E000h + (a1 - start)
jmpFAR 0000:off1; jump to a1 in relocated place
a1:
movax,0E00h
movds,ax
movax,BOOTSEG
moves,ax
; load the boot loader (boot2) into BOOTSEG:BUFSZ
callloadboot
; ljmp to the second stage boot loader (boot2).
; After ljmp, cs is BOOTSEG and boot1 (BUFSZ bytes) will be used
; as an internal buffer "intbuf".
xoredx,edx; bootdev = 0 for hard disk
IF( BOOTDEV EQ FLOPPY )
incedx; bootdev = 1 for floppy disk
ENDIF
;boot2 immediately follows disk buffer; 4K + BUFSZ
jmpFAR BOOTSEG:(BOOTOFF + BUFSZ)
; jump to boot2 in loaded location
loadboot:
movsi, OFFSET intro
callmessage; display intro message
; load second stage boot from fixed disk
; get boot drive parameters
; Note: I believe that the bootsector read may not be necessary;
; at least some blk0 bootsectors leave a pointer to the active
; partition entry in si (assuming there was another blk0 bootsec)
callgetinfo
-
IF( BOOTDEV EQ HDISK )
; read sector 0 into BOOTSEG:0 by using BIOS call (INT 13H 02H)
; this gets info on the disk's actual partition table
; However, in the case of multiple partitions, this may not
; be the same as the sector with the code here.
movdi,5; try 5 times to read bootsector
retry_disk:
xorbx, bx; buffer is BOOTSEG:0
movax,201h
movcx,bx
movdx,bx
movbx,BOOTOFF; actually, it's 0:BOOTOFF
inccx; cyl 0, sector 1
movdl,BOOTDEV; target 0, head 0
pushdi
int13h; read the bootsector
popdi
jnbread_success1
; woops, bios failed to read sector
xorax,ax
int13h; reset disk
decdi
jneretry_disk
jmpread_error; disk failed
read_success1:; find the NeXT partition
movbx,PARTSTART
movcx,NUMPART
again:
moval, [es:(bx+BOOTOFF)+NAME_OFFSET]
; get partition name
cmpal, NEXTNAME; is it NeXT partition?
jnecont; nope, keep looking
foundNextPart:; found it, get label location
moveax, [es:(bx+BOOTOFF)+PARTSEC]
; offset to NeXT partition
addeax, DISKLABEL; add offset to the label
jmpgetLabl; fetch that label
cont:
addbx, PARTSZ
loopagain; if more part table entries,
; keep looking
; fall through, didn't find NeXT disk partition entry
no_fdisk:
ENDIF
; Read NeXT disk label
moveax, DISKLABEL; Get block number of label
getLabl:
movbx,BOOTOFF; read into load area
movcx,1
callreadSectors
; we used to think about testing the disk label version here...
movbx,BOOTOFF; point to beginning of label
; Use values from label to read entire boot program
; Get block number of boot
; Get dl_secsize and dl_boot0_blkno[0]
movedx, [es:(bx + DL_DISKTAB+DT_SECSIZE)]
bswapedx; edx -> sector size
moveax, [es:(bx + DL_DISKTAB+DT_BOOT0_BLKNO)]
bswapeax; eax -> block #
; Compute dl_secsize * dt_boot0_blkno[0] / 512
shredx, 9; divide dl_secsize by 512
muledx; multiply boot block loc
; by dl_secsize/512
; eax has secno
movbx, (BUFSZ + BOOTOFF); read boot2 into BOOTSEG:BUFSZ
movedi, LOADSZ; read this many sectors
nexsec:
pusheax; push sector #
pushbx; push buffer address
movecx, edi; max number of sectors to read
callreadSectors
popbx
popeax
addeax, ecx; add number of sectors read
subdi, cx
shlcx, 9; multiply by 512 bytes per sector
addbx, cx
cmp di, 0
jnenexsec
ret
spt:DW0; sectors;track (one-based)
spc:DW0; tracks;cylinder (zero-based)
nsec:DW0; number of sectors to read
readSectors:; eax has starting block #, bx has offset from BOOTSEG
; cx has maximum number of sectors to read
; Trashes ax, bx, cx, dx
; BIOS call "INT 0x13 Function 0x2" to read sectors
;ah = 0x2al = number of sectors
;ch = cylindercl = sector
;dh = headdl = drive (0x80=hard disk, 0=floppy disk)
;es:bx = segment:offset of buffer
IF( BOOTDEV EQ FLOPPY )
pusheax
moval,'.'
callputchr
popeax
ENDIF
pushbx; save offset
mov [WORD nsec], cx
movebx, eax; bx -> block #
xorecx, ecx
movcx, [WORD spc]; cx -> sectors/cyl
xoredx,edx; prepare for division
divecx; eax = cyl, edx=remainder
pushax; save cylinder #, sec/spc
moveax, edx
movcx, [WORD spt]; ecx -> sectors/track
xoredx,edx; prepare for division
divecx; eax = head
pushax; save head, (secspc)/spt
moveax, ebx; reload block #
xoredx, edx; prepare for division
divecx; edx has sector #
subcx, dx ;cx now has number of sectors to read
cmpcx, [WORD nsec]
jgelast; use the minimum of bx and cx
mov[WORD nsec], cx
last:
movcx, dx; cl -> sector
inccl; starts @ 1
popax; get head
movdh, al; dh -> head
popax; get cyl
movch, al; ch -> cyl
movdl, BOOTDEV; floppy disk
xoral,al
shrax,2
orcl,al; retain pesky big cyl bits
;moval, 1; get # of sectors
;pop ax ; number of sectors to read
mov ax, [WORD nsec]
popbx; get buffer
movah, 2; bios read function
int13h
jbread_error
mov cx, [WORD nsec] ; return number of sectors read
ret
getinfo:; get some drive parameters
movdl, BOOTDEV; boot drive is drive C
movah, 8h
pushes
int13h
popes
moval, dh; max head #
incal; al -> tracks/cyl
andcx, 3fh; cl -> secs/track
mulcl; ax -> secs/cyl
mov[WORD spc], ax
mov[WORD spt], cx
ret
message:; write the error message in ds:esi
; to console
pushes
movax,ds
moves,ax
movbx, 1; bh=0, bl=1 (blue)
cld
nextb:
lodsb; load a byte into al
cmpal, 0
jedone
movah, 0eh; bios int 10, function 0xe
int10h; bios display a byte in tty mode
jmpnextb
done:popes
ret
putchr:
pushbx
movbx, 1; bh=0, bl=1 (blue)
movah, 0eh; bios int 10, function 0xe
int10h; bios display a byte in tty mode
popbx
ret
IFSDEBUG
hexout:-; print ebx as hex number
pushcx
pushax
movcx,8;output 8 nibbles
htop:
rolebx,4
moval,bl
andal,0fh
cmpal,0ah
jbo_digit
addal,'A'-10
jmpo_print
o_digit:addal,'0'
o_print:callputchr
deccx
jnehtop
;moval,10
;callputchr
;moval,13
;callputchr
moval,' '
callputchr
popax
popcx
ret
ENDIF
read_error:
movsi, OFFSET eread
boot_exit:; boot_exit: write error message and halt
callmessage; display error message
halt:jmphalt
intro:db10,'NEXTSTEP boot1 vXX.XX.XX.XX.XX',10,13,0
eread:db'Read error',10,13,0
; the last 2 bytes in the sector contain the signature
d1:
a2 = 510 - (d1 - start)
DB a2 dup (0)
DW 0AA55h
ENDS
END

Archive Download the corresponding diff file

Revision: 327