~rabbits/dexe

4e40e53d4ed84f44b8ab46e95056ebd95e7876ba — neauoire 10 months ago 1175fb3
Use drifblim
2 files changed, 46 insertions(+), 39 deletions(-)

M build.sh
M src/dexe.tal
M build.sh => build.sh +10 -3
@@ 1,15 1,16 @@
#!/bin/sh -e

ASM="uxnasm"
ASM="uxncli $HOME/roms/drifblim.rom"
EMU="uxnemu"
LIN="uxncli $HOME/roms/uxnlin.rom"
APP="$HOME/Applications/butler push"

SRC="src/dexe.tal"
DST="bin/dexe.rom"

CPY="$HOME/roms"
ETC="src/manifest.tal"
ARG=""
APPID="hundredrabbits/dexe:uxn"

echo ">> Cleaning"
rm -rf bin


@@ 18,7 19,7 @@ mkdir bin
if [[ "$*" == *"--lint"* ]]
then
    echo ">> Linting $SRC"
	$LIN $SRC $ETC
	$LIN $SRC
fi

echo ">> Assembling $SRC"


@@ 30,5 31,11 @@ then
	cp $DST $CPY
fi

if [[ "$*" == *"--push"* ]]
then
    echo ">> Pushing $DST"
	$APP $DST $APPID
fi

echo ">> Running $DST"
$EMU $DST $ARG

M src/dexe.tal => src/dexe.tal +36 -36
@@ 400,9 400,9 @@ BRK
		INC2 GTH2k ,&loop JCN
	POP2 POP2
	;draw-table JSR2
	;draw-bitpad JSR2
	;draw-bitpad ( .. )

JMP2r
JMP2
	&operation $2

@do-inc ( byte -- byte ) INC JMP2r


@@ 438,9 438,9 @@ JMP2r
		INC2 GTH2k ,&loop JCN
	POP2 POP2 POPr
	#01 .state/changed STZ
	;redraw JSR2
	;redraw ( .. )

JMP2r
JMP2

@select ( id* -- )



@@ 468,9 468,9 @@ JMP2r
		.selection/from LDZ2 .selection/to STZ2
		&not-before
	;follow-selection JSR2
	;redraw JSR2
	;redraw ( .. )

JMP2r
JMP2

@follow-selection ( -- )



@@ 485,9 485,9 @@ JMP2r

	&down
		.selection/to LDZ2 [ .frame/rows LDZ2 #30 SFT2 ] SUB2 #0008 ADD2 
			;data SUB2 #03 SFT2 ;set-scroll JSR2
			;data SUB2 #03 SFT2 ;set-scroll ( .. )

JMP2r
JMP2

@set-scroll ( scroll* -- )



@@ 503,9 503,9 @@ JMP2r
		&changed
	.selection/mode STZ
	#00 .selection/nibble STZ
	;draw-options JSR2
	;draw-options ( .. )

JMP2r
JMP2

@get-bounds ( -- addr* )



@@ 517,9 517,9 @@ JMP2r

	.selection/from LDZ2 .selection/to STZ2
	#00 .selection/nibble STZ
	;redraw JSR2
	;redraw ( .. )

JMP2r
JMP2

@is-selected ( id* -- flag )



@@ 550,9 550,9 @@ JMP2r
	POP2 POP2

	.length LDZ2 #0001 SUB2 .length STZ2
	;redraw JSR2
	;redraw ( .. )

JMP2r
JMP2

@memsftr ( addr* -- )



@@ 564,9 564,9 @@ JMP2r
	POP2 POP2

	.length LDZ2 INC2 .length STZ2
	;redraw JSR2
	;redraw ( .. )

JMP2r
JMP2

(
@|drawing )


@@ 605,9 605,9 @@ JMP2r
		STH2r ,draw-row JSR
		INC2 GTH2k ,&loop JCN
	POP2 POP2
	;draw-asm JSR2
	;draw-asm ( .. )

JMP2r
JMP2

@draw-row ( y* id* -- )



@@ 643,9 643,9 @@ JMP2r
	.tile-frame/x LDZ2
	.Screen/y DEI2
	;&row LDA2 #01
		;draw-tile JSR2
		;draw-tile ( .. )

JMP2r
JMP2
	&y $2 &row $2

@get-byte-color ( id* )


@@ 748,9 748,9 @@ JMP2r
	;make-icn #01 ;draw-sprite JSR2
	;load-icn #01 ;draw-sprite JSR2
	.Screen/x DEI2k #0008 ADD2 ROT DEO2
	;save-icn #01 .state/changed LDZ ADD ;draw-sprite JSR2
	;save-icn #01 .state/changed LDZ ADD ;draw-sprite ( .. )

JMP2r
JMP2

@draw-bitpad ( -- )



@@ 786,9 786,9 @@ JMP2r
		DUP2 ;slen JSR2 #0014 GTH2 #00 SWP
		;filepath ;slen JSR2 #0014 SUB2 MUL2 ADD2
	ROT
		;draw-string JSR2
		;draw-string ( .. )

JMP2r
JMP2

@draw-opcode ( byte color -- )



@@ 813,9 813,9 @@ JMP2r
	POPr
	&fill
	;&fill-end .asm-frame/x2 LDZ2 .Screen/x DEI2 #0008 SUB2 SUB2 #03 SFT2 SUB2
		#03 ;draw-string JSR2
		#03 ;draw-string ( .. )

JMP2r
JMP2
	&unused 
		NIP ;&unknown-txt ROT ;draw-string JSR2
	JMP2r


@@ 914,15 914,15 @@ JMP2r
	#0000 ;set-scroll JSR2
	#0008 .length STZ2
	#00 .state/changed STZ
	;redraw JSR2
	;redraw ( .. )

JMP2r
JMP2

@file-rename ( -- )

	;trap JSR2
	;trap ( .. )

JMP2r
JMP2

@file-open ( -- )



@@ 935,9 935,9 @@ JMP2r
	;data .File/read DEO2
	.File/success DEI2 #0001 [ GTH2k JMP SWP2 POP2 ] .length STZ2
	#00 .state/changed STZ
	;move-reset JSR2
	;move-reset ( .. )

JMP2r
JMP2

@file-save ( -- )



@@ 945,9 945,9 @@ JMP2r
	.length LDZ2 .File/length DEO2
	;data .File/write DEO2
	#00 .state/changed STZ
	;redraw JSR2
	;redraw ( .. )

JMP2r
JMP2

( snarf )



@@ 993,9 993,9 @@ JMP2r
	;snarf-txt .File/name DEO2
	.length LDZ2 .selection/from LDZ2 ;data SUB2 SUB2 .File/length DEO2
	.selection/from LDZ2 .File/read DEO2
	;redraw JSR2
	;redraw ( .. )

JMP2r
JMP2

@move-up ( -- ) .selection/from LDZ2 #0008 SUB2 ;select JSR2 JMP2r
@move-down ( -- ) .selection/from LDZ2 #0008 ADD2 ;select JSR2 JMP2r