Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 57 additions & 54 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ name: build
on:
# Triggers the workflow on push event only for all branches
push:
# branches: [ main, master ]
# branches: [ main, master, develop ]

#pull_request:
# branches: [ main, master ]

Expand All @@ -14,37 +15,46 @@ on:
jobs:
# This workflow contains a single job called "build"
setup-sdk:
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04

steps:
- name: Cache sdk
id: cache-sdk
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
cc65/**/*
orix-sdk/**/*
md2hlp/**/*
orix-software/**/*
key: ${{ runner.os }}-orix-sdk_
bpm/**/*
oricutron/**/*
key: ${{ secrets.CACHE_ID }}-orix-sdk

- name: Checkout cc65
if: steps.cache-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: cc65/cc65
path: cc65

- name: Checkout bpm
if: steps.cache-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: orix-software/bpm
path: bpm

- name: Checkout orix-sdk
if: steps.cache-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: assinie/orix-sdk
path: orix-sdk

- name: Checkout md2hlp
if: steps.cache-sdk.outputs.cache-hit != 'true'
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: assinie/md2hlp
path: md2hlp
Expand All @@ -68,6 +78,14 @@ jobs:
echo "src/include" >> .git/info/sparse-checkout
git checkout

- name: Prepare environment for oricutron
if: steps.cache-sdk.outputs.cache-hit != 'true'
run: |
sudo apt-get update && sudo apt-get install -y xvfb libgtk-3-0 libgtk-3-dev libsdl1.2debian libsdl1.2-dev
git clone https://github.com/pete-gordon/oricutron.git
cd oricutron && make && pwd && cd .. && ls -l && echo ${GITHUB_WORKSPACE}
echo Timeout oricutron : ${secret}.TMOUT_ORICUTRON

- name: Compile orix-sdk
if: steps.cache-sdk.outputs.cache-hit != 'true'
working-directory: orix-sdk
Expand All @@ -83,13 +101,16 @@ jobs:
build:
# The type of runner that the job will run on
needs: setup-sdk
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
env:
hash: ${{ secrets.HASH }}
outputs:
version: ${{ steps.job_vars.outputs.VERSION }}
repo_name: ${{ steps.job_vars.outputs.REPO_NAME }}
bpm_found: ${{ steps.bpm_upload.outputs.BPM_FOUND }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set job variables
id: job_vars
Expand All @@ -98,26 +119,38 @@ jobs:
echo "::set-output name=REPO_NAME::${GITHUB_REPOSITORY##*/}"

- name: Install sdk
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
cc65/**/*
orix-sdk/**/*
md2hlp/**/*
orix-software/**/*
key: ${{ runner.os }}-orix-sdk_
bpm/**/*
oricutron/**/*
key: ${{ secrets.CACHE_ID }}-orix-sdk

- name: Prepare environment for project
run: mv cc65 ../ && mv orix-software ../ && mv orix-sdk ../ && mv md2hlp ../
run: |
mkdir ~/bin
cd bpm && pip install -r requirements.txt && cd ..
mv cc65 ../ && mv orix-software ../ && mv orix-sdk ../ && mv md2hlp ../ && mv bpm ../

- name: Compile project
run: CC65_HOME=${GITHUB_WORKSPACE}/../cc65 make
run: |
if [ -f "bpm.tml" ]; then
chmod 755 ../bpm/src/bpm
echo "../bpm/src/bpm" >> $GITHUB_PATH
export PATH=$PATH:../bpm/src/:${GITHUB_WORKSPACE}/../cc65/bin
bpm --force-update --replace-for-new-project -V
fi
CC65_HOME=${GITHUB_WORKSPACE}/../cc65 ./make.sh

- name: List build directory content
run: ls -lR build

- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v5
with:
name: ${{ steps.job_vars.outputs.REPO_NAME }}
path: |
Expand All @@ -127,45 +160,15 @@ jobs:
- name: Post compilation
run: mv ../cc65 . && mv ../orix-software . && mv ../orix-sdk . && mv ../md2hlp .

upload:
needs: build
runs-on: ubuntu-18.04
defaults:
run:
shell: bash
env:
hash: ${{ secrets.HASH }}
version: ${{ needs.build.outputs.version }}
repo_name: ${{ needs.build.outputs.repo_name }}

steps:
- name: Get branch name
if: github.event_name != 'pull_request'
run: echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
# run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF##*/})"

- name: Get branch name on pull request
if: github.event_name == 'pull_request'
run: echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> GITHUB_ENV
#run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_HEAD_REF})"

- name: Get archive name
run: echo "ARCHIVE_NAME=${repo_name}.tgz" >> $GITHUB_ENV

# On pourrait faire l'extraction directement à la racine si VERSION est dans l'artifact
- name: Download Artifact
id: download
uses: actions/download-artifact@v2
with:
name: ${{ needs.build.outputs.repo_name }}
path: artifact

- name: Make archive
working-directory: ${{steps.download.outputs.download-path}}
run: tar -zcvf $GITHUB_WORKSPACE/$ARCHIVE_NAME *

- name: Upload to oric
- name: Upload if bpm
id: bpm_upload
run: |
if [ "$BRANCH_NAME" = "master" -o "$BRANCH_NAME" = "main" ]; then VERSION="$version"; else VERSION=alpha ; fi
curl -X POST --data-binary "@${ARCHIVE_NAME}" "https://cdn.oric.org/publish.php?hash=$hash&path=/home/oricoujr/www/ftp/orix/dists/$VERSION/tgz/6502/${ARCHIVE_NAME}"
ls -l
if [ -f "bpm.tml" ]; then
export BPM_PUBLISH_KEY=$hash
export PATH=$PATH:../bpm/src/:${GITHUB_WORKSPACE}/../cc65/bin
if [ "$BRANCH_NAME" = "master" -o "$BRANCH_NAME" = "main" ]; then bpm --force-update -V;--force-update publish --official; else bpm publish --alpha; fi
else
echo "bpm.tml not found, skipping bpm upload"
fi

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![build](https://github.com/orix-software/untar/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/orix-software/untar/actions/workflows/main.yml)

# Description
Untar utility for Orix

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2022.2
2025.4
34 changes: 34 additions & 0 deletions bpm.tml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "untar"
version = "2025.4"
authors = [ "Assinie",]
license = ""
edition = "2025"
cpu = "6502"
readme = ""
repository = "https://github.com/orix-software/untar"
documentation = ""
description = "Provide untar"
homepage = ""
buildfolder = "build"
packagetype = "tgz"
codetype = "bin"
templatecode = ""
pathsrc = "src"
oricutron_replace_autoboot_run = "True"
asm_bin_tpl_version = "2024.4"
asm_rom_tpl_version = "2024.4"
orixsdk_version = "2023.3.0"
default_github_action_version = "2025.2"
default_generatedoc_version = "2025.4"
orix_minimal_kernel_version = "2022.3"
orix_run_pre_script = ""
md2hlp = "yes"
enable_build = "False"
enable_publish = "True"

[dependencies]

[dynamiclibs]

[srcfolders]
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ VERBOSE ?= 0
# Définition des outils
#

MD2HLP = $(MD2HLP_PATH)/md2hlp.py
MD2HLP = $(MD2HLP_PATH)/md2hlp.py3

#
# Définition des options pour les outils
Expand Down
3 changes: 2 additions & 1 deletion docs/untar.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
+ untar -tf /home/test.tar

## DESCRIPTION
**untar** list and extract files in a TAR archive
**untar** list and extract files in a TAR archive.
**untar** manages only tar built with gnu format (from 'tar -c --format=gnu')

## OPTIONS
* -h ^Bshow this help message and exit
Expand Down
30 changes: 30 additions & 0 deletions make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# CC65_HOME=..
# DEBUG=yes

SDK_PATH="../orix-sdk"
PROGNAME="$(basename `pwd`)"

make configure && make clean

START_ADDR=0x0800 make

if [ $? -eq 0 ]
then
mv build/bin/${PROGNAME} build/bin/${PROGNAME}-0800

START_ADDR=0x0900 make

if [ $? -eq 0 ]
then
mv build/bin/${PROGNAME} build/bin/${PROGNAME}-0900

python3 ${SDK_PATH}/bin/relocbin.py3 -2 -o build/bin/${PROGNAME} build/bin/${PROGNAME}-0800 build/bin/${PROGNAME}-0900

if [ $? -eq 0 ]
then
rm build/bin/${PROGNAME}-0800 build/bin/${PROGNAME}-0900
fi
fi
fi
6 changes: 4 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ VERBOSE ?= 0
#
TARGET = telestrat

START_ADDR ?= 0x0900

#
# Définition des outils
#
Expand All @@ -45,11 +47,11 @@ endif

ifeq ($(DEBUG),yes)
ASFLAGS = -t $(TARGET) -I ../ -I $(BUILD_PATH) -I $(SDK_PATH)/macros -I $(SDK_PATH)/include -I $(SHELL_PATH) -I $(KERNEL_PATH) -D VERBOSE_LEVEL=$(VERBOSE) --auto-import --list-bytes 0 -l $(@:.o=.lst) --debug-info
LDFLAGS = -t $(TARGET) -Ln $(@).ca.sym -m $(@).map --lib-path $(LIB_PATH)
LDFLAGS = -t $(TARGET) -Ln $(@).ca.sym -m $(@).map --lib-path $(LIB_PATH) --start-addr $(START_ADDR)
# LDFLAGS = -C "$(LD65_CFG)" -Ln $(BUILD_PATH)/$(PROJECT).ca.sym -m $(BUILD_PATH)/$(PROJECT).map --lib-path $(LIB_PATH)
else
ASFLAGS = -t $(TARGET) -I ../ -I $(BUILD_PATH) -I $(SDK_PATH)/macros -I $(SDK_PATH)/include -I $(SHELL_PATH) -I $(KERNEL_PATH) -D VERBOSE_LEVEL=$(VERBOSE) --auto-import
LDFLAGS = -t $(TARGET) --lib-path $(LIB_PATH)
LDFLAGS = -t $(TARGET) --lib-path $(LIB_PATH) --start-addr $(START_ADDR)
# LDFLAGS = -C "$(LD65_CFG)" --lib-path $(LIB_PATH)
endif

Expand Down
2 changes: 1 addition & 1 deletion src/cmnd/version.s
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
; - prints
;----------------------------------------------------------------------
.proc cmnd_version
prints "untar version 1.0 - 2022.2\r\n"
prints "untar version 1.0 - 2025.4\r\n"
rts
.endproc

Expand Down
24 changes: 13 additions & 11 deletions src/untar.s
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ typedef .struct st_header

unsigned char xtrk
unsigned char psec
; For XMAINARGS
unsigned short cbp_bkp
unsigned char argc

;----------------------------------------------------------------------
; Variables
Expand Down Expand Up @@ -169,20 +172,17 @@ typedef .struct st_header
; contient normalement des données sauvegardées par init qui est dans le segment "ONCE"
; init:
; rts


startup:
jsr zerobss

; XMAINARGS
; .byte $00, $2c

; sta argv
; sty argv+1
; stx argc
initmainargs cbp_bkp, argc, 1

lda #<BUFEDT
ldy #>BUFEDT
sta cbp
sty cbp+1
lda cbp_bkp
sta cbp
lda cbp_bkp+1
sta cbp+1

; Saute le nom de la commande
ldy #$00
Expand All @@ -204,6 +204,7 @@ typedef .struct st_header
adc cbp+1

jsr _main
mfree(cbp_bkp)
rts

.proc zerobss
Expand Down Expand Up @@ -241,7 +242,7 @@ typedef .struct st_header
L4:
rts

rts
; rts
.endproc

.segment "ONCE"
Expand Down Expand Up @@ -319,6 +320,7 @@ MODULE , , startup
jsr ermes
end:
crlf

rts
.endproc

Expand Down
Loading