Skip to content

Commit

Permalink
Fixed zip creation wrt crossdev
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Robson committed Jan 22, 2024
1 parent cf97f53 commit 7092095
Show file tree
Hide file tree
Showing 15 changed files with 58 additions and 21 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ BINARIES = $(BINDIR)*.uf2 $(BINDIR)*.elf $(ROOTDIR)emulator$(S)cross-compile$(
PYTHONAPPS = $(BINDIR)makebasic.zip $(BINDIR)listbasic.zip $(BINDIR)createblanks.zip $(BINDIR)makeimg.zip

all:
$(CMAKEDIR) bin
$(CMAKEDIR) binna
$(CMAKEDIR) release
make -B -C kernel release
make -B -C basic release
Expand All @@ -34,12 +34,12 @@ all:
make -B zipfile

zipfile: samples crossdev
zip -r -j -q release$(S)$(RELEASEFILE) $(DOCUMENTS) $(BINARIES) $(PYTHONAPPS) release$(S)samples.zip release$(S)crossdev.zip
zip -r -j -q release$(S)$(RELEASEFILE) $(DOCUMENTS) $(BINARIES) $(PYTHONAPPS) release$(S)samples.zip documents$(S)release$(S)crossdev$(S)crossdev.zip
$(CDEL) release$(S)samples.zip
$(CDEL) release$(S)crossdev.zip
$(CDEL) documents$(S)release$(S)crossdev$(S)crossdev.zip

crossdev:
zip -r -j -q release$(S)crossdev.zip documents$(S)release$(S)crossdev
cd documents$(S)release$(S)crossdev ; $(CDEL) crossdev.zip ; zip -r -q crossdev.zip *

samples:
zip -r -j -q release$(S)samples.zip basic$(S)code basic$(S)images$(S)test$(S)test.gfx basic$(S)images$(S)graphics.gfx
Expand Down
2 changes: 0 additions & 2 deletions documents/TODO
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ General
Larger Additions
----------------

- Extend cross development to show graphics.

- Sprites
- something like AMAL

Expand Down
1 change: 1 addition & 0 deletions documents/release/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ Changes
*** Release 7a ***

22/01/04 IMP: Added Tilemaps via TILEMAP and TILEDRAW commands.
IMP: Enhanced crossdev example to include sprite and tile creation and to show some functionality.
12 changes: 9 additions & 3 deletions documents/release/crossdev/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
rem
rem Where executables are
rem
set BINDIR=z:\bin
set BINDIR=..
rem
rem Convert graphics files and put in storage (which is the SD Card/USB stick in the emulator.)
rem This takes the 3 png files and creates graphics.gfx
rem
python %BINDIR%\makeimg.zip
copy graphics.gfx storage
rem
rem Convert source.bsc to a tokenised program
rem
python %BINDIR%\makebasic.zip source.bsc -oprogram.bas
rem
rem Run it in the emulator. Loads program.bas in to 'page' (where program code goes)
rem Then warm starts the interpreter. You can use exec to auto run it.
rem Then start the interpreter and runs the program (warm just starts it)
rem
%BINDIR%\neo.exe program.bas@page warm
%BINDIR%\neo.exe program.bas@page exec
12 changes: 9 additions & 3 deletions documents/release/crossdev/build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
#
# Where executables are
#
BINDIR=../../../bin
BINDIR=..
#
# Convert graphics files and put in storage (which is the SD Card/USB stick in the emulator.)
# This takes the 3 png files and creates graphics.gfx
#
python $BINDIR/makeimg.zip
cp graphics.gfx storage
#
# Convert source.bsc to a tokenised program
#
python3 $BINDIR/makebasic.zip source.bsc -oprogram.bas
#
# Run it in the emulator. Loads program.bas in to 'page' (where program code goes)
# Then warm starts the interpreter. You can use exec to auto run it.
# Then start the interpreter and runs the program (warm just starts it)
#
$BINDIR/neo program.bas@page warm
$BINDIR/neo program.bas@page exec
Binary file added documents/release/crossdev/graphics.gfx
Binary file not shown.
Binary file modified documents/release/crossdev/memory.dump
Binary file not shown.
Binary file added documents/release/crossdev/program.bas
Binary file not shown.
36 changes: 31 additions & 5 deletions documents/release/crossdev/source.bsc
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
'
' A demo program
'
cls
for i = 1 to 15
a = sin(i)
ink i:print "Hello, world"
cls:sprite clear:' clear screen & load sprites
gload "graphics.gfx":' load the graphics file built in
'
' Draw some random lines
'
for i = 1 to 50
line 160,120 ink rand(16) to rand(320),rand(240)
next

'
' Use Image to draw things. These are graphics not sprites.
'
image 0 to 10,10
image 0 dim 3 to 30,10: ' dim makes it bigger.
image $80 dim 1 to 160,10
image $80,2 dim 2 to 190,10
image $C0 dim 1 to 240,10
'
' Draw some text
'
text "Sprite Demo" solid dim 2 ink 3 to 10,100: ' solid here means black background rather than transparent
'
' Animate some sprites
'
n = 0
repeat
if event(t1,3): ' this returns true once every 3/100 of a second using t1 to track it.
n = n + 1:x = int(sin(n) * 160 + 160)
sprite 0 image $80 to x,100
sprite 1 image $C0 to x,140
sprite 2 image $80 flip 2 to x,180
endif
until false
Binary file added documents/release/crossdev/sprite_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documents/release/crossdev/sprite_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added documents/release/crossdev/tile_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion documents/release/status.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Status
Sprite clipping works
Slide sound effects (adds a constant to the frequency to create simple FX)
Sprite Anchor Points
Tile maps

Todo
----
A small animation language as in STOS and AMOS to handle some of the load
Tile maps
Turtle graphics
USB Joystick support
Sweet16 running on the RP2040 but controlled by BASIC or Another.
6 changes: 3 additions & 3 deletions firmware/include/data/sfxdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ static const uint16_t sfxData18[] = {
740,75,0,50,740,75,0,50,740,75,0,50,740,75,0,50,65535 };
// 19 expl100
static const uint16_t sfxData19[] = {
498,1,389,1,278,1,422,1,323,1,317,1,336,1,569,1,248,1,425,1,471,1,517,1,531,1,214,1,331,1,322,1,681,1,443,1,672,1,636,1,216,1,568,1,328,1,256,1,371,1,235,1,634,1,611,1,342,1,291,1,484,1,441,1,212,1,586,1,643,1,205,1,338,1,566,1,578,1,234,1,495,1,463,1,317,1,543,1,486,1,561,1,376,1,239,1,323,1,401,1,65535 };
454,1,422,1,415,1,510,1,230,1,651,1,512,1,243,1,262,1,408,1,328,1,351,1,319,1,556,1,363,1,312,1,273,1,475,1,261,1,523,1,680,1,591,1,404,1,570,1,614,1,531,1,525,1,263,1,347,1,231,1,616,1,255,1,672,1,412,1,308,1,376,1,495,1,220,1,321,1,218,1,678,1,261,1,436,1,388,1,237,1,651,1,442,1,525,1,201,1,327,1,65535 };
// 20 expl50
static const uint16_t sfxData20[] = {
465,1,392,1,631,1,309,1,211,1,309,1,655,1,317,1,255,1,646,1,660,1,595,1,233,1,419,1,696,1,641,1,419,1,253,1,639,1,216,1,202,1,340,1,304,1,262,1,340,1,65535 };
347,1,583,1,521,1,636,1,624,1,405,1,551,1,479,1,428,1,331,1,509,1,298,1,368,1,624,1,235,1,622,1,548,1,465,1,583,1,332,1,582,1,489,1,513,1,599,1,287,1,65535 };
// 21 expl20
static const uint16_t sfxData21[] = {
435,1,255,1,684,1,274,1,320,1,602,1,624,1,488,1,226,1,503,1,65535 };
544,1,230,1,237,1,392,1,283,1,486,1,266,1,474,1,256,1,274,1,65535 };
// 22 las30
static const uint16_t sfxData22[] = {
600,1,574,1,547,1,520,1,494,1,467,1,440,1,414,1,387,1,360,1,334,1,307,1,280,1,254,1,227,1,65535 };
Expand Down

0 comments on commit 7092095

Please sign in to comment.