-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfont.txt
740 lines (714 loc) · 13.2 KB
/
font.txt
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
//----- Variables -----------------------------------------------------------------------------------------------------
!A = 0
!apu_cycle = 0
!break = 0
!C = 0
!ctrl_strobe = 0
!D = 0
!I = 0
!idle_skip = 0
!immediate = 0
!N = 0
!NMI_occured = 0
!op = 0
!P = 0
!PC = 0
!penalty = 0
!port1_count = 0
!port2_count = 0
!ppu_cycle = 0
!SP = 0
!sprite_dma = 0
!V = 0
!X = 0
!Y = 0
!Z = 0
#dmc_address = 0
#dmc_enabled = 0
#dmc_length = 0
#dmc_rate = 0
#frame_interrupt = 0
#frame_mode = 0
#irq_inhibit = 0
#noise_constant = 0
#noise_counter_halt = 0
#noise_decay = 0
#noise_divider = 0
#noise_enabled = 0
#noise_lengthcounter = 0
#noise_mode = 0
#noise_period = 0
#noise_start = 0
#noise_volume = 0
#sequence = 0
#sq0_constant = 0
#sq0_counter_halt = 0
#sq0_decay = 0
#sq0_divider = 0
#sq0_duty = 0
#sq0_enabled = 0
#sq0_lengthcounter = 0
#sq0_period = 0
#sq0_start = 0
#sq0_swcounter = 0
#sq0_swenable = 0
#sq0_swnegate = 0
#sq0_swperiod = 0
#sq0_swreload = 0
#sq0_swshift = 0
#sq0_swtarget = 0
#sq0_volume = 0
#sq1_constant = 0
#sq1_counter_halt = 0
#sq1_decay = 0
#sq1_divider = 0
#sq1_duty = 0
#sq1_enabled = 0
#sq1_lengthcounter = 0
#sq1_period = 0
#sq1_start = 0
#sq1_swcounter = 0
#sq1_swenable = 0
#sq1_swnegate = 0
#sq1_swperiod = 0
#sq1_swreload = 0
#sq1_swshift = 0
#sq1_swtarget = 0
#sq1_volume = 0
#tri_control = 0
#tri_enabled = 0
#tri_lengthcounter = 0
#tri_linearcounter = 0
#tri_period = 0
#tri_reload = 0
#tri_reloadflag = 0
$5b_command = 0
$chr_bank0 = 0
$chr_bank1 = 0
$chr_bank2 = 0
$chr_bank3 = 0
$chr_bank4 = 0
$chr_bank5 = 0
$chr_bank6 = 0
$chr_bank7 = 0
$chr_bank_mode = 0
$irq_counter = 0
$irq_enabled = 0
$irq_latch = 0
$irq_mode = 0
$irq_occured = 0
$irq_reload = 0
$jy_swaplastbank = 0
$prg_bank0 = 0
$prg_bank1 = 0
$prg_bank2 = 0
$prg_bank3 = 0
$prg_banks = 0
$prg_bank_mode = 0
$reg0 = 0
$reg1 = 0
*OAMDMA# = 0
*OAMDMAS = 0
,c = 0
,joypad = 0
-keyRandom = 0
-LCDC = 0
-LCDS = 0
-LY = 0
-LYC = 0
-LYmask = 0
-scx = 0
-SCXMOD8 = 0
-STATUS = 0
-windowWasDrawn? = 0
-WLY = 0
-wx = 0
.DIV2 = 0
.DIVCYCLES = 0
.DMAenable = 0
.DMAend = 0
.DMAlength = 0
.DMAstart = 0
.DMAtype = 0
.GBC? = 0
.HDMAenable = 0
.IME = 0
.instr = 0
.instrID = 0
.Mpri = 0
.soundEnable = 0
.SPEED = 0
.Spri = 0
.spriteattributes = 0
.spriteCpal = 0
.spritesize = 0
.t = 0
.TAC1 = 0
.TAC2 = 0
.TACFLAG = 0
.tileB = 0
.timenable = 0
.vbank = 0
.windowflag = 0
@bg_pattern = 0
@bit = 0
@counter = 0
@data_latch = 0
@fine_x = 0
@frameskip = 0
@hflip = 0
@lastframe = 0
@mask_bg = 0
@mask_sprite = 0
@nametable_index = 0
@nmi_enabled = 0
@nmi_flag = 0
@nt_data = 0
@oam_addr = 0
@PAL = 0
@palette = 0
@pattern_addr = 0
@PIX = 0
@read_buffer = 0
@render_bg = 0
@render_sprite = 0
@result = 0
@scanline = 0
@sprite0_bit = 0
@sprite_attribute = 0
@sprite_hit = 0
@sprite_overflow = 0
@sprite_pattern = 0
@sprite_priority = 0
@sprite_size = 0
@sprite_x = 0
@sprite_y = 0
@temp_addr = 0
@tile_index = 0
@vram_addr = 0
@vram_incr = 0
@write_toggle = 0
cpu_cycle = 0
delta = 0
FPS = 0
g = 0
h = 0
i = 0
i = 0
j = 0
k = 1
l = 68
lines = 0
lock = 0
loop = 0
m = 16
nes: address = 0
nes: data = 0
nes: IRQ = 0
nes: NMI = 0
render = 0
s = 0
sound = 0
T1 = 0
T2 = 0
T3 = 0
T4 = 0
T4.1 = 0
T4.2 = 0
T5 = 0
T6 = 0
T7 = 0
T8 = 0
T9 = 0
T10 = 0
T11 = 0
temp = 0
time1 = 0
time2 = 0
v = 0.01562874795644
x = -166
y = 120
z = 0.01
_A = 0
_B = 0
_current bank = 0
_frames = 0
_frameskip = 0
_IEindex = 0
_IFindex = 0
_INTRdest = 0
_lineCyc = 0
_MBCnumber = 0
_PIXEL# = 0
_R = 0
_RE = 0
_rom size = 0
_S = 0
_SIZE = 0
_STATcond1 = 0
_STATcond2 = 0
_STATindex = 0
_T = 0
_X = 0
_XSHIFT = 0
_YSHIFT = 0
_Z = 0
//----- Lists ---------------------------------------------------------------------------------------------------------
!hex = { }
!modes = { }
!prg_banks = { }
!ram = { }
!trace = { }
!wram = { }
#length_table = { }
#noise_period = { }
$A = { }
$B = { }
$C = { }
*OAMidx = { }
*OAMx = { }
*OAMy = { }
*palette = { }
.addr2ptr = { }
.pointerStart = { }
.ptr = { }
.ptr index = { }
.vals = { }
2^x = { }
@attribute0 = { }
@attribute1 = { }
@attribute2 = { }
@attribute3 = { }
@bg_palette = { }
@chr_banks = { }
@ciram0 = { }
@ciram1 = { }
@ciram2 = { }
@ciram3 = { }
@convert = { }
@oam_mem = { }
@palette = { }
@spr_palette = { }
@temp_oam = { }
byteStack = { }
dat = {
0000000000000000
0000183C3C180000
2030383C38302000
040C1C3C1C0C0400
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
3078783030003000
6C6C6C0000000000
6C6CFE6CFE6C6C00
307CC0780CF83000
00C6CC183066C600
38683876DCC87600
6060C00000000000
1830606060301800
6030181818306000
00663CFF3C660000
003030FC30300000
0000000000303060
000000FC00000000
0000000000303000
060C183060C08000
78CCDCFCECCC7800
307030303030FC00
78CC0C3860CCFC00
78CC0C380CCC7800
18385898FC183C00
FCC0F80C0CCC7800
3860C0F8CCCC7800
FCCC0C1830303000
78CCCC78CCCC7800
78CCCC7C0C187000
0030300000303000
0030300000303060
183060C060301800
0000FC0000FC0000
6030180C18306000
78CC0C1830003000
7CC6DEDEDEC07800
78CCCCFCCCCCCC00
FC66667C6666FC00
3C66C0C0C0663C00
F86C6666666CF800
FE6268786862FE00
FE6268786860F000
3C66C0CEC6663E00
CCCCCCFCCCCCCC00
7830303030307800
1E0C0C0CCCCC7800
E6666C786C66E600
F06060606266FE00
C6EEFEFED6C6C600
C6E6F6DECEC6C600
386CC6C6C66C3800
FC66667C6060F000
78CCCCCCDC781C00
FC66667C6C66E600
78CC603018CC7800
FCB4303030307800
CCCCCCCCCCCCFC00
CCCCCCCCCC783000
C6C6C6D6FEEEC600
C66C3810386CC600
CCCCCC7830307800
FE8E9C3872E2FE00
7860606060607800
C06030180C060200
7818181818187800
10386CC600000000
00000000000000FF
3030180000000000
0000780C7CCC7600
E060607C6262DC00
000078CCC0CC7800
1C0C0C7CCCCC7600
000078CCFCC07800
386C60F06060F000
000076CCCC7C0CF8
E06068766666E600
3000703030307800
0C000C0C0CCCCC78
E060666C786CE600
7030303030307800
0000CCFEFED6C600
0000F8CCCCCCCC00
000078CCCCCC7800
0000DC66667C60F0
000076CCCC7C0C1E
0000DC766660F000
000078C0780CF800
10307C3030341800
0000CCCCCCCC7600
0000CCCCCC783000
0000C6D6FEFE6C00
0000C66C386CC600
0000CCCCCC7C0CF8
0000FC983064FC00
1C3030E030301C00
1818180018181800
E03030183030E000
76DC000000000000
0010386CC6C6FE00
78CCC0CC78180C78
00CC00CCCCCC7E00
1C0078CCFCC07800
7EC33C063E663F00
CC00780C7CCC7E00
E000780C7CCC7E00
3030780C7CCC7E00
000078C0C0780C38
7EC33C667E603C00
CC0078CCFCC07800
E00078CCFCC07800
CC00703030307800
7CC6381818183C00
E000703030307800
C6386CC6FEC6C600
30300078CCFCCC00
1C00FC607860FC00
00007F0C7FCC7F00
3E6CCCFECCCCCE00
78CC0078CCCC7800
00CC0078CCCC7800
00E00078CCCC7800
78CC00CCCCCC7E00
00E000CCCCCC7E00
00CC00CCCC7C0CF8
C3183C66663C1800
CC00CCCCCCCC7800
18187EC0C07E1818
386C64F060E6FE00
CCCC78FC30FC3030
F8CCCCFAC6CFC6C7
0E1B183C1818D870
1800780C7CCC7E00
3800703030307800
001C0078CCCC7800
001C00CCCCCC7A00
00F800F8CCCCCC00
FC00CCECFCDCCC00
3C6C6C3E007E0000
386C6C38007C0000
30003060C0CC7800
000000FCC0C00000
000000FC0C0C0000
C3C6CCDE3362CC0F
C3C6CCDB376FCF03
1818001818181800
003366CC66330000
00CC663366CC0000
2288228822882288
55AA55AA55AA55AA
DD77DD77DD77DD77
1818181818181818
18181818F8181818
1818F818F8181818
36363636F6363636
00000000FE363636
0000F818F8181818
3636F606F6363636
3636363636363636
0000FE06F6363636
3636F606FE000000
36363636FE000000
1818F818F8000000
00000000F8181818
181818181F000000
18181818FF000000
00000000FF181818
181818181F181818
00000000FF000000
18181818FF181818
18181F181F181818
3636363637363636
363637303F000000
00003F3037363636
3636F700FF000000
0000FF00F7363636
3636373037363636
0000FF00FF000000
3636F700F7363636
1818FF00FF000000
36363636FF000000
0000FF00FF181818
00000000FF363636
363636363F000000
18181F181F000000
00001F181F181818
000000003F363636
36363636FF363636
1818FF18FF181818
18181818F8000000
000000001F181818
FFFFFFFFFFFFFFFF
00000000FFFFFFFF
F0F0F0F0F0F0F0F0
0F0F0F0F0F0F0F0F
FFFFFFFF00000000
}
Flag bits = { }
testroms = { }
_cartridge stuff = { }
_DMGPALETTE = { }
_GBCPALETTELOOKUP = { }
_instrIDs = { }
_instrParam = { }
_PALETTE RAM = { }
_pix = { }
_RAM = { }
_REGISTERS = { }
_ROM = { }
_soundregs = { }
//----- Broadcast received events -------------------------------------------------------------------------------------
WhenBroadcastReceived(CP/M Call)
{
If (_registers[2] == 2)
{
If (_registers[4] == 10)
{
List.DeleteAll(8080.Terminal);
y += -10;
}
Else
{
Call Clear line;
List.Add(8080.Terminal, _registers[4]);
Call Renterminal;
}
Stop(this script);
}
If (_registers[2] == 9)
{
Pen.SetPenColorToColor(#468ed2);
List.DeleteAll(8080.Terminal);
r.0 = ((_registers[3] * 256) + _registers[4]);
Repeat Until (_memory[(r.0 + 1)] == 36)
{
List.Add(8080.Terminal, _memory[(r.0 + 1)]);
r.0 += 1;
}
Call Renterminal;
Stop(this script);
}
If (_registers[2] == 12)
{
List.ReplaceItem(_registers, 6, "0x22");
Stop(this script);
}
If (_registers[2] == 7)
{
List.ReplaceItem(_registers, 8, _memory[4]);
Stop(this script);
}
If (_registers[2] == 8)
{
List.ReplaceItem(_memory, 4, _registers[4]);
Stop(this script);
}
If (_registers[2] == 0)
{
Stop(other scripts in sprite);
List.Add(logzz, "CP/M function 0: System Reset");
List.Show(logzz);
Stop(all);
}
}
WhenBroadcastReceived(exit emulator)
{
Stop(other scripts in sprite);
y = 120;
}
WhenBroadcastReceived(reset emulator)
{
Pen.SetPenColorToColor(#65ffce);
Call rentitle;
Call rentitle;
}
//----- Custom blocks -------------------------------------------------------------------------------------------------
Define c (warp=true)
{
Pen.Clear();
Pen.SetPenColorToColor(#346856);
Pen.SetPenSizeTo(66);
Motion.GoToXY(-240, -180);
Pen.Down();
Motion.ChangeXBy(1111);
Pen.Clear();
x = -226;
Pen.SetPenColorToColor(#61f8c9);
z = 100;
v = Sensing.Of(fps1, GB);
Call fc(v);
Call d(3);
Call renchar x((x - 5)) y(-156) s(2) d(46);
x += 4;
Call d(1);
}
Define Clear line (warp=true)
{
Pen.SetPenColorToColor(#000000);
Pen.SetPenSizeTo(9);
y += 10;
Motion.GoToXY(-240, (y - 1));
Pen.Down();
Motion.GoToXY(240, (y - 1));
Pen.Clear();
Pen.SetPenColorToColor(#468ed2);
}
Define d(string n) (warp=true)
{
Repeat (n)
{
Call renchar x(x) y(-156) s(2) d(((floor((v / z)) % 10) + 48));
z = (z / 10);
x += 14;
}
}
Define fc(string s) (warp=false)
{
If (s > 60)
{
Pen.SetPenTo(color, 44);
}
Else
{
Pen.SetPenTo(color, (s / (60 / 44)));
}
}
Define px (warp=true)
{
Pen.Down();
Pen.Clear();
}
Define renchar x(string x) y(string y) s(string s) d(string d) (warp=false)
{
m = 0;
Repeat (16)
{
Call render4px((x + ((m % 2) * (4 * s))))((y - (floor((m / 2)) * s)))(s)(Operator.Join("0x", Operator.LetterOf(dat[(d + 1)], (m + 1))));
m += 1;
}
}
Define render4px(string x)(string y)(string s)(string d) (warp=true)
{
Pen.Clear();
Motion.GoToXY(x, y);
Pen.SetPenSizeTo(s);
k = 16;
i = 0;
j = 0;
Repeat (4)
{
k = (k / 2);
If (Not ((i == (floor((d / k)) % 2))))
{
j2 = (1 - j2);
Call px;
}
Motion.ChangeXBy(s);
}
}
Define Renterminal (warp=true)
{
l = 0;
Repeat (List.Length(8080.Terminal))
{
Call renchar x(((l - (List.Length(8080.Terminal) / 2)) * 6)) y(y) s(1) d(8080.Terminal[(l + 1)]);
l += 1;
If (100 < List.Length(8080.Terminal))
{
List.DeleteItem(8080.Terminal, 2);
y += -5;
}
}
y += -10;
If (y < -150)
{
Pen.Clear();
y = 130;
}
}
Define rentitle (warp=true)
{
l = 0;
Repeat (List.Length(_gametitle))
{
Call renchar x(((l - (List.Length(_gametitle) / 2)) * 14)) y(170) s(2) d(_gametitle[(l + 1)]);
l += 1;
}
}
//----- Orphaned blocks -----------------------------------------------------------------------------------------------
(8080.Terminal[l] == "0x0a")
//----- Costumes ------------------------------------------------------------------------------------------------------
costume1.svg