improve Makefile, update example pictures
This commit is contained in:
parent
91306135b2
commit
4a8747e453
12 changed files with 88 additions and 49 deletions
|
|
@ -7,4 +7,9 @@ https://commons.wikimedia.org/wiki/File:Ara-Zoo-Muenster-2013.jpg
|
||||||
https://commons.wikimedia.org/wiki/File:Snow_leopard_portrait.jpg
|
https://commons.wikimedia.org/wiki/File:Snow_leopard_portrait.jpg
|
||||||
* shinkansen.pict: 投稿者が撮影, CC BY-SA 3.0 <http://creativecommons.org/licenses/by-sa/3.0/>, via Wikimedia Commons
|
* shinkansen.pict: 投稿者が撮影, CC BY-SA 3.0 <http://creativecommons.org/licenses/by-sa/3.0/>, via Wikimedia Commons
|
||||||
https://commons.wikimedia.org/wiki/File:0key22-86.JPG
|
https://commons.wikimedia.org/wiki/File:0key22-86.JPG
|
||||||
|
* Toco_Toucan.pict: Bernard DUPONT, CC BY-SA 2.0 <https://creativecommons.org/licenses/by-sa/2.0>, via Wikimedia Commons
|
||||||
|
https://commons.wikimedia.org/wiki/File:Toco_Toucan_(Ramphastos_toco)_-_48153967707.jpg
|
||||||
|
* 1911_Detroit_Electric.pict: Cullen328, CC BY-SA 3.0 <https://creativecommons.org/licenses/by-sa/3.0>, via Wikimedia Commons
|
||||||
|
https://commons.wikimedia.org/wiki/File:1911_Detroit_Electric.jpg
|
||||||
|
* ADDS-Envoy-620.pict: ADDS Envoy-1.jpg from terminals-wiki.org, CC-BY-SA 3.0
|
||||||
|
https://terminals-wiki.org/wiki/index.php/File:ADDS_Envoy-1.jpg
|
||||||
|
|
|
||||||
BIN
examples/Toco_Toucan.pict
Normal file
BIN
examples/Toco_Toucan.pict
Normal file
Binary file not shown.
|
|
@ -24,6 +24,7 @@ var pic:PictData;
|
||||||
infile:file;
|
infile:file;
|
||||||
ch:char;
|
ch:char;
|
||||||
stickMan:Sprite;
|
stickMan:Sprite;
|
||||||
|
rocket:Sprite;
|
||||||
|
|
||||||
procedure WaitVSync; external;
|
procedure WaitVSync; external;
|
||||||
|
|
||||||
|
|
@ -80,6 +81,12 @@ begin
|
||||||
aSprite.y := aSprite.y + aSprite.ydelta;
|
aSprite.y := aSprite.y + aSprite.ydelta;
|
||||||
|
|
||||||
if aSprite.x > 608 then aSprite.x := 0;
|
if aSprite.x > 608 then aSprite.x := 0;
|
||||||
|
|
||||||
|
if aSprite.y < 0 then
|
||||||
|
begin
|
||||||
|
aSprite.y := 200;
|
||||||
|
aSprite.x := 0;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
aSprite.frameLeft := frameLeft;
|
aSprite.frameLeft := frameLeft;
|
||||||
end;
|
end;
|
||||||
|
|
@ -87,6 +94,7 @@ end;
|
||||||
procedure animLoop;
|
procedure animLoop;
|
||||||
var i:integer;
|
var i:integer;
|
||||||
oldX,oldY:integer;
|
oldX,oldY:integer;
|
||||||
|
roldX,roldY:integer;
|
||||||
begin
|
begin
|
||||||
stickMan.x := 0;
|
stickMan.x := 0;
|
||||||
stickMan.y := 310;
|
stickMan.y := 310;
|
||||||
|
|
@ -96,26 +104,39 @@ begin
|
||||||
stickMan.xdelta := 2;
|
stickMan.xdelta := 2;
|
||||||
stickMan.ydelta := 0;
|
stickMan.ydelta := 0;
|
||||||
|
|
||||||
oldX := stickMan.x;
|
|
||||||
oldY := stickMan.y;
|
rocket.x := 0;
|
||||||
|
rocket.y := 200;
|
||||||
|
rocket.frameTime := 1;
|
||||||
|
rocket.frameLeft := rocket.frameTime;
|
||||||
|
rocket.curFrame := 0;
|
||||||
|
rocket.xdelta := 2;
|
||||||
|
rocket.ydelta := -1;
|
||||||
|
|
||||||
while not ConAvail do
|
while not ConAvail do
|
||||||
begin
|
begin
|
||||||
oldX := stickMan.x;
|
oldX := stickMan.x;
|
||||||
oldY := stickMan.y;
|
oldY := stickMan.y;
|
||||||
|
|
||||||
|
roldX := rocket.x;
|
||||||
|
roldY := rocket.y;
|
||||||
|
|
||||||
|
PutSprite(roldX, roldY, rocket.frame[rocket.curFrame]);
|
||||||
PutSprite(oldX, oldY, stickMan.frame[stickMan.curFrame]);
|
PutSprite(oldX, oldY, stickMan.frame[stickMan.curFrame]);
|
||||||
|
|
||||||
|
animateSprite(rocket);
|
||||||
animateSprite(stickMan);
|
animateSprite(stickMan);
|
||||||
Delay(10);
|
|
||||||
|
{Delay(1);}
|
||||||
WaitVSync;
|
WaitVSync;
|
||||||
|
|
||||||
UndrawSprite(oldX, oldY, pic.pixeldata);
|
UndrawSprite(oldX, oldY, pic.pixeldata);
|
||||||
|
UndrawSprite(roldX, roldY, pic.pixeldata);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
filename := 'grey.pict';
|
filename := 'background.pict';
|
||||||
open(infile, filename, ModeReadonly);
|
open(infile, filename, ModeReadonly);
|
||||||
read(infile, pic);
|
read(infile, pic);
|
||||||
close(infile);
|
close(infile);
|
||||||
|
|
@ -132,5 +153,12 @@ begin
|
||||||
loadSpriteFrame(stickMan, 3, infile, 3);
|
loadSpriteFrame(stickMan, 3, infile, 3);
|
||||||
close(infile);
|
close(infile);
|
||||||
|
|
||||||
|
open(infile, 'rocket.sprt', ModeReadOnly);
|
||||||
|
loadSpriteFrame(rocket, 0, infile, 0);
|
||||||
|
loadSpriteFrame(rocket, 1, infile, 1);
|
||||||
|
loadSpriteFrame(rocket, 2, infile, 2);
|
||||||
|
loadSpriteFrame(rocket, 3, infile, 3);
|
||||||
|
close(infile);
|
||||||
|
|
||||||
animLoop;
|
animLoop;
|
||||||
end.
|
end.
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,3 +1,7 @@
|
||||||
|
(* This program does not work anymore, because
|
||||||
|
it uses the old sprite routines with 16x16 sprites.
|
||||||
|
It is only included for historical reasons.
|
||||||
|
*)
|
||||||
program XmasAnimation;
|
program XmasAnimation;
|
||||||
uses sprites;
|
uses sprites;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,17 @@ SASM=./sasm
|
||||||
LSYMGEN=./lsymgen
|
LSYMGEN=./lsymgen
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .pas .o
|
.SUFFIXES: .pas .o .s .prog
|
||||||
|
|
||||||
|
.pas.s:
|
||||||
|
$(PCOMP) $<
|
||||||
|
.s.prog:
|
||||||
|
$(SASM) $<
|
||||||
|
|
||||||
.pas:
|
.pas:
|
||||||
fpc -Mobjfpc -gl $<
|
fpc -Mobjfpc -gl $<
|
||||||
|
|
||||||
all: pcomp sasm sdis lsymgen shortgen
|
all: pcomp sasm sdis lsymgen shortgen nativeprogs
|
||||||
|
|
||||||
libs: pcomp sasm lsymgen shortgen
|
libs: pcomp sasm lsymgen shortgen
|
||||||
$(SASM) ../lib/coreloader.s
|
$(SASM) ../lib/coreloader.s
|
||||||
|
|
@ -17,33 +22,23 @@ libs: pcomp sasm lsymgen shortgen
|
||||||
$(SASM) ../lib/stdlibwrap.s ../lib/stdlib.lib
|
$(SASM) ../lib/stdlibwrap.s ../lib/stdlib.lib
|
||||||
$(LSYMGEN) ../lib/stdlibwrap.sym ../lib/stdlib.lsym
|
$(LSYMGEN) ../lib/stdlibwrap.sym ../lib/stdlib.lsym
|
||||||
|
|
||||||
nativecomp: pcomp sasm libs
|
test: sasm.s pcomp.s lsymgen.s shortgen.s
|
||||||
$(PCOMP) sasm.pas
|
|
||||||
$(PCOMP) pcomp.pas
|
|
||||||
$(PCOMP) lsymgen.pas
|
|
||||||
$(PCOMP) shortgen.pas
|
|
||||||
|
|
||||||
nativeprogs: nativecomp
|
testprgs: sasm.prog pcomp.prog lsymgen.prog shortgen.prog
|
||||||
$(PCOMP) ../progs/shell.pas
|
|
||||||
$(PCOMP) ../progs/editor.pas
|
nativecomp: libs pcomp.prog sasm.prog lsymgen.prog shortgen.prog
|
||||||
$(PCOMP) ../progs/reclaim.pas
|
|
||||||
$(PCOMP) ../progs/dumpdir.pas
|
nativeprogs: pcomp ../progs/shell.prog ../progs/editor.prog ../progs/reclaim.prog \
|
||||||
$(PCOMP) ../progs/partmgr.pas
|
../progs/dumpdir.prog ../progs/partmgr.prog ../progs/xfer.prog \
|
||||||
$(PCOMP) ../progs/xfer.pas
|
../progs/recover.prog ../progs/changemem.prog
|
||||||
$(PCOMP) ../progs/recover.pas
|
|
||||||
$(PCOMP) ../progs/changemem.pas
|
|
||||||
$(SASM) ../lib/rommon.s
|
$(SASM) ../lib/rommon.s
|
||||||
$(SASM) -A ../lib/rommon.s ../lib/rom.mem
|
$(SASM) -A ../lib/rommon.s ../lib/rom.mem
|
||||||
|
|
||||||
examples: nativecomp
|
examples: nativecomp ../tests/readtest.prog ../tests/readchartest.prog ../tests/timetest.prog \
|
||||||
$(PCOMP) ../tests/readtest.pas
|
../tests/test133.prog ../tests/cchangetest.prog ../tests/tree.prog
|
||||||
$(PCOMP) ../tests/readchartest.pas
|
|
||||||
$(PCOMP) ../tests/timetest.pas
|
|
||||||
$(PCOMP) ../tests/test133.pas
|
|
||||||
-$(PCOMP) ../examples/chase.pas
|
-$(PCOMP) ../examples/chase.pas
|
||||||
$(PCOMP) ../tests/cchangetest.pas
|
-$(SASM) ../examples/chase.s
|
||||||
$(PCOMP) ../tests/tree.pas
|
|
||||||
-$(MAKE) -C ../rogue -f Makefile.tridoracpu
|
-$(MAKE) -C ../rogue -f Makefile.tridoracpu
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f pcomp sasm sdis libgen lsymgen *.o *.s
|
rm -f pcomp sasm sdis libgen lsymgen *.o *.s *.prog
|
||||||
|
|
|
||||||
|
|
@ -351,9 +351,7 @@
|
||||||
<Runs Version="1" Minor="22">
|
<Runs Version="1" Minor="22">
|
||||||
<Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35ticsg324-1L" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1" ParallelReportGen="true">
|
<Run Id="synth_1" Type="Ft3:Synth" SrcSet="sources_1" Part="xc7a35ticsg324-1L" ConstrsSet="constrs_1" Description="Vivado Synthesis Defaults" AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/synth_1" IncludeInArchive="true" IsChild="false" AutoIncrementalDir="$PSRCDIR/utils_1/imports/synth_1" AutoRQSDir="$PSRCDIR/utils_1/imports/synth_1" ParallelReportGen="true">
|
||||||
<Strategy Version="1" Minor="2">
|
<Strategy Version="1" Minor="2">
|
||||||
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2020">
|
<StratHandle Name="Vivado Synthesis Defaults" Flow="Vivado Synthesis 2020"/>
|
||||||
<Desc>Vivado Synthesis Defaults</Desc>
|
|
||||||
</StratHandle>
|
|
||||||
<Step Id="synth_design"/>
|
<Step Id="synth_design"/>
|
||||||
</Strategy>
|
</Strategy>
|
||||||
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
|
<GeneratedRun Dir="$PRUNDIR" File="gen_run.xml"/>
|
||||||
|
|
@ -373,9 +371,7 @@
|
||||||
</Run>
|
</Run>
|
||||||
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35ticsg324-1L" ConstrsSet="constrs_1" Description="Best predicted directive for place_design." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" LaunchOptions="-jobs 6 " AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1" ParallelReportGen="true">
|
<Run Id="impl_1" Type="Ft2:EntireDesign" Part="xc7a35ticsg324-1L" ConstrsSet="constrs_1" Description="Best predicted directive for place_design." AutoIncrementalCheckpoint="false" WriteIncrSynthDcp="false" State="current" Dir="$PRUNDIR/impl_1" SynthRun="synth_1" IncludeInArchive="true" IsChild="false" GenFullBitstream="true" AutoIncrementalDir="$PSRCDIR/utils_1/imports/impl_1" LaunchOptions="-jobs 6 " AutoRQSDir="$PSRCDIR/utils_1/imports/impl_1" ParallelReportGen="true">
|
||||||
<Strategy Version="1" Minor="2">
|
<Strategy Version="1" Minor="2">
|
||||||
<StratHandle Name="Performance_Auto_1" Flow="Vivado Implementation 2024">
|
<StratHandle Name="Performance_Auto_1" Flow="Vivado Implementation 2024"/>
|
||||||
<Desc>Best predicted directive for place_design.</Desc>
|
|
||||||
</StratHandle>
|
|
||||||
<Step Id="init_design"/>
|
<Step Id="init_design"/>
|
||||||
<Step Id="opt_design">
|
<Step Id="opt_design">
|
||||||
<Option Id="Directive">0</Option>
|
<Option Id="Directive">0</Option>
|
||||||
|
|
|
||||||
BIN
tridoraemu/ADDS-Envoy-620.pict
Normal file
BIN
tridoraemu/ADDS-Envoy-620.pict
Normal file
Binary file not shown.
|
|
@ -31,9 +31,7 @@ def process_pixdata(outfile, pixdata, frameindex = 0, pix_w=640, pix_h=400):
|
||||||
x += 8
|
x += 8
|
||||||
y += 1
|
y += 1
|
||||||
|
|
||||||
|
def write_palette_word(outfile, r, g, b):
|
||||||
def process_palette(outfile, palette):
|
|
||||||
for r,g,b in palette:
|
|
||||||
r4 = r >> 4
|
r4 = r >> 4
|
||||||
g4 = g >> 4
|
g4 = g >> 4
|
||||||
b4 = b >> 4
|
b4 = b >> 4
|
||||||
|
|
@ -42,6 +40,15 @@ def process_palette(outfile, palette):
|
||||||
outfile.write(c12.to_bytes(4, 'big'))
|
outfile.write(c12.to_bytes(4, 'big'))
|
||||||
|
|
||||||
|
|
||||||
|
def process_palette(outfile, palette):
|
||||||
|
if len(palette[0]) == 4:
|
||||||
|
for r,g,b,a in palette:
|
||||||
|
write_palette_word(outfile, r, g, b)
|
||||||
|
else:
|
||||||
|
for r,g,b in palette:
|
||||||
|
write_palette_word(outfile, r, g, b)
|
||||||
|
|
||||||
|
|
||||||
def write_header(outfile):
|
def write_header(outfile):
|
||||||
magic = b'PIct'
|
magic = b'PIct'
|
||||||
mode = 1
|
mode = 1
|
||||||
|
|
|
||||||
|
|
@ -592,9 +592,6 @@ def create_image_with_stuff(imgfile):
|
||||||
|
|
||||||
slotnr = putfile("../examples/rtpair.pas", None , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/rtpair.pas", None , f, part, partstart, slotnr)
|
||||||
|
|
||||||
slotnr = putfile("../examples/5cubes.pas", None , f, part, partstart, slotnr)
|
|
||||||
# slotnr = putfile("../examples/5cubes.prog", None , f, part, partstart, slotnr)
|
|
||||||
|
|
||||||
slotnr = putfile("../examples/3dcube.pas", None , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/3dcube.pas", None , f, part, partstart, slotnr)
|
||||||
|
|
||||||
slotnr = putfile("../examples/conway.pas", None , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/conway.pas", None , f, part, partstart, slotnr)
|
||||||
|
|
@ -604,12 +601,19 @@ def create_image_with_stuff(imgfile):
|
||||||
slotnr = putfile("../examples/lines.pas", None , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/lines.pas", None , f, part, partstart, slotnr)
|
||||||
|
|
||||||
slotnr = putfile("../examples/pictviewer.pas", None , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/pictviewer.pas", None , f, part, partstart, slotnr)
|
||||||
slotnr = putfile("../examples/ara.pict", "ara.pict" , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/Toco_Toucan.pict", None , f, part, partstart, slotnr)
|
||||||
slotnr = putfile("../examples/shinkansen.pict", "shinkansen.pict" , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/shinkansen.pict", None , f, part, partstart, slotnr)
|
||||||
slotnr = putfile("../examples/snow_leopard.pict", "snow_leopard.pict" , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/snow_leopard.pict", None , f, part, partstart, slotnr)
|
||||||
|
|
||||||
slotnr = putfile("../examples/benchmarks.pas", None , f, part, partstart, slotnr)
|
slotnr = putfile("../examples/benchmarks.pas", None , f, part, partstart, slotnr)
|
||||||
|
|
||||||
|
slotnr = putfile("../examples/animate.pas", None , f, part, partstart, slotnr)
|
||||||
|
slotnr = putfile("../examples/sprites.inc", None , f, part, partstart, slotnr)
|
||||||
|
slotnr = putfile("../examples/sprites.s", None , f, part, partstart, slotnr)
|
||||||
|
slotnr = putfile("../examples/background.pict", None , f, part, partstart, slotnr)
|
||||||
|
slotnr = putfile("../examples/Walking.sprt", None , f, part, partstart, slotnr)
|
||||||
|
slotnr = putfile("../examples/rocket.sprt", None , f, part, partstart, slotnr)
|
||||||
|
|
||||||
listdir(f, part)
|
listdir(f, part)
|
||||||
|
|
||||||
part, partstart, slotnr = initfs(f, 5)
|
part, partstart, slotnr = initfs(f, 5)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue