-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogrammers.txt
More file actions
1021 lines (894 loc) · 39.6 KB
/
Copy pathprogrammers.txt
File metadata and controls
1021 lines (894 loc) · 39.6 KB
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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
- PROGRAMMER'S MANUAL -
==============================================================================
・State at program startup
Registers
a0 Address of memory management pointer
a1 End address of program + 1
a2 Command-line address
a3 Environment address
a4 Program start address
sr User mode
usp Parent stack
ssp System stack
Others undefined
Memory
The maximum memory that can be allocated is allocated.
Command-line structure
LASCII format, length of character string is the first byte, and 0 is added at the end of the string.
Environment
If you change the contents of the environment with DOS _SETENV in the parent environment itself, the parent's environment will also be changed.
When executing a child process under different environments, separate memory is allocated and a new environment is prepared.
Structure of the environment
The size of the environment variable area is indicated in the first 4 bytes.
Each environment variable is delimited by one byte of 0, and the end of the environment variable is given another zero byte.
==============================================================================
・Memory management pointer
offset size
0 1.l Previous memory management pointer(If it is 0)
4 1.l The memory management pointer of the process that secured this memory(0 if there is no parent)
8 1.l End address of this memory block + 1
12 1.l Next memory management pointer (end if 0)
The memory management pointer always starts from the address (16 byte
boundary) whose lower 4 bits are 0, and the head exists in the supervisor
area of the OS main body.
It is the most significant byte of the 4th byte (the process that
allocated memory) and represents the attribute of that memory block.
$ff Resident process(KEEP)
$fe unknown(MEMDRV)
$fd Sub memory block
==============================================================================
・Process management pointer (256 bytes)
offset size
$0000 1.l Previous memory management pointer (leading 0) ┐
$0004 1.l Process management pointer of the parent process (0 if there is no parent) │Memory management
$0008 1.l End address of this memory block + 1 │ Pointer
$000c 1.l Next memory management pointer (end if 0) ┘
$0010 1.l Environment's address (not secured if -1)
$0014 1.l Return address at end
$0018 1.l Return address when interrupted by CTRL + C
$001c 1.l Return address when interrupted due to error
$0020 1.l Command line address
$0024 12.b Process file handler usage
(In use = 1 in the order of bits 0 to 7 of $ 24 to $ 2f)
$0030 1.l Start address of BSS
$0034 1.l Head address of heap (same as BSS)
$0038 1.l Initial stack address (end of heap + 1)
$003c 1.l USP of parent process
$0040 1.l SSP of parent process
$0044 1.w SR of parent process
$0046 1.w SR at abort
$0048 1.l SSP at abort
$004c 1.l A vector of trap #10
$0050 1.l A vector of trap #11
$0054 1.l A vector of trap #12
$0058 1.l A vector of trap #13
$005c 1.l A vector of trap #14
$0060 1.l shell startup flag (0: normal startup - 1: started as shell)
$0064 1.b Module number
$0065 3.b (Unused)
$0068 1.l Memory management pointer of loaded child process
$006a 5.l (Unused)
$0080 2.b Drive name of executable file
$0082 66.b Path name of executable file
$00c4 24.b File name of executable file
$00dc 9.l (Unused)
$0100 (Program top)
==============================================================================
・Memory map
address
$0000_0000 Exception vector table (maker reservation: $00 to $3f)
$0000_0100 〃 (user interrupt: $40 to $ff)
$0000_0400 IOCS call vector table
$0000_0800 IOCS work
$0000_1000 ROM debugger work (1)
$0000_1800 DOS call vector table
$0000_1c00 Human 68k work
$0000_2000 FD IPL / HD IPL MENU
$0000_2400 HD IPL
$0000_2800 ROM debugger work (2)
$0000_3800 Not used (HD IPL will also be used after start of $2400)
$0000_6800 Human68k / SSP
$00c0_0000 GV-RAM(2MB)
$00e0_0000 TV-RAM(512KB)
$00e8_0000 CRTC
$00e8_2000 VC
$00e8_4000 DMAC
$00e8_6000 Area set
$00e8_8000 MFP
$00e8_a000 RTC
$00e8_c000 Printer
$00e8_e000 System port
$00e9_0000 OPM
$00e9_2000 ADPCM
$00e9_4000 FDC
$00e9_6000 SPC (SCSI model) / HDC (SASI model)
$00e9_8000 SCC
$00e9_a000 i8255 (joystick)
$00e9_c000 I/O controller
$00e9_e000 Coprocessor I/O 0
$00e9_e080 〃 1
$00ea_0000 SCSI board (SPC port and SCSI ROM, 8 KB)
$00ea_ff80 Extended area set (X68030)
$00ec_0000 User I / O (usable with expansion board, 64 KB)
$00ed_0000 SRAM(16KB)
$00ed_4000 Spare (48 KB)
$00ee_0000 Not used (128KB)
$00f0_0000 CGROM(768KB)
(X68000 SASI)
$00fc_0000 The same contents as $fe0000〜$ffffff are read out.
$00fe_0000 ROM Debugger
$00fe_4fc0 ROM Human IPL
$00fe_5000 Human68k version 1.00
$00ff_0000 IPL / ROM IOCS
$00ff_dc00 ROM DISK
(X68000 SCSI)
$00fc_0000 SCSI IOCS / SCSI IPL(8KB)
$00fe_0000 ROM Debugger (Same as SASI model)
$00fe_4fc0 ROM Human IPL ( 〃 )
$00fe_5000 Human68k version 1.00 ( 〃 )
$00ff_0000 IPL / ROM IOCS(64KB)
(X68030)
$00fc_0000 SCSI IPL header part(512byte)
$00fc_0200 Human68k version 2.15
$00fc_e000 FLOAT2.X version 2.02
$00fd_3800 ROM Debugger
$00ff_0000 IPL / ROM IOCS / SCSI IOCS(64KB)
$0100_0000〜 Reservation
note Just after resetting, $0000〜$ffff can read the same contents as $ff0000〜$ffffff.
==============================================================================
・CRTC
address size
$e80000 1.w R00 水平トータル ┐
$e80002 1.w R01 水平同期終了位置 │Horizontal timing control
$e80004 1.w R02 水平表示開始位置 │
$e80006 1.w R03 水平表示終了位置 ┘
$e80008 1.w R04 垂直トータル ┐
$e8000a 1.w R05 垂直同期終了位置 │Vertical timing control
$e8000c 1.w R06 垂直表示開始位置 │
$e8000e 1.w R07 垂直表示終了位置 ┘
$e80010 1.w R08 外部同期水平アジャスト : Horizontal position fine adjustment
$e80012 1.w R09 ラスタ番号 : For raster interrupt
$e80014 1.w R10 X 位置 ┐Scrolling text screen
$e80016 1.w R11 Y 位置 ┘
$e80018 1.w R12 X0 ┐
$e8001a 1.w R13 Y0 │
$e8001c 1.w R14 X1 │
$e8001e 1.w R15 Y1 │Scroll graphic screen
$e80020 1.w R16 X2 │
$e80022 1.w R17 Y2 │
$e80024 1.w R18 X3 │
$e80026 1.w R19 Y3 ┘
$e80028 1.w R20 Memory mode / display mode control
$e8002a 1.w R21 Simultaneous access / raster copy / fast clear plane selection
$e8002c 1.w R22 For raster copy operation: raster number
$e8002e 1.w R23 Text screen access mask pattern
$e80481 1.b action Image capture / fast clear / raster copy control
==============================================================================
・Video controller
address size
$e82000 256.w Graphic palette
$e82200 16.w Text palette (Palette block 0)
$e82220 240.w Sprite palette ( 〃 1〜15)
$e82400 1.w R0 (Screen mode setting)
$e82500 1.w R1 (Priority control)
$e82600 1.w R2 (Special Priority / Screen Display)
==============================================================================
・System port
address
$e8e001 #1 contrast
bit 3〜0 CONTRAST 0:暗い〜$f:明るい
$e8e003 #2 ディスプレイ/3D スコープ
bit 3 TV CTRL Read 0:ディスプレイの電源 ON 1:OFF
Write 0:Display 制御信号 0 1:同 1
bit 1 3D-L 0:3Dスコ-プ左シャッタ- CLOSE 1:OPEN
bit 0 3D-R 0:〃 右〃 CLOSE 1:OPEN
$e8e005 #3 カラーイメージユニット(bit 4〜0)
$e8e007 #4 キーボード/NMI/ドットクロック
bit 3 KEY CTRL Read 0:キーボード非接続 1:接続
Write 0:キーデータ送信不可 1:許可
bit 2 NMI RESET 0:NMI リセットしない 1:する
bit 1 HRL 0:分周比 1/2,1/3,1/6
1: 1/2,1/4,1/8
$e8e009 #5 ROM/DRAM ウェイト
bit 7〜4 ROM Wait Control
bit 3〜0 DRAM Wait Control
ウェイト数は設定値+2. ただし、DRAM アクセスは
スタティックカラム動作中 0、ページ間をまたぐ時
は 4.
$e8e00b #6 MPU 種別/動作クロック
bit 7〜4 MPU Type
$f:68000 $e:68020 $d:68030 $c:68040
bit 3〜0 MPU Clock(MHz)
$f:10 $e:16 $d:20 $c:25 $b:33 $a:40 $9:50
$e8e00d #7 SRAM 書き込み
bit 7〜0 SRAM Write Enable Control
$31 で SRAM 書き込み可能.
$e8e00f #8 本体電源 OFF
bit 3〜0 Power Off Control
$00,$0f,$0f の順に書き込むと電源 OFF.
==============================================================================
・SRAM
address size 初期値
$ed0000 8.b 'X68000',$57 Memory check data
$ed0008 1.l $0020_0000 Implemented main memory capacity (SASI: $100000, 030: $400000)
$ed000c 1.l $00fc_0000 Pointer to ROM start address (1.l)
($fc???? の場合 ID=????/4 の SCSI から起動)
$ed0010 1.l $00ed_0100 SRAM 起動アドレス
$ed0014 1.l -1 アラームで起動後、電原 OFF までの時間(分単位)
(IOCS _ALARMSET の d2.l -1)
$ed0018 1.w 0 最優先ブートデバイス(n はドライブ番号)
$0000 STD(2HD → HD → ROM → RAM)
$8n00 SASI-HD n
$9n70 2HD n
$a000 ROM(通常は SCSI ROM)
$b000 RAM(通常は SRAM)
上記以外の値は STD と見なされる. STD 以外から
起動できなかった場合は STD で起動を試みる.
$ed001a 1.w $4e07 RS-232C の設定(IOCS _SET232C の引数と同じ)
bit 15〜14 : ストップビット
(0,3:2bit 1:1bit 2:1.5bit)
bit 13〜12 : パリティ(0,2:なし 1:奇数 3:偶数)
bit 11〜10 : ビット長
(0:5bit 1:6bit 2:7bit 3:8bit)
bit 9 : XON/XOFF 処理(0:OFF 1:ON)
bit 8 : SI/SO 処理(0:OFF 1:ON) ※使用禁止
bit 3〜 0 : 転送速度(bps)
(0: 75 1: 150 2: 300 3: 600
4:1200 5:2400 6:4800 7:9600)
(X68030 のみ 8:17361 も指定可能)
$ed001c 1.b 0 起動時のキー LED の状態(電原 OFF 時の状態が
bit 7 未使用 待避されている)
bit 6 全角
bit 5 ひらがな
bit 4 INS
bit 3 CAPS
bit 2 コード入力
bit 1 ローマ字
bit 0 かな
bit = 0 で消灯、1 で点灯
$ed001d 1.b 16 Screen mode at startup(IOCS CRTMOD の d1)
As the error display routine in ROM IOCS only supports 16 modes, do not set values other than 16 as much as possible.
Human 68k always starts in 16 modes.
$ed001e 1.l 0 Operation when activated by alarm(IOCS _ALARMSET の a1)
0:Stand up as usual(Boot from specified media). If the time until turning OFF is other than -1, turn the main unit OFF after the specified time.
$01〜$3f:Control the TV.
OIf the time to FF is -1, only the main body is turned off after 1 minute. Otherwise it turns off the main body and the television after the specified time.
$40〜 :$000040〜$ffffff までのアドレス指定.
先頭バイトが $60 ならスーパーバイザの
ままそのアドレスをコールし、そのサブ
ルーチンから戻ると本体を OFF.
-1:普通に立ち上がる(指定のメディアからブ
ート). テレビの制御はしない. OFF する
までの時間が -1 以外なら、指定時間後
本体を OFF.
$ed0022 1.l $ffff_0000 アラームで起動する時間(IOCS _ALARMSET の d1)
bit 31〜28 未使用(0)
bit 27〜24 曜日(0〜6)
bit 23〜16 日(01〜31:BCD2桁)
bit 15〜 8 時(00〜23:BCD2桁)
bit 7〜 0 分(00〜59:BCD2桁)
それぞれ $f は無視を表す.
$ed0026 1.b 7 アラームの禁止/許可(0:許可 7:禁止)
$ed0027 1.b 0 OPT.2 キーをテレビコントロールに使用するか
(0:使用する 1:しない)
$ed0028 1.b 14 コントラストのシステム既定値(0〜15)
$ed0029 1.b 0 本体 OFF 時に FD をイジェクトするか
(0:イジェクトしない 1:する)
$ed002a 1.b $0d 本体 OFF 時に行うテレビコントロールのコード
$ed002b 1.b 0 キーボードの配列 0:JIS配列
1:あいうえお配列
$ed002c 1.b 0 電卓の文字フォント 0:LCD
1:通常のフォント
$ed002d 1.b 0 SRAM 使用状態
0:未使用 1:SRAMDISK 2:プログラム
$ed002e 1.w $0000 System specification value of text palette 0
$ed0030 1.w $f83e 〃 1 〃
$ed0032 1.w $ffc0 〃 2 〃
$ed0034 1.w $fffe 〃 3 〃
$ed0036 1.w $de6c 〃 4〜 7 〃
$ed0038 1.w $4022 〃 8〜15 〃
$ed003a 1.b 3 Time until key auto repeat starts(0〜15)
200+100N[ms]
$ed003b 1.b 2 Key repeat interval(0〜15) 30+5N^2[ms]
$ed003c 1.l $0008_0000 Printer timeout time
$ed0040 1.l 0 Integrated operation time from the initialization of SRAM to the last time It is integrated every time main unit OFF and software reset (in minutes).
$ed0044 1.l 0 Number of times the main body is turned OFF after SRAM is initialized is added for each body OFF.
$ed0048 1.l $00ff_dc00 ROMDISK FAT start address(030:$00ff_f400)
(ROM DISK's BPB)
$ed004c 1.w 1024 Number of bytes per sector
$ed004e 1.b 1 Number of sectors per cluster
$ed004f 1.b 1 Number of FAT regions
$ed0050 1.w 0 Number of reserved areas
$ed0052 1.w 32 Number of entries in the root directory
$ed0054 1.w 9 Number of sectors in all areas (030: 3)
$ed0056 1.b $f9 Media byte
$ed0057 1.b 1 Number of sectors per FAT area
$ed0058 1.b 0 Using ROM debugger($00:OFF $ff:ON)
$ed0059 1.b 0 $7c,$7e,$5c(\~|) Character conversion flag
bit 2 0:| 1:|(Dashed line)
bit 1 0: ̄ 1:〜
bit 0 0:¥ 1:\
$ed005a 1.b 0 Number of SASI-HD connections(0〜15)
An error occurs at the IOCS level above the specified number.
$ed005b 1.b 0 System reservation
(RSDRV.SYS)
$ed005c 1.w 0($4e07) Extended RS-232C setting
$ed005e 1.w 0($4e07) 〃 See $ ed001a for details.
$ed0060 1.w 0($4e07) 〃 However, if bits 3 to 0 = 8, 19200 bps
$ed0062 1.w 0($4e07) 〃
$ed0064 11.b 0 System reservation
(SCSI)
$ed006f 1.b 0('V') SCSI application flag(0:Disabled $56='V':Effectiveness)
$ed0070 1.b 0 SCSI relationship(bit 7〜4 Valid for X68030 and later)
bit 7 Number of words transferred per DMA
(0:256 bytes
1:Variable with $cc0, usually 512 bytes)
bit 6 Ignore device type at boot
(0:0,4,5,7,$84 Boot only
1:Ignore device type)
bit 5 DMA burst mode(Currently fixed at 0)
(0:Auto request maximum speed
1:Initial auto request, afterwards external request transfer)
bit 4 Transfer mode(0:DMA transfer 1:MPU transfer)
bit 3 Types of SCSI
(0:Built in 1:Option board)
bit 2〜0 ID number of main unit
$ed0071 1.b 0 SASI flag
When a SASI disk is connected to SCSI, set the bit corresponding to the SASI ID to 1.
(SX-WINDOW)
$ed0072 2.b 0('SX') SX-WINDOW environment flag(Busy with 'SX')
$ed0074 1.b 0(6) Movement amount of mouse pointer(Late $03 to $0a speed)
$ed0075 1.b 0(6) Double mouse click feeling(短 $00〜$0c 長)
$ed0076 1.b 0(96) Text Palette Hue:H($00〜$bf)
$ed0077 1.b 0(2) 〃 saturation:S($00〜$1f)
$ed0078 1.b 0(%11111_110) 〃 brightness:V0,V1($88〜$ff)
$ed0079 1.b 0(%00_10000_0) brightness:V1,V2,V3($82〜$ba)
$ed007a 1.b 0(%0000_0000) brightness:V3($00〜$e0)
$ed007b 1.b 0(0) Printer driver(PRTD)ID
0:SHARP CZ 24 ピン 5:EPSON ESC/P24-J84・C
1:EPSON ESC/P24-J83・C 6:ADOBE PostScript
2:NEC PC-PR*** 7:CANON LIPS3
3:SHARP CZ 48 ピン 8:EPSON ESC/Page
4:CANON BJ-***
$ed007c 1.b 0(%0010_0011) bit 7〜4:Version number
%0000 SXWIN.X Ver.1.0
%0001 SXWIN.X Ver.1.1
%0010 SXWIN.X Ver.3.0
bit 3〜0:File save mode
(bit 1:DIRDTOP.SX 保存)
(bit 0:SYSDTOP.SX 保存)
$ed007d 1.b 0(0) Background picture (PICT) ID
0:System 0 1:System 1 2:User defined
$ed007e 1.b 0(0) SX-WINDOW 画面モード
bit 7 0:768x512,16 colors 1:Designated with lower bits
bit 6 0:Display screen mode 1:Real screen mode
bit 5〜0:IOCS _CRTMOD での値
$ed007f 1.b 0 System reservation
$ed0080 4.w 0(0,0,0,0) Window margin(Left, up, right, down)
$ed0088 8.b 0 System reservation
(X68030)
$ed0090 1.b 0 Standard cache state(bit=0:OFF 1:ON)
bit 1 Data cache
bit 0 Instruction cache
$ed0091 1.b 0 Sound setting at startup(0:OPM performance OFF other than that:ON)
$ed0092 1.b 0 Weight value equivalent to 10 MHz(0 の場合は 10 と見なす)
$ed0093 1.b 0 16MHz 〃 (0 の場合は 4 と見なす)
$ed0094 4.b 0 System reservation
(Mach-2)
$ed0098 2.b 0($4368) Mach-2 Magic number
$ed009a 1.b 0 Transfer period upper limit of synchronous transfer
$ed009b 1.b 0 bit 3=1:Parity check
bit 2=1:Limited speed
bit 1=1:Burst transfer
bit 0=1:RAM BIOS
$ed009c 4.b 0 Unused
$ed00a0 8.b 0 Flags for each SCSI ID
bit 7=1:Allow synchronous transfer
bit 2〜0:When this value is the same as the main body ID, it does not recognize it as a drive
$ed00a8 1.l 0 Soft transfer in units of 512 KB Bits = 1
$ed00ac 1.l 0 Perform normal bus cycle in 512 KB increments (disable short bus cycle) Bit = 1
$ed00b0 80.b 0 System reservation
$ed0100 768.b 0 Start address of SRAM program
$ed0400 15KB 0 Start address of SRAMDISK
$ed3fff End of SRAM
備考 SRAM 初期化時 $ed0000〜$ed005a には ROM 中の初期値が書き込まれ、
$ed005b〜$ed00101(X68030 では 〜$ed3fff)は 0 が書き込まれる.
==============================================================================
・CGROM
address font size type count code(JIS)
$f00000 Full-width 16x16 Non-Chinese chars 752 High:$21〜$78,Low:$21〜$7e
$f05e00 〃 16x16 First level 3008 $30〜$4f
$f1d600 〃 16x16 Second level 3478 $50〜$74
$f388c0 (Unused)
$f3a000 1/4 size 8x8 ANK 256 $00〜$ff
$f3a800 Half size 8x16 〃 256 〃
$f3b800 1/4 size 12x12 〃 256 〃
$f3d000 Half size 12x24 〃 256 〃
$f40000 Full-width 24x24 Non-Chinese chars 752 High:$21〜$78,Low:$21〜$7e
$f4d380 〃 24x24 First level 3008 $30〜$4f
$f82180 〃 24x24 Second level 3478 $50〜$74
$fbf3b0 (Unused)
$xxxxxx 1/4 angle 6x12 ANK 256 $00〜$ff
The address differs according to model according to this font. Each address is as follows.
$ffd018 X68000 series
$ffd344 X68000 XVI
$ffd45e X68000 Compact XVI
$fbf400 X68030 / X68030 Compact
==============================================================================
・interrupt
level device level2 vector factor
7 NMI --- $1f INTERRUPT switch (auto vector)
6 MFP 15 $4f CRTC H-SYNC(Horizontal synchronization signal)
│ 14 $4e CRTC specified raster scan
│ 13 $4d Timer-A(Timer with V-DISP as input)
│ 12 $4c Receive key data
│ 11 $4b 〃 Reception error
│ 10 $4a 〃 Send
│ 9 $49 〃 sending error
│ 8 $48 Timer-B(USART serial clock generation)
│ 7 --- (Unused)
│ 6 $46 CRTC V-DISP(Vertical sync signal)
│ 5 $45 Timer-C(8bit general purpose timer)
│ 4 $44 Timer-D(〃)
│ 3 $43 OPM
│ 2 $42 Body front power switch OFF detection
│ 1 $41 External power OFF detection(Extended I / O slot)
└ 0 $40 RTC alarm
5 SCC --- $50-$5f RS-232C / mouse data reception
4 --- --- --- For expansion I/O slot
3 DMAC --- $64-$6b DMA transfer end / error
2 --- --- --- For expansion I/O slot
1 IOC 3 $60 FDC
│ 3 $61 FD
│ 1 $62 HD
└ 0 $63 Printer(BUSY signal)
==============================================================================
・Structure of .X file header
offset size
$00 2.b Identifier 'HU'(0x48 0x55)
$02 1.b Reserved (0)
$03 1.b Load mode (0:Normal 1:Minimum block 2:High address)
$04 1.l Base address
$08 1.l Entry point address
$0c 1.l Text section size
$10 1.l Data section size
$14 1.l Block storage section size (including .comm, .stack)
$18 1.l Relocation table size
$1c 1.l Symbol table size
$20 1.l SCD line number table size
$24 1.l SCD symbol table size
$28 1.l SCD string table size
$2c 4.l Reserved (0)
$3c 1.l Position of the bound module list from the top of the file
Size: 64 ($40) bytes
The executable file is loaded in the base address and stored in a state where the relocation processing has been performed.
Therefore, if the actual load address is equal to the base address, rearrangement does not need to be performed.
If they are not equal, add the difference.
Since the value obtained by adding the base address to the execution start address is also stored, this also adds the difference.
· Relocation processing
The relocation is performed by repeating the following procedure for the size of the relocation table.
1) Set the program start address to A and the base address to B.
2) Subtract B from A and let it be C.
3) Acquire one word from the relocation table and let it be D.
4) When D is 1, 1 longword is acquired from the relocation table and it is taken as new D.
5) When the least significant bit of D is 0 (even number), add D to A and add C to one longword from the address of A.
6) When the least significant bit of D is 1 (odd number), add D-1 to A and add C to 1 word from the address of A (word size relocation is never used normally) .
・Order of sections
1. Header ($40 bytes)
2. Text section
3. Data section
3-1. Section information ($ 40 bytes)
The virtual file * SYSTEM * is linked to the beginning of the data section
in the executable file created in SX mode, and section information is output.
3-2.".data"
3-3.".rdata" の実体
3-4.".rldata" の実体
3-5.Relative offset table (n * 4 bytes)
SX mode This is output when a pointer to a relative section is used in ".rdata" and ".rldata" in the created executable file.
4. Block Storage Section
Entities are not output.
4-1. ".bss"
4-2. ".common"
4-3. ".stack"
5. Relocation table
6. Symbol table
7. SCD table
8. If bound, repeat 1-7.
9. Bound list
A relative section is a sort of offset definition, and except for the entities ".rdata" and ".rldata",
the area is not output to the executable file, but it is defined in the following order.
1.".rdata"
2.".rbss"
3.".rcommon"
4.".rstack"
5.".rldata"
6.".rlbss"
7.".rlcommon"
8.".rlstack"
・Bound list structure
offset size
$00 8.b File name (The file name beginning with $ e5 is $ 05, the rest is filled with space.)
$08 3.b Extension (fill the space with the rest)
$0b 1.b Attribute (%XLAD_VSHR. However, specifying something other than ASHR will naturally result in an error)
$0c 10.b The remainder of the file name of 8 bytes or more (the rest is filled with $ 00)
$16 1.w Last Modified Time
%mmmS_SSSS_HHHH_HMMM(H:時 Mm:分 S:秒)
$18 1.w Last Modified Date
%mmmD_DDDD_YYYY_YYYM(Y:年 Mm:月 D:日)
$1a 1.b Special attribute change prohibition flag ┐ Used in BIND.X
$1b 1.b Special attribute (%00A0_0SHR) ┘
$1c 1.l Offset from the beginning of the bind file
Total 32 ($20) bytes
It is almost the same structure as the directory entry, so please be aware that the year, month, day, and hour byte of time are reversed like directory entries.
The rest of the file is 0 bytes and the list ends. When it is 32 bytes or more, there is still continuation, otherwise it becomes abnormal structure.
・Structure of Z file header
offset size
$00 1.w First identifier $601a
$02 1.l Text section size
$06 1.l Data section size
$0a 1.l Block storage section size (including .comm .stack)
$0e 8.b Reservation (0)
$16 1.l Execution start address
$1a 1.w Second identifier $ffff
Total 28 ($1c) bytes
==============================================================================
・Disk Map
2HD
sector
0 IPL
1〜 2 First FAT
3〜 4 Second FAT (unused)
5〜10 Root directory (6 sectors)
11〜1231 Data area
hard disk
sector
0 HD IPL menu program
4 System area for management information
5〜20 Free
21〜24 HD IPL
25〜?? First FAT
??〜?? Second FAT (unused)
??〜?? Root directory (16 sectors)
??〜?? Data area
??〜?? Out-of-control area (for alternate truck)
2HD IPL
It is a program that starts from $2000 and searches HUMAN.SYS from the fifth record (32 heads of the root directory) of the booted drive and if it is an executable file running from $6800 in X format, load it and execute it.
This IPL is written at the time of disk formatting.
In the 18th to 20th bytes, the total number of sectors (from lowest to highest) and the media type are written in 21st byte.
First FAT
FAT (File Allocation Table) manages the connection of files on the disk, and one file is used for 1024 bytes of the file.
However, in the relationship that FAT is secured first, one FAT is used even for 0 byte files.
After that, it increments one by one in increments of 1024 bytes.
The first two of the FAT areas are decided by the system, three bytes of $ feffff in the case of 2HD, 3 bytes of $ f8ffff up to 4MB due to the space reserved capacity in the case of the hard disk, 4 of $ f8ffffff 5MB or more It becomes byte.
There are 1.5 byte FAT and 2 byte FAT in FAT, 1.5 byte FAT, 5 MB to 2 byte FAT up to 4 MB.
1.5byteFAT fe ff ff ML lH hm ・・・・ Read in order of HML hml
2byteFAT f8 ff ff ff AB CD ab cd ・・・・ 〃 ABCD abcd
┌─────┬──────┬─────────────┐
│1.5byteFAT│ 2byteFAT │ Contents │
├─────┼──────┼─────────────┤
│ $000│ $0000│Unused area │
│$002〜$ff6│$0002〜$fff6│Next FAT number │
│ $ff7│ $fff7│Unusable cluster │
│$ff8〜$fff│$fff8〜$ffff│It ends with this cluster │
└─────┴──────┴─────────────┘
FAT termination usually uses $ fff, $ ffff (otherwise it does not correspond).
Directory entry
offset size
$00 8.b File name (If the first character is $e5, it is a deleted file, if it is $00 it is the end of the directory, the file name starting with $e5 is $05, the rest is filled with space.
$08 3.b Extension (fill the space with the rest)
$0b 1.b Attributes(%XLAD_VSHR)
$0c 10.b The remainder of the file name of 8 bytes or more (the rest is filled with $ 00)
$16 1.w Last Modified Time
%mmmS_SSSS_HHHH_HMMM(H:Hour Mm:Minute S:second)
$18 1.w Last change date
%mmmD_DDDD_YYYY_YYYM(Y:year Mm:month D:day)
$1a 1.w First FAT number
$1c 1.l file size
note 16〜$1c The sequence of bytes of word / longword data is little-endian.
HD IPL menu program
A program that operates from $2000 and selects which system to start when using HD on multiple systems.
If you are securing all areas with a single system, simply load and run the HD IPL at $2400.
This IPL is written at the time of disk formatting.
System area for management information
Write information when securing multiple systems on HD.
The management information is divided into 16 blocks each of 16 bytes, the drive information is written in the first block, and the system information is written in the remaining 15 blocks.
(1) First drive information block
4.b 'X68K'
1.l Maximum record number
1.l Record number at the head of the substitute track
1.l Record number of shipping zone
(2)Other 15 blocks
8.b system-name
1.l First record number
1.l Record length
If the most significant 8 bits of the first record is not 0, it becomes a currently invalid area.
Data is written in FORMAT initialization.
Other than the first 16 bytes, rewritten by FORMAT area reservation / selection / release.
(Reference) Drive information block value
capacity Maximum records Substitution record HD OFF record
10MB $09f54 $09f54 $0af50
20MB $139c8 $139c8 $15660
40MB $27930 $27930 $2acc0
※There is information of $13c98 as a substitute record of 20 MB, but I have not confirmed it.
HD IPL
Operates from $2400 and looks for HUMAN.SYS from the first 32 of the root directory of the booted drive, and if it is an executable file running from $6800 in X format, load it and execute it.
However, this file must be copied to continuous sectors.
Out-of-control area (for alternate track)
It is not used normally, it is for replacing defective tracks.
==============================================================================
・FDC Result Status
Result status 0(ST0)
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ IC │SE│EC│NR│HD│ US │
└─┴─┴─┴─┴─┴─┴─┴─┘
bit 7〜6 IC Interrupt Code(割り込み要因を示す)
%00: コマンドの正常終了 (NT: Normal Terminate)
%01: コマンドの異常終了 (AT: abnormal Terminate)
%10: 与えられたコマンドは無効(Invalid)であった
(IC: Invalid Command)
%11: デバイスに状態遷移があった
(AI: Attention Interrupt)
bit 5 SE Seek End
%0: 通常動作
%1: SEEK/RECALIBRATE コマンド実行終了
bit 4 EC Equipment Check
%0: 通常動作
%1: ドライブから Fault 信号を受けった / RECALIBRATE
コマンド実行エラー(トラック 0 が見つからない)
bit 3 NR Not Ready
%0: 通常動作
%1: 指定されたドライブはレディでない
bit 2 HD Head Address(割り込み要求時のヘッド番号)
%0: 表面
%1: 裏面
bit 1〜0 US1〜US0
Unit Select n(割り込み要求時のドライブ番号)
%00: ドライブ #0
%01: 〃 #1
%10: 〃 #2
%11: 〃 #3
Result status 1(ST1)
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│EN│ │DE│OR│ │ND│NW│MA│
└─┴─┴─┴─┴─┴─┴─┴─┘
bit 7 EN End of Cylinder
%0: 通常動作
%1: コマンド中の EOT パラメータで与えた最終セクタを越
えてリード/ライトしようとした
bit 5 DE Data Error
%0: 通常動作
%1: ディスク上の ID やデータに CRC エラーを検出した
(READ ID コマンドは除く)
bit 4 OR Over Run
%0: 通常動作
%1: データ転送時、ホストが規定時間以内に応答しなかった
bit 2 ND No Data
%0: 通常動作
%1: 指定されたセクタが見つからない
bit 1 NW Not Writable
%0: 通常動作
%1: 書き込み動作時 Write Protect 信号を受け取った
bit 0 MA Missing Address Mark
%0: 通常動作
%1: アドレスマークが見つからない
Result status 2(ST2)
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│ │CM│DD│NC│SH│SN│BC│MD│
└─┴─┴─┴─┴─┴─┴─┴─┘
bit 6 CM Control Mark
%0: READ DELETED DATA 実行時に DAM を検出した
通常動作
%1: READ DATA/READ DIAGNOSTIC/SCAN 実行時に DDAM を検
出した
bit 5 DD Data Error in Data Field
%0: 通常動作
%1: データの CRC エラーを検出した
bit 4 NC No Cylinder
%0: 通常動作
%1: ST1 の ND ビットが %1 のとき、ID の C バイトが一致
せず、かつ $ff でもない
bit 3 SH Scan Equal Hit
%0: 通常動作
%1: SCAN コマンドで Equal 条件が成立した
bit 2 SN Scan Not Satisfied
%0: 通常動作
%1: SCAN コマンドで最終セクタまで条件を満足しない
bit 1 BC Bad Cylinder
%0: 通常動作
%1: ST1 の ND ビットが %1 のとき、ID の C バイトが $ff
である(READ DIAGNOSTIC コマンドを除く)
bit 0 MD Missing Address Mark in Data Field
%0: Usual action
%1: Data address mark not found
Result status 3 (ST3)
bit 7 6 5 4 3 2 1 0
┌─┬─┬─┬─┬─┬─┬─┬─┐
│FT│WP│RY│T0│TS│HD│ US │
└─┴─┴─┴─┴─┴─┴─┴─┘
bit 7 FT Drive Fault signal status
bit 6 WP Drive write protect signal status
bit 5 RY Drive Ready signal status
bit 4 T0 State of the Track 0 signal of the drive
bit 3 TS Drive's Two Side signal status
bit 2 HD The value of HD specified in the command phase
bit 1〜0 US1〜US0
Values of US1, US0 specified in command phase
※ ST3 is returned only with the SENSE DEVICE STATUS command.
==============================================================================
・System file
Title display file
When Human68k has a file called TITLE.SYS at startup, it displays the title according to TITLE.SYS without issuing the standard title.
TITLE.SYS is a file of less than $ 10044 bytes, and there are two kinds of text title and bit image title.
The text title is prepared for the command mode and displays the character string of the title display file.The control code and the escape sequence can also be used, but the first one byte can not be 0.
The bit image title is for visual use and it displays bit image data.The first byte must be 0. If the character attribute is 0, the cursor and the function key are erased.
offset size
0 1.b 0(fixed)
1 1.b Text attribute
2 1.b Designation of a text plane to be filled (0: there is no surface to be filled)
1:plane 0 2:plane 1 4:plane 2 8:plane 3)
3 1.b Specify the text plane to display(1,2,4,8:Ibid.)
4 1.w Palette with text color 4 to 7
6 1.w 〃 8〜15 〃
8 52.b Specify shell(Right side of "SHELL="),0
60 1.w Indicates the start of the X coordinate
62 1.w 〃 Y coordinate
64 1.w Number of dots in the X direction of the bit image data
66 1.w 〃 Y〃
68 ??? Bit image data
External character file
When there is a file called USKCG.SYS at startup, Human68k reads it as an external character file into the external character area inside the OS.
USKCG.SYS is a file of $ 10000 bytes or less, its creation / modification is done with USKCGM.X.
The full-width Kanji code may be either JIS or S-JIS, but please note that JIS Kanji code is inverted low / high.
offset size
0 34.b 未使用
34 1.w 漢字コード
36 16.w フォントデータ
1.w 半角外字 S-JIS コード
16.b フォントデータ
…
1.w 16x16 から 24x24 への切り換えコード($ffff)
1.w 漢字コード
72.b フォントデータ
1.w 半角外字 S-JIS コード
48.b フォントデータ
Key definition file
Human68k は起動時に KEY.SYS というファイルがあると、ファンクションキ
ーのデータとして定義する.
KEY.SYS は 712 バイトのファイルで、KEY.X によって作成/変更する.
先頭が $fe で始まるキーは、$fe 以降 8 文字は表示用として使われ、9 文
字目からが本当のキーコードとなる. 文字列は必ず 0 で終わらなければなら
ない.
offset size
0 32.b*10 F0〜F9
320 32.b*10 Shift+F0〜F9
640 6.b ROLL UP
646 6.b ROLL DOWN
652 6.b INS
658 6.b DEL
664 6.b 上向きカーソルキー
670 6.b 左〃
676 6.b 右〃
682 6.b 下〃
688 6.b CLR
694 6.b HELP
700 6.b HOME
706 6.b UNDO
Beep sound file
Human68k は CONFIG.SYS で "BELL = BEEP.SYS" と指定すると、BEEP.SYS
を ADPCM のデータファイルとして、OS 内に読み込む.
データはサンプリング周波数 15.6KHz で $ffff バイト以内の、ADPCM から
読み込んだもの.
==============================================================================
・ASCII control code
$00 NUL blank :Null
$01 SOH Heading started TC 1:Start of Heading
$02 STX Start of text TC 2:Start of Text
$03 ETX End of text TC 3:End of Text
$04 EOT Transmission end TC 4:End of Transmission
$05 ENQ Inquiry TC 5:Enquiry
$06 ACK Acknowledgment TC 6:Acknowledge
$07 BEL Warning bell :Bell
$08 BS Retreat FE 0:Back Space
$09 HT Horizontal tab FE 1:Horizontal Tabulation
$0a LF new line FE 2:Line Feed
$0b VT 垂直タブ FE 3:Vertical Tabulation
$0c FF 書式送り FE 4:From Feed
$0d CR 復帰 FE 5:Carriage Return
$0e SO シフトアウト :Shift Out
$0f SI シフトイン :Shift In
$10 DLE 伝送制御拡張 TC 7:Data Link Escape
$11 DC1 装置制御 1 DC 1:Device Control 1
$12 DC2 装置制御 2 DC 2:〃 2
$13 DC3 装置制御 3 DC 3:〃 3
$14 DC4 装置制御 4 DC 4:〃 4
$15 NAK 否定応答 TC 8:Negative Acknowledge
$16 SYN 同期信号 TC 9:Synchronous idle
$17 ETB 伝送ブロック終結 TC10:End of Transmission Bock
$18 CAN 取り消し :Cancel
$19 EM 媒体終端 :End of Medium
$1a SUB 置換キャラクタ :Substitute Character
$1b ESC 拡張 :Escape
$1c FS(→) ファイル 分離キャラクタ IS 4:File Separator
$1d GS(←) グル-プ分離キャラクタ IS 3:Group 〃
$1e RS(↑) レコ-ド 分離キャラクタ IS 2:Record 〃
$1f US(↓) ユニット 分離キャラクタ IS 1:Unit 〃
$20 SPC 間隔 :Space
$7f DEL 削除 :Delete
TC = Transmission control character Transmission Control Characters
FE = Format control character Format Effectors
DC = Device control character Device Control Characters
IS = Information separation character Infomation Separators
・Valid ASCII control code in IOCS
$07 BEL Ring the bell
$08 BS Move one character to the left
$09 HT Move to the next tab position
(Move to the first digit on the right by one row below the maximum tab position)
$0a LF Move down one line (one line is moved up by the last line)
$0b VT Move one line upward (invalid at the first row)
$0c FF Move one character right
$0d CR Move to the left
$1a SUB Move to the left end of the first line after deleting the screen
$1b ESC Start of escape sequence
$1e RS Move to the left edge of the first line
==============================================================================
・Escape sequence
[pl;pcH 移動(pl=0 または省略時 pl=1、pl>最終行の時 pl=最終行)
(pc=0 または省略時 pc=1、pc>最終桁の時 pc=最終桁)
[pl;pcf 同上
=lc 同上(l,c は行・桁位置に $20 を加算した文字で、省略不可)
[pnA pn 行上に移動(pn=0 または省略時 pn=1)
[pnB pn 行下〃
[pnC pn 文字右〃
[pnD pn 文字左〃
[0J カーソル位置から最終行最終桁まで消去(0 は省略可能)
[1J 先頭行左端からカーソル位置まで消去
[2J 画面消去後先頭行左端に移動
* 同上
[0K カーソル位置から最終桁まで消去(0 は省略可能)
[1K 左端からカーソル位置まで消去
[2K カーソル行消去
[pnM カーソル行から下に pn 行削除(pn=0 または省略時 pn=1)
削除した行より後の行が繰り上がり、繰り上がった行の先頭行左端に
移動する
[pnL カーソル行から下に pn 行空行を挿入(pn=0 または省略時 pn=1)
カーソル行より下の行が繰り下がり、挿入された行の先頭行左端に移
動する
D 1 行下 に移動(最終行で 1 行繰り上がる)
E 1 行下の左端〃
M 1 行上に移動(先頭行で 1 行繰り下がる)
[s カーソル位置と文字表示属性を保存する
[u 保存したカーソル位置と文字表示属性に戻す
[6n 実行後コンソール入力の度にカーソル位置を ESC[pl;pcR の形で通知
[>5l カーソルを表示する
[>5h カーソルを消去する
[>1l ファンクションキー行を消去・解放し、先頭行左端に移動
[>1h 〃 表示・占有し、〃
[psm 文字表示属性を設定する
(ps は ; で区切って複数指定可能、省略時 ps=0)
ps 機能
0 初期設定に戻す
1 強調トグル(30〜33,40〜43 と 34〜37,44〜47 を交互に変更)
7 逆転トグル(30〜33,34〜37 と 40〜43,44〜47 〃 )
30〜33 黒,水色,黄色,白
34〜37 〃 強調
40〜43 〃 逆転
44〜47 〃 逆転強調