-
Notifications
You must be signed in to change notification settings - Fork 109
/
Copy paths100_jair.c
1925 lines (1684 loc) · 76.1 KB
/
s100_jair.c
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
/*** s100_jair.c: Josh's Altair / IMASI Replacement CPU & SBC
Created by Patrick Linstruth ([email protected])
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
PETER SCHORN BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Patrick Linstruth shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Patrick Linstruth.
Devices:
JAIR - ROM and SD Card
JAIRS0 - COM1
JAIRS1 - COM2
JAIRP - Printer Port
The serial and printer ports support TMXR which allow these
ports to be attached to real serial ports and sockets. If no TMXR
interfaces are attached, JAIRS0 will use the SIMH console for
both input and output, JAIRS1 and JAIRP will use the SIMH console
for output.
*/
#include "altairz80_defs.h"
#include "sim_imd.h"
#include "sim_tmxr.h"
/********/
/* SIMH */
/********/
extern uint32 sim_map_resource(uint32 baseaddr, uint32 size, uint32 resource_type,
int32 (*routine)(const int32, const int32, const int32), const char* name, uint8 unmap);
extern t_stat set_dev_enbdis(DEVICE *dptr, UNIT *uptr, int32 flag, CONST char *cptr);
extern t_stat set_cmd(int32 flag, CONST char *cptr);
extern void PutBYTEWrapper(const uint32 Addr, const uint32 Value);
extern uint32 nmiInterrupt;
/* Debug flags */
#define VERBOSE_MSG (1 << 0)
#define ERROR_MSG (1 << 1)
#define STATUS_MSG (1 << 2)
/* Debug Flags */
static DEBTAB jair_dt[] = {
{ "VERBOSE", VERBOSE_MSG, "Verbose messages" },
{ "ERROR", ERROR_MSG, "Error messages" },
{ "STATUS", STATUS_MSG, "Status messages" },
{ NULL, 0 }
};
/*****************************/
/* Local function prototypes */
/*****************************/
static t_stat jair_reset(DEVICE *dptr);
static t_stat jair_port_reset(DEVICE *dptr);
static t_stat jair_svc(UNIT *uptr);
static t_stat jair_rx_svc(UNIT *uptr);
static t_stat jair_tx_svc(UNIT *uptr);
static t_stat jair_help(FILE *st, DEVICE *dptr, UNIT *uptr, int32 flag, const char *cptr);
static t_stat jair_boot(int32 unitno, DEVICE *dptr);
static t_stat jair_attach(UNIT *uptr, CONST char *cptr);
static t_stat jair_detach(UNIT *uptr);
static t_stat jair_attach_mux(UNIT *uptr, CONST char *cptr);
static t_stat jair_detach_mux(UNIT *uptr);
static const char* jair_description(DEVICE *dptr);
static t_stat jair_config_line(DEVICE *dev, TMLN *tmln, int baud);
static const char* jairs0_description(DEVICE *dptr);
static const char* jairs1_description(DEVICE *dptr);
static const char* jairp_description(DEVICE *dptr);
static int jair_get_modem_status(UNIT *uptr);
static void jair_get_rxdata(UNIT *uptr);
static int jair_set_mc(TMLN *tmln, uint8 data);
static int jair_new_baud(UNIT *uptr);
static t_stat jair_set_baud(UNIT *uptr, int32 value, const char *cptr, void *desc);
static t_stat jair_show_baud(FILE *st, UNIT *uptr, int32 value, const void *desc);
static t_stat jair_show_ports(FILE *st, UNIT *uptr, int32 val, CONST void *desc);
static int32 jairio(int32 addr, int32 rw, int32 data);
static uint8 jair_io_in(uint32 addr);
static uint8 jair_io_out(uint32 addr, int32 data);
static t_stat jair_set_rom(UNIT *uptr, int32 value, CONST char *cptr, void *desc);
static t_stat jair_set_norom(UNIT *uptr, int32 value, CONST char *cptr, void *desc);
static int32 jair_shadow_rom(int32 Addr, int32 rw, int32 data);
/***********/
/* RAM/ROM */
/***********/
#define JAIR_ROM_BASE 0x0000
#define JAIR_ROM_SIZE 8192
#define JAIR_ROM_MASK (JAIR_ROM_SIZE-1)
#define JAIR_ROM_READ FALSE
#define JAIR_ROM_WRITE TRUE
static uint8 jair_rom_v25[JAIR_ROM_SIZE] = {
0x3e, 0x02, 0x21, 0x00, 0x00, 0x01, 0x01, 0x00,
0x09, 0xd2, 0x08, 0x00, 0x3d, 0xc2, 0x02, 0x00,
0x3e, 0x80, 0xd3, 0x23, 0xd3, 0x2b, 0x3e, 0x0c,
0xd3, 0x20, 0xd3, 0x28, 0x3e, 0x00, 0xd3, 0x21,
0xd3, 0x29, 0x3e, 0x03, 0xd3, 0x23, 0xd3, 0x2b,
0xd3, 0x24, 0xd3, 0x2c, 0xdb, 0x20, 0x21, 0x34,
0x00, 0xc3, 0xa4, 0x04, 0x0d, 0x0a, 0x41, 0x4c,
0x54, 0x41, 0x49, 0x52, 0x2f, 0x49, 0x4d, 0x53,
0x41, 0x49, 0x20, 0x38, 0x30, 0x38, 0x30, 0x20,
0x43, 0x50, 0x55, 0x20, 0x42, 0x4f, 0x41, 0x52,
0x44, 0x20, 0x42, 0x4f, 0x4f, 0x54, 0x20, 0x4c,
0x4f, 0x41, 0x44, 0x45, 0x52, 0x20, 0x2d, 0x20,
0x4a, 0x6f, 0x73, 0x68, 0x20, 0x42, 0x65, 0x6e,
0x73, 0x61, 0x64, 0x6f, 0x6e, 0x20, 0x76, 0x32,
0x2e, 0x35, 0x20, 0x53, 0x65, 0x70, 0x20, 0x33,
0x2c, 0x20, 0x32, 0x30, 0x31, 0x38, 0x0d, 0x0a,
0x3c, 0x44, 0x3e, 0x20, 0x2d, 0x53, 0x44, 0x20,
0x43, 0x61, 0x72, 0x64, 0x20, 0x44, 0x69, 0x72,
0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x0d, 0x0a,
0x3c, 0x52, 0x3e, 0x20, 0x2d, 0x52, 0x41, 0x4d,
0x20, 0x54, 0x65, 0x73, 0x74, 0x0d, 0x0a, 0x3c,
0x56, 0x3e, 0x20, 0x2d, 0x56, 0x69, 0x65, 0x77,
0x20, 0x4c, 0x6f, 0x61, 0x64, 0x0d, 0x0a, 0x3e,
0x20, 0x00, 0xaf, 0x32, 0x24, 0xfd, 0x01, 0x03,
0x00, 0x1e, 0x05, 0x21, 0x00, 0x00, 0xdb, 0x25,
0xe6, 0x01, 0xca, 0xd2, 0x00, 0xdb, 0x20, 0xc3,
0xe4, 0x00, 0xdb, 0x00, 0xe6, 0x02, 0xca, 0x03,
0x01, 0xdb, 0x01, 0xb7, 0xca, 0x03, 0x01, 0xfe,
0xff, 0xca, 0x03, 0x01, 0xd3, 0x20, 0xd3, 0x01,
0xfe, 0x1b, 0xca, 0xb6, 0x04, 0xfe, 0x20, 0xca,
0x07, 0x01, 0xe6, 0x5f, 0xfe, 0x44, 0xca, 0x1c,
0x01, 0xfe, 0x52, 0xca, 0xcc, 0x01, 0xfe, 0x56,
0xca, 0x14, 0x01, 0x09, 0xd2, 0xc6, 0x00, 0x3e,
0x2e, 0xd3, 0x20, 0xd3, 0x01, 0x1d, 0xc2, 0xc3,
0x00, 0xc3, 0xb6, 0x04, 0x3e, 0x01, 0x32, 0x24,
0xfd, 0xc3, 0xc1, 0x00, 0x31, 0x00, 0xfd, 0xcd,
0x90, 0x07, 0x0d, 0x0a, 0x49, 0x4e, 0x49, 0x54,
0x5f, 0x46, 0x41, 0x54, 0x20, 0x00, 0xcd, 0xd8,
0x09, 0xcd, 0x90, 0x07, 0x0d, 0x0a, 0x44, 0x49,
0x52, 0x45, 0x43, 0x54, 0x4f, 0x52, 0x59, 0x3a,
0x0d, 0x0a, 0x00, 0xcd, 0xe9, 0x07, 0xca, 0x87,
0x01, 0x7e, 0xfe, 0x21, 0xfa, 0x81, 0x01, 0xfe,
0x7f, 0xf2, 0x81, 0x01, 0xe5, 0x01, 0x1a, 0x00,
0x09, 0x7e, 0x23, 0xb6, 0xe1, 0xca, 0x81, 0x01,
0xcd, 0xaf, 0x0d, 0x3a, 0x35, 0xfd, 0xfe, 0x40,
0xfa, 0x71, 0x01, 0xcd, 0x90, 0x07, 0x0d, 0x0a,
0x00, 0x3a, 0x35, 0xfd, 0xe6, 0x0f, 0xca, 0x81,
0x01, 0x3e, 0x20, 0xcd, 0xc3, 0x07, 0xc3, 0x71,
0x01, 0xcd, 0xff, 0x07, 0xc3, 0x46, 0x01, 0xcd,
0x90, 0x07, 0x0d, 0x0a, 0x45, 0x4e, 0x54, 0x45,
0x52, 0x20, 0x38, 0x2e, 0x33, 0x20, 0x46, 0x49,
0x4c, 0x45, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x3e,
0x20, 0x00, 0x21, 0x6d, 0xfd, 0x06, 0x0b, 0x3e,
0x20, 0xcd, 0x51, 0x0e, 0x0e, 0x2e, 0x06, 0x08,
0xcd, 0x89, 0x0d, 0xda, 0x87, 0x01, 0xfe, 0x0d,
0xca, 0xc3, 0x01, 0x21, 0x75, 0xfd, 0x06, 0x03,
0xcd, 0x89, 0x0d, 0xcd, 0x90, 0x07, 0x0d, 0x0a,
0x00, 0xc3, 0x0d, 0x05, 0x21, 0x00, 0x00, 0x01,
0x01, 0x00, 0x09, 0xd2, 0xd2, 0x01, 0x21, 0xdc,
0x01, 0xc3, 0xa4, 0x04, 0x0d, 0x0a, 0x54, 0x65,
0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x53, 0x59,
0x53, 0x54, 0x45, 0x4d, 0x20, 0x52, 0x41, 0x4d,
0x20, 0x40, 0x46, 0x30, 0x30, 0x30, 0x2d, 0x46,
0x46, 0x46, 0x46, 0x0d, 0x0a, 0x52, 0x41, 0x4d,
0x20, 0x50, 0x41, 0x47, 0x45, 0x20, 0x4d, 0x41,
0x52, 0x43, 0x48, 0x00, 0x1e, 0xff, 0x21, 0x00,
0xf0, 0x7b, 0x2f, 0x77, 0x2c, 0xc2, 0x13, 0x02,
0x7c, 0x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c2, 0x26, 0x04, 0x2c, 0xc2, 0x8f, 0x03, 0x7c,
0x24, 0xfe, 0xff, 0xc2, 0x8e, 0x03, 0x7b, 0x17,
0x7b, 0x07, 0x5f, 0xfe, 0x01, 0xc2, 0xad, 0x03,
0x2f, 0x5f, 0xc3, 0x71, 0x03, 0xfe, 0xfe, 0xc2,
0x71, 0x03, 0x21, 0xb8, 0x03, 0xc3, 0xa4, 0x04,
0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x0d, 0x0a,
0x52, 0x41, 0x4d, 0x20, 0x53, 0x45, 0x51, 0x55,
0x45, 0x4e, 0x43, 0x45, 0x20, 0x54, 0x45, 0x53,
0x54, 0x00, 0x1e, 0x01, 0x7b, 0xe6, 0x07, 0xc2,
0xe0, 0x03, 0x3e, 0x2e, 0xd3, 0x20, 0xd3, 0x01,
0x7b, 0x2f, 0xd3, 0xff, 0x21, 0x00, 0xf0, 0x53,
0x14, 0xc2, 0xed, 0x03, 0x14, 0x72, 0x2c, 0xc2,
0xe8, 0x03, 0x7c, 0x24, 0xfe, 0xff, 0xc2, 0xe8,
0x03, 0x21, 0x00, 0xf0, 0x53, 0x14, 0xc2, 0x02,
0x04, 0x14, 0x7a, 0xbe, 0xc2, 0x26, 0x04, 0x2c,
0xc2, 0xfd, 0x03, 0x7c, 0x24, 0xfe, 0xff, 0xc2,
0xfd, 0x03, 0x1c, 0xc2, 0xd4, 0x03, 0x21, 0x1c,
0x04, 0xc3, 0xa4, 0x04, 0x50, 0x41, 0x53, 0x53,
0x45, 0x44, 0x00, 0xc3, 0xb6, 0x04, 0x54, 0x5d,
0x21, 0x2e, 0x04, 0xc3, 0xa4, 0x04, 0x0d, 0x0a,
0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x20, 0x41,
0x54, 0x3a, 0x00, 0x7a, 0x0f, 0x0f, 0x0f, 0x0f,
0xe6, 0x0f, 0xc6, 0x90, 0x27, 0xce, 0x40, 0x27,
0x05, 0xc2, 0x48, 0x04, 0xd3, 0x20, 0xd3, 0x01,
0x7a, 0xe6, 0x0f, 0xc6, 0x90, 0x27, 0xce, 0x40,
0x27, 0x05, 0xc2, 0x59, 0x04, 0xd3, 0x20, 0xd3,
0x01, 0x7b, 0x0f, 0x0f, 0x0f, 0x0f, 0xe6, 0x0f,
0xc6, 0x90, 0x27, 0xce, 0x40, 0x27, 0x05, 0xc2,
0x6e, 0x04, 0xd3, 0x20, 0xd3, 0x01, 0x7b, 0xe6,
0x0f, 0xc6, 0x90, 0x27, 0xce, 0x40, 0x27, 0x05,
0xc2, 0x7f, 0x04, 0xd3, 0x20, 0xd3, 0x01, 0x21,
0x8d, 0x04, 0xc3, 0xa4, 0x04, 0x20, 0x2d, 0x20,
0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x20, 0x48,
0x41, 0x4c, 0x54, 0x45, 0x44, 0x0d, 0x0a, 0x00,
0x76, 0xc3, 0xa0, 0x04, 0x7e, 0x23, 0xb7, 0xc2,
0xab, 0x04, 0xe9, 0x05, 0xc2, 0xab, 0x04, 0xd3,
0x20, 0xd3, 0x01, 0xc3, 0xa4, 0x04, 0x31, 0x00,
0xfd, 0xcd, 0x90, 0x07, 0x0d, 0x0a, 0x42, 0x4f,
0x4f, 0x54, 0x20, 0x42, 0x49, 0x4f, 0x53, 0x2e,
0x48, 0x45, 0x58, 0x2c, 0x20, 0x49, 0x4e, 0x49,
0x54, 0x5f, 0x46, 0x41, 0x54, 0x20, 0x00, 0xcd,
0xd8, 0x09, 0xcd, 0x90, 0x07, 0x0d, 0x0a, 0x4c,
0x4f, 0x41, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x46,
0x49, 0x4c, 0x45, 0x20, 0x00, 0x11, 0x01, 0xfd,
0xcd, 0x3d, 0x07, 0x42, 0x49, 0x4f, 0x53, 0x20,
0x20, 0x20, 0x20, 0x48, 0x45, 0x58, 0x00, 0x21,
0x00, 0xfd, 0x36, 0x00, 0x23, 0x11, 0x6d, 0xfd,
0x06, 0x0b, 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,
0xb7, 0xc2, 0xa3, 0x06, 0x3a, 0x31, 0xfd, 0xfe,
0x01, 0xca, 0xbe, 0x06, 0x21, 0xc8, 0x05, 0x22,
0x27, 0xfd, 0xc9, 0xcd, 0x90, 0x07, 0x2d, 0x49,
0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x00,
0xc3, 0x8c, 0x06, 0xcd, 0x90, 0x07, 0x0d, 0x0a,
0x21, 0x21, 0x21, 0x20, 0x43, 0x48, 0x45, 0x43,
0x4b, 0x53, 0x55, 0x4d, 0x20, 0x45, 0x52, 0x52,
0x4f, 0x52, 0x00, 0xc3, 0x87, 0x04, 0x3a, 0x34,
0xfd, 0xb7, 0xc2, 0xe7, 0x06, 0xcd, 0x90, 0x07,
0x0d, 0x0a, 0x21, 0x21, 0x21, 0x20, 0x53, 0x54,
0x41, 0x52, 0x54, 0x20, 0x41, 0x44, 0x44, 0x52,
0x45, 0x53, 0x53, 0x20, 0x4e, 0x4f, 0x54, 0x20,
0x53, 0x45, 0x54, 0x00, 0xc3, 0x87, 0x04, 0xcd,
0x90, 0x07, 0x0d, 0x0a, 0x45, 0x78, 0x65, 0x63,
0x75, 0x74, 0x65, 0x20, 0x61, 0x74, 0x3a, 0x00,
0x2a, 0x15, 0x07, 0x22, 0xfd, 0xff, 0x3a, 0x17,
0x07, 0x32, 0xff, 0xff, 0x2a, 0x32, 0xfd, 0xcd,
0x61, 0x07, 0xcd, 0x90, 0x07, 0x0d, 0x0a, 0x00,
0x3e, 0x01, 0xc3, 0xfd, 0xff, 0xd3, 0x38, 0xe9,
0xfe, 0x30, 0xfa, 0x36, 0x07, 0xfe, 0x3a, 0xfa,
0x3a, 0x07, 0xfe, 0x41, 0xfa, 0x36, 0x07, 0xfe,
0x47, 0xfa, 0x38, 0x07, 0xfe, 0x61, 0xfa, 0x36,
0x07, 0xfe, 0x67, 0xfa, 0x38, 0x07, 0x37, 0xc9,
0xd6, 0x07, 0xe6, 0x0f, 0xc9, 0xe3, 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, 0x67, 0x1c, 0x0d, 0xc2, 0x68, 0x0e, 0x7c,
0x16, 0x00, 0xc9, 0x3a, 0x38, 0xfd, 0x47, 0x05,
0xc8, 0xb7, 0x7a, 0x1f, 0x57, 0x7b, 0x1f, 0x5f,
0xc3, 0x7f, 0x0e, 0x3a, 0x3d, 0xfd, 0xa3, 0xc9
};
static uint8 jair_ram[JAIR_ROM_SIZE] = {0};
/*********************/
/* JAIR Definitions */
/*********************/
/*
** PORT ASSIGNMENTS
*/
#define JAIR_CPU_IO 0x20 /* BASE ADDRESS FOR ONBOARD CPU I/O */
#define JAIR_UART0 JAIR_CPU_IO /* UART0 OFFSET */
#define JAIR_UART1 JAIR_CPU_IO + 0x08 /* UART1 OFFSET */
#define JAIR_SPI JAIR_CPU_IO + 0x10 /* SPI OFFSET */
#define JAIR_SPI_SS JAIR_CPU_IO + 0x11 /* SPI_SS OFFSET */
#define JAIR_PPORT JAIR_CPU_IO + 0x18 /* PPORT OFFSET */
#define JAIR_SDATA 0x00 /* 8250 SERIAL DATA */
#define JAIR_IER 0x01 /* 8250 INTERRUPT ENABLE REGISTER */
#define JAIR_IIR 0x02 /* 8250 INTERRUPT IDENT REGISTER */
#define JAIR_LCR 0x03 /* 8250 LINE CONTROL REGISTER */
#define JAIR_MCR 0x04 /* 8250 MODEM CONTROL REGISTER */
#define JAIR_LSR 0x05 /* 8250 LINE STATUS REGISTER */
#define JAIR_MSR 0x06 /* 8250 MODEM STATUS REGISTER */
#define JAIR_SR 0x07 /* 8250 SCRATCH REGISTER */
/*
** BIT ASSIGNMENT MASKS
*/
#define JAIR_DR 0x01 /* SERIAL DATA READY */
#define JAIR_OE 0x02 /* SERIAL OVERRUN ERROR */
#define JAIR_THRE 0x20 /* SERIAL TRANSMITTER BUFFER EMPTY */
#define JAIR_TEMT 0x40 /* SERIAL TRANSMITTER BUFFER EMPTY */
#define JAIR_DLAB 0x80 /* DIVISOR LATCH ACCESS BIT */
#define JAIR_DCTS 0x01 /* Clear to Send (Delta) */
#define JAIR_DDSR 0x02 /* Data Set Ready (Delta) */
#define JAIR_DRNG 0x04 /* Ring Indicate (Delta) */
#define JAIR_DDCD 0x08 /* Data Carrier Detect (Delta) */
#define JAIR_CTS 0x10 /* Clear to Send */
#define JAIR_DSR 0x20 /* Data Set Ready */
#define JAIR_RNG 0x40 /* Ring Indicate */
#define JAIR_DCD 0x80 /* Data Carrier Detect */
#define JAIR_DTR 0x01 /* Data Terminal Ready */
#define JAIR_RTS 0x02 /* Request to Send */
#define JAIR_STATE_IDLE 0 /* idle */
#define JAIR_STATE_CMD 1 /* receiving command */
#define JAIR_STATE_RESP 2 /* sending response */
#define JAIR_STATE_SBLK 3 /* start block */
#define JAIR_STATE_WBLK 4 /* write block */
#define JAIR_STAT_WAIT 10000 /* Status wait interval */
#define JAIR_IO_WAIT 250 /* IO wait interval */
/*
** SD Commands
*/
#define JAIR_CMD0 0
#define JAIR_CMD8 8 /* send if condition */
#define JAIR_CMD13 13 /* send status */
#define JAIR_CMD17 17 /* read single block */
#define JAIR_CMD24 24 /* write single block */
#define JAIR_CMD55 55 /* application command */
#define JAIR_ACMD41 41 + 0x80 /* send op condition */
/****************/
/* JAIR Device */
/****************/
#define JAIR_NAME "Josh's Altair / IMASI Replacement CPU & SBC"
#define JAIR_SNAME "JAIR"
#define JAIR_UNITS 1
#define UNIT_V_JAIR_VERBOSE (UNIT_V_UF + 0) /* VERBOSE / QUIET */
#define UNIT_JAIR_VERBOSE (1 << UNIT_V_JAIR_VERBOSE)
#define UNIT_V_JAIR_WPROTECT (UNIT_V_UF + 1) /* WRTENB / WRTPROT */
#define UNIT_JAIR_WPROTECT (1 << UNIT_V_JAIR_WPROTECT)
#define UNIT_V_JAIR_ROM (UNIT_V_UF + 2) /* WRTENB / WRTPROT */
#define UNIT_JAIR_ROM (1 << UNIT_V_JAIR_ROM)
#define UNIT_V_JAIR_CONSOLE (UNIT_V_UF + 3) /* Port checks console for input */
#define UNIT_JAIR_CONSOLE (1 << UNIT_V_JAIR_CONSOLE)
/*
** JAIR Registers and Interface Controls
*/
typedef struct {
uint32 rom_base; /* Memory Base Address */
uint32 rom_size; /* Memory Address space requirement */
uint32 io_base; /* I/O Base Address */
uint32 io_size; /* I/O Address Space requirement */
t_bool sr_ena; /* Shadow ROM enable */
t_bool spi_cs; /* SPI *CS (Active Low) */
uint8 sd_istate; /* SD Card Input State */
uint8 sd_ostate; /* SD Card Output State */
uint8 sd_cmd[512+6]; /* SD Card Command */
uint16 sd_cmd_len;
uint16 sd_cmd_idx;
uint8 sd_resp[512+6]; /* SD Card Response */
uint16 sd_resp_len;
uint16 sd_resp_idx;
t_bool sd_appcmd; /* SD app command flag */
} JAIR_CTX;
static JAIR_CTX jair_ctx = {
JAIR_ROM_BASE, JAIR_ROM_SIZE, JAIR_SPI, 2
};
static UNIT jair_unit[] = {
{ UDATA (NULL, UNIT_FIX + UNIT_ATTABLE + UNIT_DISABLE + UNIT_ROABLE + UNIT_JAIR_ROM, 0) }
};
static REG jair_reg[] = {
{ NULL }
};
static MTAB jair_mod[] = {
{ MTAB_XTD|MTAB_VDV, 0, "PORT", "PORT",
NULL, jair_show_ports, NULL, "I/O port address" },
{ UNIT_JAIR_ROM, UNIT_JAIR_ROM, "ROM", "ROM", &jair_set_rom,
NULL, NULL, "Enable JAIR ROM" },
{ UNIT_JAIR_ROM, 0, "NOROM", "NOROM", &jair_set_norom,
NULL, NULL, "Disable JAIR ROM"},
{ 0 }
};
DEVICE jair_dev = {
JAIR_SNAME, /* name */
jair_unit, /* unit */
jair_reg, /* registers */
jair_mod, /* modifiers */
JAIR_UNITS, /* # units */
10, /* address radix */
31, /* address width */
1, /* addr increment */
8, /* data radix */
8, /* data width */
NULL, /* examine routine */
NULL, /* deposit routine */
&jair_reset, /* reset routine */
&jair_boot, /* boot routine */
&jair_attach, /* attach routine */
&jair_detach, /* detach routine */
&jair_ctx, /* context */
(DEV_DISABLE | DEV_DIS | DEV_DEBUG), /* flags */
ERROR_MSG, /* debug control */
jair_dt, /* debug flags */
NULL, /* mem size routine */
NULL, /* logical name */
&jair_help, /* help */
NULL, /* attach help */
NULL, /* context for help */
&jair_description /* description */
};
/****************/
/* GENERIC PORT */
/****************/
#define JAIR_IOBUF_SIZE (128)
#define JAIR_IOBUF_MASK (JAIR_IOBUF_SIZE-1)
#define JAIR_PORT_UNITS 3
#define JAIR_UNIT_STAT 0
#define JAIR_UNIT_RX 1
#define JAIR_UNIT_TX 2
typedef struct {
PNP_INFO pnp; /* Must be first */
int32 conn; /* Connected Status */
uint16 baud; /* Baud rate */
uint8 status; /* Status Byte */
uint8 rdr; /* Receive Data Ready */
uint8 rxd; /* Receive Data Buffer */
uint8 txd; /* Transmit Data Buffer */
t_bool txp; /* Transmit Data Pending */
uint8 ier; /* Interrupt Enable Register */
uint8 iir; /* Interrupt Ident Register */
uint8 lcr; /* Line Control Register */
uint8 mcr; /* Modem Control Register */
uint8 lsr; /* Line Status Register */
uint8 msr; /* Modem Status Register */
uint8 sr; /* Scratch Register */
uint8 dlls; /* Divisor Latch LS */
uint8 dlms; /* Divisor Latch MS */
TMLN *tmln; /* TMLN pointer */
TMXR *tmxr; /* TMXR pointer */
int32 iobuf[JAIR_IOBUF_SIZE];
uint32 iobufin;
uint32 iobufout;
} JAIR_PORT_CTX;
/**************************/
/* JAIRS0 Keyboard Device */
/**************************/
#define JAIRS0_NAME "JAIR Serial Port 0"
#define JAIRS0_SNAME "JAIRS0"
static TMLN jairs0_tmln[1] = { /* line descriptors */
{ 0 }
};
static TMXR jairs0_tmxr = { /* multiplexer descriptor */
1, /* number of terminal lines */
0, /* listening port (reserved) */
0, /* master socket (reserved) */
jairs0_tmln, /* line descriptor array */
NULL, /* line connection order */
NULL /* multiplexer device (derived internally) */
};
static JAIR_PORT_CTX jairs0_ctx = {
{0, 0, JAIR_UART0, 8}, 0, 9600, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
jairs0_tmln, &jairs0_tmxr
};
static REG jairs0_reg[] = {
{ DRDATAD (BAUD0, jairs0_ctx.baud, 16, "Serial port baud register"), },
{ HRDATAD (TXP0, jairs0_ctx.txp, 1, "Serial port TX data pending"), },
{ HRDATAD (TXD0, jairs0_ctx.txd, 8, "Serial port TX data register"), },
{ HRDATAD (RDR0, jairs0_ctx.rdr, 1, "Serial port RX data ready"), },
{ HRDATAD (RXD0, jairs0_ctx.rxd, 8, "Serial port RX register"), },
{ HRDATAD (BUFIN0, jairs0_ctx.iobufin, 16, "Serial port buffer in ptr"), },
{ HRDATAD (BUFOUT0, jairs0_ctx.iobufout, 16, "Serial port buffer out ptr"), },
{ HRDATAD (LSR0, jairs0_ctx.lsr, 8, "Serial port line status register"), },
{ HRDATAD (MSR0, jairs0_ctx.msr, 8, "Serial port modem status register"), },
{ NULL }
};
static UNIT jairs0_unit[JAIR_PORT_UNITS] = {
{ UDATA (&jair_svc, UNIT_ATTABLE | UNIT_JAIR_CONSOLE, 0), JAIR_STAT_WAIT },
{ UDATA (&jair_rx_svc, UNIT_DIS | UNIT_JAIR_CONSOLE, 0), JAIR_IO_WAIT },
{ UDATA (&jair_tx_svc, UNIT_DIS | UNIT_JAIR_CONSOLE, 0), JAIR_IO_WAIT }
};
static MTAB jairs0_mod[] = {
{ MTAB_XTD|MTAB_VDV, 0, "PORT", "PORT",
NULL, jair_show_ports, NULL, "Show serial I/O ports" },
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "BAUD", "BAUD",
&jair_set_baud, &jair_show_baud, NULL, "Set baud rate (default=9600)" },
{ 0 }
};
DEVICE jairs0_dev = {
JAIRS0_SNAME, /* name */
jairs0_unit, /* unit */
jairs0_reg, /* registers */
jairs0_mod, /* modifiers */
JAIR_PORT_UNITS, /* # units */
10, /* address radix */
31, /* address width */
1, /* addr increment */
8, /* data radix */
8, /* data width */
NULL, /* examine routine */
NULL, /* deposit routine */
&jair_port_reset, /* reset routine */
NULL, /* boot routine */
&jair_attach_mux, /* attach routine */
&jair_detach_mux, /* detach routine */
&jairs0_ctx, /* context */
(DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX), /* flags */
ERROR_MSG, /* debug control */
jair_dt, /* debug flags */
NULL, /* mem size routine */
NULL, /* logical name */
NULL, /* help */
NULL, /* attach help */
&jairs0_tmxr, /* context for help */
&jairs0_description /* description */
};
/************************/
/* JAIRS1 Serial Device */
/************************/
#define JAIRS1_NAME "JAIR Serial Port 1"
#define JAIRS1_SNAME "JAIRS1"
static TMLN jairs1_tmln[1] = { /* line descriptors */
{ 0 }
};
static TMXR jairs1_tmxr = { /* multiplexer descriptor */
1, /* number of terminal lines */
0, /* listening port (reserved) */
0, /* master socket (reserved) */
jairs1_tmln, /* line descriptor array */
NULL, /* line connection order */
NULL /* multiplexer device (derived internally) */
};
static JAIR_PORT_CTX jairs1_ctx = {
{0, 0, JAIR_UART1, 8}, 0, 9600, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
jairs1_tmln, &jairs1_tmxr
};
static REG jairs1_reg[] = {
{ DRDATAD (BAUD1, jairs1_ctx.baud, 16, "Serial port baud register"), },
{ HRDATAD (TXP1, jairs1_ctx.txp, 1, "Serial port TX data pending"), },
{ HRDATAD (TXD1, jairs1_ctx.txd, 8, "Serial port TX data register"), },
{ HRDATAD (RDR1, jairs1_ctx.rdr, 1, "Serial port RX data ready"), },
{ HRDATAD (RXD1, jairs1_ctx.rxd, 8, "Serial port RX register"), },
{ HRDATAD (BUFIN1, jairs1_ctx.iobufin, 16, "Serial port buffer in ptr"), },
{ HRDATAD (BUFOUT1, jairs1_ctx.iobufout, 16, "Serial port buffer out ptr"), },
{ HRDATAD (LSR1, jairs1_ctx.lsr, 8, "Serial port line status register"), },
{ HRDATAD (MSR1, jairs1_ctx.msr, 8, "Serial port modem status register"), },
{ NULL }
};
static UNIT jairs1_unit[JAIR_PORT_UNITS] = {
{ UDATA (&jair_svc, UNIT_ATTABLE, 0), JAIR_STAT_WAIT },
{ UDATA (&jair_rx_svc, UNIT_DIS, 0), JAIR_IO_WAIT },
{ UDATA (&jair_tx_svc, UNIT_DIS, 0), JAIR_IO_WAIT }
};
static MTAB jairs1_mod[] = {
{ MTAB_XTD|MTAB_VDV, 0, "PORT", "PORT",
NULL, jair_show_ports, NULL, "Show serial I/O ports" },
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "BAUD", "BAUD",
&jair_set_baud, &jair_show_baud, NULL, "Set baud rate (default=9600)" },
{ 0 }
};
DEVICE jairs1_dev = {
JAIRS1_SNAME, /* name */
jairs1_unit, /* unit */
jairs1_reg, /* registers */
jairs1_mod, /* modifiers */
JAIR_PORT_UNITS, /* # units */
10, /* address radix */
31, /* address width */
1, /* addr increment */
8, /* data radix */
8, /* data width */
NULL, /* examine routine */
NULL, /* deposit routine */
&jair_port_reset, /* reset routine */
NULL, /* boot routine */
&jair_attach_mux, /* attach routine */
&jair_detach_mux, /* detach routine */
&jairs1_ctx, /* context */
(DEV_DISABLE | DEV_DIS | DEV_DEBUG | DEV_MUX), /* flags */
ERROR_MSG, /* debug control */
jair_dt, /* debug flags */
NULL, /* mem size routine */
NULL, /* logical name */
NULL, /* help */
NULL, /* attach help */
&jairs1_tmxr, /* context for help */
&jairs1_description /* description */
};
/***********************/
/* JAIRP Parallel Port */
/***********************/
#define JAIRP_NAME "JAIR Parallel Port"
#define JAIRP_SNAME "JAIRP"
static TMLN jairp_tmln[1] = { /* line descriptors */
{ 0 }
};
static TMXR jairp_tmxr = { /* multiplexer descriptor */
1, /* number of terminal lines */
0, /* listening port (reserved) */
0, /* master socket (reserved) */
jairp_tmln, /* line descriptor array */
NULL, /* line connection order */
NULL /* multiplexer device (derived internally) */
};
static JAIR_PORT_CTX jairp_ctx = {
{0, 0, JAIR_PPORT, 1}, 0, 9600, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
jairp_tmln, &jairp_tmxr
};
static REG jairp_reg[] = {
{ DRDATAD (BAUDP, jairp_ctx.baud, 16, "Serial port baud register"), },
{ HRDATAD (TXPP, jairp_ctx.txp, 1, "Printer port tx pending"), },
{ HRDATAD (TXDP, jairp_ctx.txd, 8, "Printer port data register"), },
{ HRDATAD (RDRP, jairp_ctx.rdr, 1, "Printer port RX data ready"), },
{ HRDATAD (RXDP, jairp_ctx.rxd, 8, "Printer port RX data register"), },
{ NULL }
};
static UNIT jairp_unit[JAIR_PORT_UNITS] = {
{ UDATA (&jair_svc, UNIT_ATTABLE, 0), JAIR_STAT_WAIT },
{ UDATA (&jair_rx_svc, UNIT_DIS, 0), JAIR_IO_WAIT },
{ UDATA (&jair_tx_svc, UNIT_DIS, 0), JAIR_IO_WAIT }
};
static MTAB jairp_mod[] = {
{ MTAB_XTD|MTAB_VDV|MTAB_VALR, 0, "BAUD", "BAUD",
&jair_set_baud, &jair_show_baud, NULL, "Set baud rate (default=9600)" },
{ 0 }
};
DEVICE jairp_dev = {
JAIRP_SNAME, /* name */
jairp_unit, /* unit */
jairp_reg, /* registers */
jairp_mod, /* modifiers */
JAIR_PORT_UNITS, /* # units */
10, /* address radix */
31, /* address width */
1, /* addr increment */
8, /* data radix */
8, /* data width */
NULL, /* examine routine */
NULL, /* deposit routine */
&jair_port_reset, /* reset routine */