Skip to content

Commit c125156

Browse files
authored
Merge pull request #124 from orix-software/develop
Develop
2 parents 3ac1475 + 9a94c79 commit c125156

33 files changed

Lines changed: 441 additions & 2125 deletions

.github/workflows/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
# This workflow contains a single job called "build"
1616
setup-sdk:
17-
runs-on: ubuntu-18.04
17+
runs-on: ubuntu-22.04
1818

1919
steps:
2020
- name: Cache sdk
@@ -83,14 +83,15 @@ jobs:
8383
build:
8484
# The type of runner that the job will run on
8585
needs: setup-sdk
86-
runs-on: ubuntu-18.04
86+
runs-on: ubuntu-22.04
8787
outputs:
8888
version: ${{ steps.job_vars.outputs.VERSION }}
8989
repo_name: ${{ steps.job_vars.outputs.REPO_NAME }}
9090

9191
steps:
9292
- name: Checkout repository and submodules
93-
uses: actions/checkout@v2
93+
uses: actions/checkout@v3
94+
# Remove recursive
9495
with:
9596
submodules: recursive
9697

@@ -132,7 +133,7 @@ jobs:
132133

133134
upload:
134135
needs: build
135-
runs-on: ubuntu-18.04
136+
runs-on: ubuntu-22.04
136137
defaults:
137138
run:
138139
shell: bash

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022.4
1+
2023.1

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ curl --insecure -o libs/ch376lib.tgz http://repo.orix.oric.org/dists/2021.2/tgz/
99
cd libs/ && tar xvfz ch376lib.tgz && cd ..
1010
rm libs/ch376lib.tgz
1111

12+

docs/sh.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,16 @@ When kernel has finished to initialize at boot time, sh command is started in in
3232

3333
## Shortcuts for tools
3434

35-
*Funct+T* : Start Twilighte setup
36-
37-
*Funct+L* : Start Loader
35+
*Funct+A* : Start Systemd rom
3836

3937
*Funct+B* : Start Basic11
4038

4139
*Funct+G* : Start basic11 gui
4240

41+
*Funct+L* : Start Loader
42+
43+
*Funct+T* : Start Twilighte setup
44+
4345
## Available commands
4446

4547
The command line is limited in characters (37). If you reach this limit, you won’t be able to type the complete command line Known bugs

src/build.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.define __DATE__ "2022-07-22 15:34"
1+
.define __DATE__ "2022-12-23 00:40"

src/commands/banks.asm

Lines changed: 72 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717
bank_all_banks_display := userzp+13 ; used when bank has no option
1818
bank_save_argc := userzp+14
1919
first_char_id_bank := userzp+15
20-
20+
tmp3 := userzp+17
2121

2222
XMAINARGS = $2C
2323
XGETARGV = $2E
2424

25-
2625
lda #$01
2726
sta bank_all_banks_display
2827

@@ -79,7 +78,6 @@
7978
sbc #$30
8079
sta bank_save_argc
8180
ldx first_char_id_bank ; 2 chars, get the first digit
82-
;dex
8381
lda #$00
8482
@compute_again:
8583

@@ -94,17 +92,17 @@
9492
cmp #32
9593
bcc @do_not_switch_to_ram_bank
9694
pha
97-
lda $342
95+
lda TWILIGHTE_REGISTER
9896
ora #%00100000
99-
sta $342
97+
sta TWILIGHTE_REGISTER
10098
pla
10199
@do_not_switch_to_ram_bank:
102100

103101
jsr _twil_get_registers_from_id_bank
104102
; A bank
105103

106104
sta first_char_id_bank
107-
stx $343
105+
stx TWILIGHTE_BANKING_REGISTER
108106

109107

110108

@@ -164,29 +162,29 @@ displays_all_banks:
164162
lda #64
165163
sta bank_decimal_current_bank
166164

167-
lda $343
165+
lda TWILIGHTE_BANKING_REGISTER
168166
sta save_twilighte_banking_register
169167

170168
; switch to ram
171-
lda $342
169+
lda TWILIGHTE_REGISTER
172170
sta save_twilighte_register
173171
ora #%00100000
174-
sta $342
172+
sta TWILIGHTE_REGISTER
175173

176174
jsr displays_banking
177175

178-
lda $342
179-
and #%11011111
180-
sta $342
176+
lda TWILIGHTE_REGISTER
177+
and #%11011111 ; Return to eeprom mode
178+
sta TWILIGHTE_REGISTER
181179

182180
jsr displays_banking
183181

184182
sei
185183
lda save_twilighte_register
186-
sta $342
184+
sta TWILIGHTE_REGISTER
187185

188186
lda save_twilighte_banking_register
189-
sta $343
187+
sta TWILIGHTE_BANKING_REGISTER
190188
cli
191189

192190
rts
@@ -195,7 +193,7 @@ displays_banking:
195193

196194

197195
lda #$07
198-
sta $343
196+
sta TWILIGHTE_BANKING_REGISTER
199197

200198
parse_next_banking_set:
201199

@@ -228,6 +226,7 @@ loop2:
228226
cmp #$C0 ; Does signature is in rom ?
229227
bcc @exit
230228

229+
231230
.IFPC02
232231
.pc02
233232
stz ptr2
@@ -237,6 +236,8 @@ loop2:
237236
sta ptr2
238237
.endif
239238

239+
;jsr checking_rom
240+
240241
@loopme:
241242
ldy ptr2
242243
ldx #$00 ; Read mode
@@ -247,9 +248,9 @@ loop2:
247248
bcc @none_char
248249
cmp #$7F ; '7f'
249250
bcs @none_char
250-
@skip:
251251

252-
jsr display_char
252+
@skip:
253+
jsr display_char
253254

254255
@none_char:
255256

@@ -290,22 +291,23 @@ loop2:
290291
lda bank_decimal_current_bank
291292
cmp #16
292293
bne @skip12
293-
lda #03
294-
sta $343
294+
lda #$03
295+
sta TWILIGHTE_BANKING_REGISTER
295296

296297
@skip12:
297-
298-
dec $343
298+
dec TWILIGHTE_BANKING_REGISTER
299299
bpl parse_next_banking_set
300-
@end_of_bank:
301300

301+
@end_of_bank:
302302
rts
303+
303304
@check_ctrl:
304305
lda bank_stop_listing
305306
bne @wait_key
306307
asl KBDCTC
307308
bcc @no_ctrl
308309
rts
310+
309311
@check_kernel_ram_overlay:
310312
lda bank_decimal_current_bank
311313
cmp #52
@@ -321,28 +323,27 @@ check_if_bank_7_6_5:
321323
bne @check_bank4
322324
@set4:
323325
lda #$04
324-
sta $343
326+
sta TWILIGHTE_BANKING_REGISTER
325327
rts
326328
@check_bank4:
327329
cmp #$04
328330
bne @others
329331
@set0:
330332
lda #$00
331-
sta $343
333+
sta TWILIGHTE_BANKING_REGISTER
332334
rts
333335
@others:
334336
cmp #20
335337
bne @exit
336338
@set3:
337339
lda #$03
338-
sta $343
340+
sta TWILIGHTE_BANKING_REGISTER
339341
rts
340342
@exit:
341-
;cmp #61
342-
;beq @set4
343343
rts
344+
344345
display_char:
345-
BRK_ORIX XWR0
346+
BRK_KERNEL XWR0
346347
rts
347348

348349
display_bank_id:
@@ -363,7 +364,7 @@ greater_than_10:
363364
cmp #20
364365
bcs greater_than_20
365366
pha
366-
lda #'1'
367+
lda #'1'
367368
BRK_ORIX XWR0
368369
pla
369370
clc
@@ -375,14 +376,15 @@ greater_than_20:
375376
cmp #30
376377
bcs greater_than_30
377378
pha
378-
lda #'2'
379+
lda #'2'
379380
BRK_ORIX XWR0
380381
pla
381382
clc
382383
adc #28
383384
BRK_ORIX XWR0
384385
CPUTC ':'
385386
rts
387+
386388
greater_than_30:
387389
cmp #40
388390
bcs greater_than_40
@@ -395,6 +397,7 @@ greater_than_30:
395397
BRK_ORIX XWR0
396398
CPUTC ':'
397399
rts
400+
398401
greater_than_40:
399402
cmp #50
400403
bcs greater_than_50
@@ -407,6 +410,7 @@ greater_than_40:
407410
BRK_ORIX XWR0
408411
CPUTC ':'
409412
rts
413+
410414
greater_than_50:
411415
cmp #60
412416
bcs greater_than_60
@@ -420,18 +424,16 @@ greater_than_50:
420424
BRK_ORIX XWR0
421425
CPUTC ':'
422426
rts
423-
greater_than_60:
424427

428+
greater_than_60:
425429
pha
426430
lda #'6'
427431
BRK_ORIX XWR0
428432
pla
429-
;cld
430433
sec
431434
sbc #12
432-
;sed
433435
BRK_ORIX XWR0
434-
CPUTC ':'
436+
print #':'
435437
rts
436438

437439
upd_ptr:
@@ -464,6 +466,41 @@ get_rom_type:
464466
jsr READ_BYTE_FROM_OVERLAY_RAM ; get low
465467
rts
466468

469+
checking_rom:
470+
; ce code est supposé mettre des couleurs différentes pour indiquer s'il y une anomalie dans la banque
471+
lda ptr1
472+
sta tmp3
473+
474+
lda ptr1+1
475+
sta tmp3+1
476+
477+
478+
lda #<$FFFE
479+
sta ptr1
480+
lda #>$FFFE
481+
sta ptr1+1
482+
483+
; Get Type
484+
ldy #$00
485+
ldx #$00 ; Read mode
486+
jsr READ_BYTE_FROM_OVERLAY_RAM
487+
cmp #$FA
488+
beq @orix_rom
489+
cli
490+
@me:
491+
jmp @me
492+
lda #'2'
493+
BRK_KERNEL XWR0
494+
sei
495+
@orix_rom:
496+
@skip:
497+
lda tmp3
498+
sta ptr1
499+
500+
lda tmp3+1
501+
sta ptr1+1
502+
rts
503+
467504
usage:
468505
.byte "bank [-a]",$0D,$0A
469506
.asciiz "bank IDBANK"
@@ -482,6 +519,7 @@ str_kernel_reserved:
482519
tax
483520
lda bank,y
484521
rts
522+
485523
@bank0:
486524
; Impossible to have bank 0
487525
tax

src/commands/basic11.asm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ basic11_no_arg_provided := userzp+24 ; 8 bits store if we need to start
6464
COPY_CODE_TO_BOOT_ATMOS_ROM_ADRESS := $200
6565

6666
XMAINARGS = $2C
67-
XGETARGV = $2E
67+
XGETARGV = $2E
6868

6969
lda #$00
7070
sta basic11_no_arg_provided
@@ -909,6 +909,9 @@ tapes_path_basic10:
909909
cpy #$00
910910
bne @no_oom4
911911
print str_enomem
912+
913+
914+
912915
rts
913916
@no_oom4:
914917

src/commands/cat.asm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.export _cat
22

33
.proc _cat
4-
54
cat_save_argvlow := userzp+1
65
cat_save_argvhigh := userzp+2
76
cat_save_argc := userzp+3
@@ -13,7 +12,6 @@
1312
lda #$00 ; return args with cut
1413
BRK_KERNEL XMAINARGS
1514

16-
1715
sta cat_save_argvlow
1816
sty cat_save_argvhigh
1917
stx cat_save_argc

0 commit comments

Comments
 (0)