1
0
mirror of https://github.com/aap/pdp6.git synced 2026-01-11 23:53:31 +00:00

emu: some cmd cleanup; DT stuff; pre-loaded memory files

This commit is contained in:
aap 2019-03-05 11:39:05 +01:00
parent 6760995000
commit c2c493ecc4
10 changed files with 1165 additions and 57 deletions

View File

@ -10,6 +10,23 @@ static char *ops[MAXOPS];
/* current apr */
static Apr *apr;
static Apr*
getapr(void)
{
Device *dev;
if(apr) return apr;
for(dev = devlist; dev; dev = dev->next)
if(dev->type == apr_ident){
apr = (Apr*)dev;
goto found;
}
err("No APR defined");
found:
return apr;
}
static void
skipwhite(void)
{
@ -165,7 +182,7 @@ static void
exam(word addr, int fastmem, int format)
{
word *p;
p = getmemref(&apr->membus, addr, fastmem);
p = getmemref(&getapr()->membus, addr, fastmem);
if(p == nil){
printf("Non existent memory\n");
return;
@ -187,7 +204,7 @@ static void
dep(word addr, int fastmem, word w)
{
word *p;
p = getmemref(&apr->membus, addr, fastmem);
p = getmemref(&getapr()->membus, addr, fastmem);
if(p == nil){
printf("Non existent memory\n");
return;
@ -445,12 +462,12 @@ getexdepdev(char *dev)
s = strchr(dev, '.');
if(s == nil){
if(exdepdev == nil)
exdepdev = &apr->dev;
exdepdev = &getapr()->dev;
return exdepdev;
}
*s++ = '\0';
d = getdevice(dev);
exdepdev = d ? d : &apr->dev;
exdepdev = d ? d : &getapr()->dev;
while(*dev++ = *s++);
return exdepdev;
}
@ -500,7 +517,7 @@ c_xdep(int argc, char *argv[])
}
void updatepanel(Apr *apr);
updatepanel(apr);
updatepanel(getapr());
}
enum
@ -517,7 +534,7 @@ loadsav(FILE *fp)
word w;
while(w = readwbak(fp), w != ~0){
if(w >> 27 == 0254){
apr->pc = right(w);
getapr()->pc = right(w);
return;
}
iowd = w;
@ -572,7 +589,7 @@ end:
w = readwits(fp);
if(left(w) != 0324000)
goto format;
apr->pc = right(w);
getapr()->pc = right(w);
return;
format:
@ -616,7 +633,7 @@ c_show(int argc, char *argv[])
printf("Devices:\n");
showdevices();
printf("Memory:\n");
showmem(&apr->membus);
showmem(&getapr()->membus);
}
static void
@ -635,9 +652,9 @@ struct {
{ "mkdev", c_mkdev,
"make a device: mkdev name type [args]" },
{ "attach", c_attach,
"attach a file to a devie: attach name filename" },
"attach a file to a device: attach name filename" },
{ "detach", c_detach,
"detach a file from a devie: attach name" },
"detach a file from a device: detach name" },
{ "connectio", c_ioconnect,
"connect device to IO bus: connectio devname procname" },
{ "connectmem", c_memconnect,
@ -653,7 +670,7 @@ struct {
{ "xdeposit", c_xdep,
"deposit device" },
{ "load", c_load,
"load file into memory: load [-s] filename" },
"load file into memory: load [-sb] filename" },
{ "show", c_show,
"show configuration" },
{ "quit", c_quit,
@ -712,16 +729,10 @@ commandline(char *line)
void
cli(FILE *in)
{
Device *dev;
size_t len;
char *line;
apr = nil;
for(dev = devlist; dev; dev = dev->next)
if(dev->type == apr_ident){
apr = (Apr*)dev;
break;
}
for(;;){
line = nil;
len = 0;

View File

@ -2,6 +2,8 @@ mkdev name type
creates a device and gives it a name
attach name path
attaches a file to a device
detach name
detach a file from a device
connectio name busdevname
connects a device to the IO bus of a processor
connectmem name procnum busdevname addr
@ -10,10 +12,16 @@ connectdev dev1name dev2name [args]
connects two devices in the appropriate way if possible
examine [-sm] address(range)
examines memory (s: shadow mode, m: mnemonic)
deposit [-sm] address(range) word
deposits word into memory (s: shadow mode, m: mnemonic)
load [-s] filename
loads file into memory (see source for which format)
deposit [-s] address(range) word
deposits word into memory (s: shadow mode)
xexamine {[dev.]reg}+
examine device register(s)
xdeposit {[dev.]reg}+ value
deposit into device register(s)
load [-sb] filename
loads file into memory
-s for SAV (in backup format)
-b for SBLK (in evacuate format)
show
shows device configuration
help

View File

@ -17,28 +17,8 @@ enum
/* Transport */
#if 0
static uchar
dxread(Dx555 *dx)
{
if(dx->dt->ut_rev)
return *dx->cur ^ 010;
else
return *dx->cur;
}
static void
dxwrite(Dx555 *dx, uchar d)
{
if(dx->dt->ut_rev)
*dx->cur = d ^ 010;
else
*dx->cur = d;
}
#endif
static uchar
dxread_(Dx555 *dx)
{
if(dx->dt->ut_rev)
return *dx->cur ^ 017;
@ -47,7 +27,7 @@ dxread_(Dx555 *dx)
}
static void
dxwrite_(Dx555 *dx, uchar d)
dxwrite(Dx555 *dx, uchar d)
{
if(dx->dt->ut_rev)
*dx->cur = d ^ 017;
@ -285,7 +265,7 @@ char state = 'n';
static void
dt_tp0(Dt551 *dt)
{
dt->sense = dxread_(dt->seldx);
dt->sense = dxread(dt->seldx);
// 3-7
if(UT_WRITE && dt->rw_state == RW_ACTIVE)
@ -307,7 +287,7 @@ dt_tp0(Dt551 *dt)
if(UT_WRITE_PREVENT)
dt->ut_illegal_op = 1; // 3-16
if(UT_WREN_DATA){
dxwrite_(dt->seldx, dt->wb);
dxwrite(dt->seldx, dt->wb);
debug("writing %02o\n", dt->wb);
}
}

View File

@ -13,7 +13,7 @@ mkdev cmem2 cmem161C mem_2
mkdev cmem3 cmem161C mem_3
#mkdev netmem netmem its.pdp10.se 10006
#mkdev netmem netmem localhost 10006
mkdev netmem netmem maya 10006
#mkdev netmem netmem maya.papnet.eu 10006
connectdev dc dt0
connectdev dt0 dx0 1
@ -35,3 +35,5 @@ attach ptr ../code/test.rim
attach ptp ../code/ptp.out
#attach dx0 ../test/out.dt6
attach dx0 ../test/test.dt6
#load -b ../maint/pdp6.part1

282
emu/mem_0
View File

@ -1,15 +1,18 @@
255000000000
205000255000
700200635550
700600011577
721200223110
720200004010
721200220300
200740000012
720340001000
254000000003
720000000017
254000000010
254000000003
720200000000
254200000300
777600000277
000020:
254000000006
720040000013
345540000006
602540777777
700600014300
254000000006
000017:
254000037726
710600000060
710740000010
254000000021
@ -18,5 +21,260 @@
254000000024
000027:
254000000021
000200:
000000000567
000100:
123456712345
037251:
400000000000
465757000000
400000000000
424162000000
757367573674
553270000000
037265:
000000173674
660000000000
037331:
000000000001
000000000001
037376:
777777777777
000000000060
402000037777
700200635550
265300037471
201200037746
403100037176
250104000001
253100037406
201202777777
326200037404
403600000000
211500000001
205040400000
250140000001
205040400000
205240020600
306600000046
254000037735
721200000000
134100037777
326100037430
712340000040
254000037424
712040000002
265300037473
465100000177
342100037400
340100000007
345100037516
271100000135
321100037521
322100037414
603240770000
136100000005
254000037422
303600000055
267600037462
721200000000
321600037451
542200037447
322600037402
254000037402
563000033777
254000034000
201200037176
402000000040
200140037750
306600000064
200220033777
606600000003
251144777777
265640037601
265300037624
316340000004
254000037462
322140037402
322500037751
334300037663
334100037527
334100037432
336000037777
712140000002
712300000020
254000037475
325106000000
201100000012
254000037473
616105000001
344240037502
265300037471
306005740524
254000037402
201705740604
242700777777
135100037752
200056037254
137040037753
265300037745
267100037742
607040004040
135600000005
326600037706
342100037437
200540037754
205400777750
340400037574
336010037176
332010037177
604000000015
542400037536
316150037176
312050037177
253400037524
321400037541
323500037470
201400000051
332010037177
254000037470
336000000012
403040000003
202150037176
202050037177
201410000001
242400777777
323500037552
412510037254
436510037303
403440000005
602500000004
254000037453
200100037755
201340037747
336002000000
253100037557
202100000004
336002000000
332002000001
253100037562
274200000002
271202000000
202207000000
200340000002
321100037557
200340037756
201200037747
265300037624
255000000007
200204000000
325200037621
334640037524
316200037756
661440400000
265300037624
200340000004
325440037601
325200037442
325600037614
564300000004
270300000004
273320033777
540200000006
241340000001
265300037624
270344000000
253200037614
254015000000
321500037402
265300037624
624500037447
367240037647
354000000011
137040000013
134100000013
306100000037
254000037466
661112777777
302402000000
326100037625
137400000013
322500037626
200140037377
721700000040
254000037640
721340200000
660140002000
477000000002
721203220200
720200004010
721700000006
254000037470
720340001000
254000037647
325112037703
560140037377
720040000001
275051000000
325000037663
322040037667
321040037644
664140002000
340040037400
341040037643
660140010000
344000037645
331000000012
660140000400
721203220300
331000000012
720200003410
201240000200
344100037647
720040000016
312726000000
254000037470
254000037705
720066000000
254000037705
720166000000
254006000000
201100000044
265300037473
302600000053
306600000044
343500037711
306600000047
254020037447
306600000051
211500000005
303600000031
254000037413
242040000003
246000000003
326040037721
303000000007
267200037442
242000000003
202000037377
201440000100
265300037637
340102037177
367240037647
254000037402
541240037176
205100770000
616240037414
254000037502
607240770000
265300037745
201300037736
134100000005
201102000040
254000037473
037750:
000040000041
344500037730
000116037303
010100000002
000500037254
740623000020
254000000001

24
emu/mem_0_rim Normal file
View File

@ -0,0 +1,24 @@
255000000000
205000255000
700200635550
700600011577
721200223110
720200004010
720340001000
254000000006
720040000013
345540000006
602540777777
000000000013
254000000006
0
0
0
710600000060
710740000010
254000000021
710440000026
710740000010
254000000024
0
254000000021

445
emu/mem_0_sysgen_macdmp Normal file
View File

@ -0,0 +1,445 @@
720200004010
721200220300
200740000012
720340001000
254000000003
720000000017
254000000010
254000000003
720200000000
254200000300
777600000277
000020:
710600000060
710740000010
254000000021
710440000026
710740000010
254000000024
000027:
254000000021
000100:
700200635550
721200203410
721700002000
254000000102
721700000004
254000000101
721200221410
720200003410
201140005214
200040000360
265240000334
367140000112
201200001102
200040000361
265240000334
200040000362
265240000334
505040007000
265240000334
541040777000
265240000334
201140000175
505040777000
265240000334
367140000127
541040777077
265240000334
505040777077
265240000334
541040707007
265240000334
200040000363
265240000334
367200000115
200040000364
201140005214
265240000334
367140000144
721200202510
721700002000
254000000147
721700000004
254000000146
721200233510
720200003410
201140001101
201200000001
201040000000
306200000001
200040000003
306200000002
254000000322
306200000203
254000000330
306200000003
201040000077
306200000204
254000000345
265240000334
367200000157
201200000204
365140000157
721700000040
254000000176
721200223210
720200004010
720340001000
254000000202
720040000001
302040000075
254000000245
721200220710
720200003410
205140777600
200043000253
265240000334
253140000212
205140777400
200043037400
265240000334
253140000216
205140777722
265200000247
200040000365
265240000334
205140777771
265200000247
201040173674
265240000334
205040660000
265240000334
205140777671
265200000247
211040000001
265240000334
721700000040
254000000237
721200003000
721700002000
254000000242
254000000101
721200220210
254000000201
201040000000
265240000334
253140000250
254004000000
414740000041
426740037175
505740254377
541740037176
426740000041
505740200737
541740037175
426740037176
505740202737
541740000041
426740037177
505740205737
541740777377
426740037200
505740721177
541740220307
426740037201
505740720337
541740000777
426740037202
505740253777
541740037202
426740037203
505740720056
541740037377
426740037204
505740253737
541740037202
426740037205
505740200777
541740000000
426740037206
505740211477
541740000000
426740037207
505740253777
541740037725
426740037210
700600014277
200040000366
306140000075
525040577777
305140000075
541040220107
254000000172
200040000367
305140000073
541040223107
254000000172
721700000006
254000000342
720340001000
254000000334
720140000001
254005000000
712140000356
721200001000
254200000100
200100000003
241100777775
245040000003
241100777772
245040000003
241100777772
245040000003
241100777772
245040000033
451040000007
254000000172
707707707707
070707070770
077070007000
700707070707
070070070070
757367573674
721200233107
721200230107
037400:
402000037777
700200635550
265300037471
201200037746
403100037176
250104000001
253100037406
201202777777
326200037404
403600000000
211500000001
205040400000
250140000001
205040400000
205240020600
306600000046
254000037735
721200000000
134100037777
326100037430
712340000040
254000037424
712040000002
265300037473
465100000177
342100037400
340100000007
345100037516
271100000135
321100037521
322100037414
603240770000
136100000005
254000037422
303600000055
267600037462
721200000000
321600037451
542200037447
322600037402
254000037402
563000033777
254000034000
201200037176
402000000040
200140037750
306600000064
200220033777
606600000003
251144777777
265640037601
265300037624
316340000004
254000037462
322140037402
322500037751
334300037663
334100037527
334100037432
336000037777
712140000002
712300000020
254000037475
325106000000
201100000012
254000037473
616105000001
344240037502
265300037471
306005740524
254000037402
201705740604
242700777777
135100037752
200056037254
137040037753
265300037745
267100037742
607040004040
135600000005
326600037706
342100037437
200540037754
205400777750
340400037574
336010037176
332010037177
604000000015
542400037536
316150037176
312050037177
253400037524
321400037541
323500037470
201400037536
332010037177
254000037470
336000000012
403040000003
202150037176
202050037177
201410000001
242400777777
323500037552
412510037254
436510037303
403440000005
602500000004
254000037453
200100037755
201340037747
336002000000
253100037557
202100000004
336002000000
332002000001
253100037562
274200000002
271202000000
202207000000
200340000002
321100037557
200340037756
201200037747
265300037624
255000000007
200204000000
325200037621
334640037524
316200037756
661440400000
265300037624
200340000004
325440037601
325200037442
325600037614
564300000004
270300000004
273320033777
540200000006
241340000001
265300037624
270344000000
253200037614
254015000000
321500037402
265300037624
624500037447
367240037647
354000000011
137040000013
134100000013
306100000037
254000037466
661112777777
302402000000
326100037625
137400000013
322500037626
200140037377
721700000040
254000037640
721340200000
660140002000
477000000002
721203220200
720200004010
721700000006
254000037470
720340001000
254000037647
325112037703
560140037377
720040000001
275051000000
325000037663
322040037667
321040037644
664140002000
340040037400
341040037643
660140010000
344000037645
331000000012
660140000400
721203220300
331000000012
720200003410
201240000200
344100037647
720040000016
312726000000
254000037470
254000037705
720066000000
254000037705
720166000000
254006000000
201100000044
265300037473
302600000053
306600000044
343500037711
306600000047
254020037447
306600000051
211500000005
303600000031
254000037413
242040000003
246000000003
326040037721
303000000007
267200037442
242000000003
202000037377
201440000100
265300037637
340102037177
367240037647
254000037402
541240037176
205100770000
616240037414
254000037502
607240770000
265300037745
201300037736
134100000005
201102000040
254000037473
037750:
000040000041
344500037730
000116037303
010100000002
000500037254
740623000020
254000000001

138
test/dtconv.c Normal file
View File

@ -0,0 +1,138 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "../tools/pdp6common.h"
#define nil NULL
typedef unsigned char uchar;
typedef uint64_t word;
enum
{
TapeEndF = 022,
TapeEndR = 055,
BlockSpace = 025,
BlockEndF = 026,
BlockEndR = 045,
DataSync = 032, /* rev guard */
BlockSync = 051, /* guard */
DataEndF = 073, /* pre-final, final, ck, rev lock */
DataEndR = 010, /* lock, rev ck, rev final, rev pre-final */
Data = 070,
DTSIZE = 922512
};
FILE*
mustopen(const char *name, const char *mode)
{
FILE *f;
if(f = fopen(name, mode), f == nil){
fprintf(stderr, "couldn't open file: %s\n", name);
exit(1);
}
return f;
}
void
writef(uchar **p, int mark, int *ck, int data)
{
int i;
uchar d;
if(ck){
*ck ^= ~data & 077;
*ck ^= ~data>>6 & 077;
*ck ^= ~data>>12 & 077;
}
for(i = 0; i < 6; i++){
if(mark)
d = !!(mark & 040) << 3;
else
d = !!(**p & 010) << 3;
if(data & 01000000)
d |= **p & 07;
else{
d |= (data & 0700000) >> 15;
data = (data << 3) & 0777777;
}
mark <<= 1;
**p = d;
(*p)++;
}
}
word datbuf[0200*01102];
void
prerecord(uchar *dtp)
{
word i, n;
int j;
int ck;
word *datp;
writef(&dtp, TapeEndR, nil, 0);
writef(&dtp, TapeEndR, nil, 0);
datp = datbuf;
for(i = 0; i < 01102; i++){
n = 0;
for(j = 0; j < 12; j++)
n |= ((i>>j*3) & 07) << (11-j)*3;
n ^= 0777777777777;
writef(&dtp, BlockSpace, nil, (i >> 18) & 0777777); // block mark
writef(&dtp, BlockEndF, nil, i & 0777777); // block mark
writef(&dtp, DataSync, nil, 0);
writef(&dtp, DataEndR, nil, 0);
ck = 0;
writef(&dtp, DataEndR, &ck, 0007777); // rev check
/* the data */
writef(&dtp, DataEndR, &ck, left(*datp));
writef(&dtp, DataEndR, &ck, right(*datp));
datp++;
for(j = 1; j < 127; j++){
writef(&dtp, Data, &ck, left(*datp));
writef(&dtp, Data, &ck, right(*datp));
datp++;
}
writef(&dtp, DataEndF, &ck, left(*datp));
writef(&dtp, DataEndF, &ck, right(*datp));
datp++;
writef(&dtp, DataEndF, nil, (ck & 077) << 12 | 07777); // check
writef(&dtp, DataEndF, nil, 0);
writef(&dtp, BlockSync, nil, 0);
writef(&dtp, BlockEndR, nil, (n >> 18) & 0777777); // rev block mark
writef(&dtp, BlockSpace, nil, n & 0777777); // rev block mark
}
writef(&dtp, TapeEndF, nil, 0);
writef(&dtp, TapeEndF, nil, 0);
}
int
main()
{
FILE *dtf;
uchar dtbuf[DTSIZE];
int i, j;;
word *datp;
datp = datbuf;
for(i = 0; i < 01102; i++)
for(j = 0; j < 0200; j++)
*datp++ = fw(i, j);
prerecord(dtbuf);
dtf = mustopen("out.dt6", "w");
fwrite(dtbuf, 1, DTSIZE, dtf);
fclose(dtf);
return 0;
}

242
test/dtread.c Normal file
View File

@ -0,0 +1,242 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#define nil NULL
typedef unsigned char uchar;
typedef uint64_t word;
enum
{
TapeEndF = 022,
TapeEndR = 055,
BlockSpace = 025,
BlockEndF = 026,
BlockEndR = 045,
DataSync = 032, /* rev guard */
BlockSync = 051, /* guard */
DataEndF = 073, /* pre-final, final, ck, rev lock */
DataEndR = 010, /* lock, rev ck, rev final, rev pre-final */
Data = 070,
// DTSIZE = 922512
// 01102 blocks, 2700 word for start/end each + safe zone
DTSIZE = 987288 + 1000
};
FILE*
mustopen(const char *name, const char *mode)
{
FILE *f;
if(f = fopen(name, mode), f == nil){
fprintf(stderr, "couldn't open file: %s\n", name);
exit(1);
}
return f;
}
void
readf(uchar **dtp, uchar *mark, word *wrd)
{
int i;
uchar l;
uchar m;
word w;
m = 0;
w = 0;
for(i = 0; i < 6; i++){
l = *(*dtp)++;
m = (m << 1) | !!(l&010);
w = (w << 3) | l&7;
}
*mark = m;
*wrd = w;
}
char*
tostr(int m)
{
return m == TapeEndF ? "End Zone Fwd" :
m == TapeEndR ? "End Zone Rev" :
m == BlockSpace ? "Block Space" :
m == BlockEndF ? "Block End Fwd" :
m == BlockEndR ? "Block End Rev" :
m == DataSync ? "Data Sync" :
m == BlockSync ? "Block Sync" :
m == DataEndF ? "Data End Fwd" :
m == DataEndR ? "Data End Rev" :
m == Data ? "Data" :
"Unknown";
}
void
rawdump(uchar *dtp)
{
uchar mark;
word w;
uchar *end;
end = dtp + DTSIZE;
while(dtp < end){
readf(&dtp, &mark, &w);
printf("%02o[%-13s] %06o\n", mark, tostr(mark), w);
}
}
#define CHKWORD(exp) \
readf(&dtp, &mark, &w); \
if(mark != exp){ \
fprintf(stderr, "expected %s(%02o) got %s(%02o)\n", \
tostr(exp), exp, tostr(mark), mark); \
return 0; \
} \
int
validate(uchar *dtp)
{
uchar mark;
word w;
int i, j;
CHKWORD(TapeEndR);
CHKWORD(TapeEndR);
for(i = 0; i < 01102; i++){
CHKWORD(BlockSpace);
CHKWORD(BlockEndF);
CHKWORD(DataSync);
CHKWORD(DataEndR);
CHKWORD(DataEndR);
CHKWORD(DataEndR);
CHKWORD(DataEndR);
for(j = 1; j < 127; j++){
CHKWORD(Data);
CHKWORD(Data);
}
CHKWORD(DataEndF);
CHKWORD(DataEndF);
CHKWORD(DataEndF);
CHKWORD(DataEndF);
CHKWORD(BlockSync);
CHKWORD(BlockEndR);
CHKWORD(BlockSpace);
}
CHKWORD(TapeEndF);
CHKWORD(TapeEndF);
return 1;
}
void
dumpf(uchar *dtp)
{
uchar mark;
word w, w2;
int i, j;
readf(&dtp, &mark, &w);
readf(&dtp, &mark, &w);
for(i = 0; i < 01102; i++){
readf(&dtp, &mark, &w);
readf(&dtp, &mark, &w2);
w = w << 18 | w2;
printf("Block %012lo\n", w);
// data unused
readf(&dtp, &mark, &w);
readf(&dtp, &mark, &w2);
w = w << 18 | w2;
printf("InterBlock1 %012lo\n", w);
readf(&dtp, &mark, &w);
printf(" Rev Check: %06lo\n", w);
for(j = 0; j < 128; j++){
readf(&dtp, &mark, &w);
readf(&dtp, &mark, &w2);
printf(" %o/%o %012lo\n", i, j, w << 18 | w2);
}
readf(&dtp, &mark, &w);
printf(" Check: %06lo\n", w);
// data unused
readf(&dtp, &mark, &w);
readf(&dtp, &mark, &w2);
w = w << 18 | w2;
printf("InterBlock1 %012lo\n", w);
// reverse block mark
readf(&dtp, &mark, &w);
readf(&dtp, &mark, &w2);
w = w << 18 | w2;
printf("RevBlock %012lo\n", w);
}
readf(&dtp, &mark, &w);
readf(&dtp, &mark, &w);
}
void
markdump(uchar *buf)
{
word w;
uchar m;
int i;
i = 1000;
while(i--){
readf(&buf, &m, &w);
printf("%02o\n", m);
}
}
uchar*
findstart(uchar *buf)
{
uchar *t;
int i;
word w;
uchar m;
for(i = 0; i < 1000; i++){
t = buf;
readf(&t, &m, &w);
if(m == TapeEndR)
goto found;
buf++;
}
return nil;
found:
while(readf(&buf, &m, &w), m == TapeEndR);
return buf-18;
}
int
main(int argc, char *argv[])
{
char *filename = "out.dt6";
FILE *dtf;
uchar dtbuf[DTSIZE], *dtp;
if(argc > 1)
filename = argv[1];
dtf = mustopen(filename, "r");
fread(dtbuf, 1, DTSIZE, dtf);
fclose(dtf);
dtp = findstart(dtbuf);
if(dtp == nil){
printf("no start\n");
return 1;
}
// markdump(dtp);
if(!validate(dtp))
return 1;
dumpf(dtp);
// rawdump(dtp);
return 0;
}

BIN
test/system.dt6 Normal file

Binary file not shown.