Skip to content

Commit

Permalink
fix for pre release
Browse files Browse the repository at this point in the history
  • Loading branch information
jedeoric committed Jan 15, 2024
1 parent c7ce4f6 commit 12212e7
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 45 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ jobs:
git clone https://github.com/orix-software/docker-unit-test.git
cd docker-unit-test && bash install.sh ${GITHUB_WORKSPACE} && cd ..
cp build/usr/share/kernel/kernelsd.rom ${GITHUB_WORKSPACE}/oricutron/roms/kernel.rom
cp tests/unit_test/xopen.sub ${GITHUB_WORKSPACE}/oricutron/sdcard/ETC/AUTOBOOT
cat tests/unit_test/xopen.sub > ${GITHUB_WORKSPACE}/oricutron/sdcard/ETC/AUTOBOOT
cat tests/unit_test/xrm.sub >> ${GITHUB_WORKSPACE}/oricutron/sdcard/ETC/AUTOBOOT
cd ${GITHUB_WORKSPACE}/oricutron
timeout --preserve-status 5 ./xvfb.sh || exit 0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023.4
2024.1
6 changes: 3 additions & 3 deletions memmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ CALL:XOPEN:XRM_ROUTINE
|##MEMMAP: Kernel bank 7
|MEMMAP: Type | Name | Range | Size |
|MEMMAP: :-------- |:---------------------------- |:------- |:-----|
|MEMMAP:ROM|FREE |$fef4-$fff0| 252 |
|MEMMAP:ROM|FREE |$fef5-$fff0| 251 |
|##MEMMAP:Bank 0
|MEMMAP: Type | Name | Range | Size |
|MEMMAP: -------- | ---------------------------- | ------- |-----|
|MEMMAP:BANK0|BUFBUF | $c080-$c0b6 | 54 |
|MEMMAP:BANK0|BUFROU | $c500-$c54e | |
|MEMMAP:BANK0|TELEMON_KEYBOARD_BUFFER_BEGIN | $c5c4-$c680 | |
|MEMMAP:BANK0|XMALLOC (copy from kernel) | $fba6-$fc52 | |
|MEMMAP:BANK0|XFREE (copy from kernel) | $fc52-$fed7 | |
|MEMMAP:BANK0|XMALLOC (copy from kernel) | $fba7-$fc53 | |
|MEMMAP:BANK0|XFREE (copy from kernel) | $fc53-$fed8 | |
6 changes: 6 additions & 0 deletions modules/src/dummy/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <stdio.h>

//cl65 --module -t c64 -o $@ loader-arch-module.o $^

int main() {
}
7 changes: 4 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ ca65 --cpu 6502 -DWITH_SDCARD_FOR_ROOT=1 -DWITH_DEBUG=1 --verbose -s -ttelestra
ld65 -tnone -DWITH_SDCARD_FOR_ROOT=1 -DWITH_DEBUG=1 kdebugsd.ld65 -o kdebug.rom -Ln kdebugsd.sym -m memmap.txt -vm

cp kernel.rom $ORICUTRON_PATH/roms
cp kdebug.rom $ORICUTRON_PATH/roms
# cp kdebug.rom $ORICUTRON_PATH/roms
cp tests/test_kernel $ORICUTRON_PATH/sdcard/bin/test

cp tests/kopened $ORICUTRON_PATH/sdcard/bin/
#cp tests/kopened $ORICUTRON_PATH/sdcard/bin/

cp tests/unit_test/xopen.sub $ORICUTRON_PATH/sdcard/etc/AUTOBOOT
#cat tests/unit_test/xopen.sub > $ORICUTRON_PATH/sdcard/etc/AUTOBOOT
#cat tests/unit_test/xrm.sub >> $ORICUTRON_PATH/sdcard/etc/AUTOBOOT

cd $ORICUTRON_PATH
./oricutron
Expand Down
3 changes: 2 additions & 1 deletion src/functions/memory/memory_driver.asm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ command_not_found_no_inc:
adc RESB
bcc read_command_from_bank_driver_do_not_inc
inc RESB+1

read_command_from_bank_driver_do_not_inc:
sta RESB
inx
Expand All @@ -72,6 +73,7 @@ read_command_from_bank_driver_do_not_inc:
; at this step we did not found the command in the rom
exit_to_kernel_ENOENT:
ldy #ENOENT ; error

exit_to_kernel:
lda VIA2::PRA
ora #%00000111 ; Return to telemon
Expand Down Expand Up @@ -99,7 +101,6 @@ read_command_from_bank_driver_patch2:

lda #$07 ; Return to telemon
jsr $46A

jsr _XFORK

cpy #EOK
Expand Down
2 changes: 0 additions & 2 deletions src/functions/process/kernel_exec_from_storage.asm
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,6 @@ open_binary_and_exec:

rts



str_root_bin:
; If you change this path, you need to change .strlen("/bin/") above
.asciiz "/bin/"
Expand Down
7 changes: 2 additions & 5 deletions src/functions/process/kernel_kill_process.asm
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,10 @@

; FIXME use kernel_get_struct_process_ptr routine
jsr kernel_get_struct_process_ptr
;lda kernel_process+kernel_process_struct::kernel_one_process_struct_ptr_low,x

sta RES
sty RES+1

; lda kernel_process+kernel_process_struct::kernel_one_process_struct_ptr_high,x
;sta RES+1

ldy #kernel_one_process_struct::ppid

lda (RES),y ; A contains the PPID
Expand All @@ -69,7 +66,7 @@

; restore zp of the PPID

ldx kernel_process+kernel_process_struct::kernel_current_process
ldx kernel_process+kernel_process_struct::kernel_current_process ; $57D
jsr kernel_get_struct_process_ptr
sta RES
sty RES+1
Expand Down
8 changes: 5 additions & 3 deletions src/functions/process/xexec.asm
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
lda (TR0),y
beq @S6
sta BUFEDT,y


iny
cpy #110
bne @L7
Expand All @@ -62,6 +60,7 @@
cmp #$07
bne @do_not_correct
lda #$05 ; Shell by default

@do_not_correct:
sta KERNEL_KERNEL_XEXEC_BNKOLD

Expand Down Expand Up @@ -150,9 +149,13 @@ out1:
stx HRS2+1

skip_sta_hrs2:

lda kernel_process+kernel_process_struct::kernel_current_process
cmp #$01 ; Dans le cas d'exec, il y a 2 kill qui se font FIXME bug
beq @no_kill
jsr kernel_kill_process

@no_kill:
ldy #EOK

exit:
Expand All @@ -166,7 +169,6 @@ exit:
lda KERNEL_SAVE_XEXEC_CURRENT_SET
sta $343


lda HRS2 ; Return code
ldx HRS2+1

Expand Down
3 changes: 0 additions & 3 deletions src/functions/process/xexec_replace_process.asm

This file was deleted.

11 changes: 3 additions & 8 deletions src/functions/process/xfork.asm
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,10 @@
bne @perform_fork

; At this step we replace the process
; ; Let's free all memory from this process
; Let's free all memory from this process
ldx kernel_process+kernel_process_struct::kernel_current_process
;jsr erase_all_chunk_from_current_process

; Change command line
lda kernel_process+kernel_process_struct::kernel_current_process
jsr kernel_get_struct_process_ptr

sty KERNEL_CREATE_PROCESS_PTR1+1
sta KERNEL_CREATE_PROCESS_PTR1

Expand All @@ -54,8 +50,6 @@
@S7:
sta KERNEL_CREATE_PROCESS_PTR1

; Shebang management
; Copy new cmdline with #!
ldy #$00

@L10:
Expand All @@ -66,11 +60,11 @@
cpy #(KERNEL_LENGTH_MAX_CMDLINE-1)
bne @L10
lda #$00 ; Store 0

@S8:
sta (KERNEL_CREATE_PROCESS_PTR1),y

ldy #EOK

rts

@perform_fork:
Expand All @@ -84,6 +78,7 @@

ldx #$00
ldy #kernel_one_process_struct::zp_save_userzp

@L1:
lda userzp,x
sta (RES),y
Expand Down
4 changes: 3 additions & 1 deletion src/kernel.asm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
adc #$01
.endmacro

.define VERSION "2023.4"
.define VERSION "2024.1"

XMALLOC_ROUTINE_TO_RAM_OVERLAY = 39

Expand Down Expand Up @@ -5035,6 +5035,7 @@ XGOKBD_ROUTINE:
sta RESB
sty RESB+1
ldy #$00

loop70:
ldx #$00
lda (RESB,x)
Expand Down Expand Up @@ -5097,6 +5098,7 @@ next81:
iny
bne @skip
inc RES+1

@skip:
pla
lsr
Expand Down
4 changes: 2 additions & 2 deletions src/versions/versions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
.define KERNEL_VERSION_2023_1 $03
.define KERNEL_VERSION_2023_2 $04
.define KERNEL_VERSION_2023_3 $05
.define KERNEL_VERSION_2023_4 $06
.define KERNEL_VERSION_2024_1 $06

.define CURRENT_VERSION_BINARY KERNEL_VERSION_2023_4
.define CURRENT_VERSION_BINARY KERNEL_VERSION_2024_1
2 changes: 1 addition & 1 deletion tests/unit_test/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ -e "$MYPATH/STARTED" ]; then
echo "Le fichier $MYPATH/STARTED existe."
else
echo "Le fichier $MYPATH/STARTED n'existe pas."
echo "Le script submit n'a pas été lancé ou touch à un pb"
echo "Le script submit n'a pas été lancé ou touch à un pb, vérifier le timeout"
exit 1
fi

22 changes: 11 additions & 11 deletions tests/unit_test/xopen.sub
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

touch started

# touch test XOPEN O_CREAT only
echo -n Testing XOPEN O_CREAT
# XOPEN O_CREAT only (touch test )
echo ^[TTest XOPEN
echo -n O_CREAT
touch /toto
if exist /toto echo ^[B [OK]
echo -n Testing XRM
rm /toto
if exist /toto goto error_rm
echo ^[B [OK]
exit

:error_rm
echo ^[A il y a un dysfonctionnement avec rm, le fichier n'a pas été supprimé
exit

# XOPEN O_RDONLY only AND O_WRONLY|O_CREAT
echo -n O_RDONLY & O_WRONLY|O_CREAT

cp started starcop
if exist /starcop echo ^[B [OK]





12 changes: 12 additions & 0 deletions tests/unit_test/xrm.sub
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/submit

echo -n ^[TTest XRM
rm /toto
if exist /toto goto error_rm
echo ^[B [OK]
dump
exit

:error_rm
echo ^[A il y a un dysfonctionnement avec rm, le fichier n'a pas été supprimé
exit

0 comments on commit 12212e7

Please sign in to comment.