mirror of
https://github.com/thelbane/ConwayII.git
synced 2025-08-09 10:25:15 +00:00
Remove utilities.asm
This commit is contained in:
@@ -1,69 +0,0 @@
|
|||||||
printline subroutine
|
|
||||||
tsx
|
|
||||||
inx
|
|
||||||
lda STACK,x
|
|
||||||
sta ZPA0
|
|
||||||
lda STACK+1,x
|
|
||||||
sta ZPA1
|
|
||||||
.loop
|
|
||||||
inc ZPA0
|
|
||||||
bne .cont
|
|
||||||
inc ZPA1
|
|
||||||
.cont
|
|
||||||
ldy #0
|
|
||||||
lda (ZPA0),y
|
|
||||||
beq .cleanup
|
|
||||||
ora #%10000000
|
|
||||||
jsr COUT
|
|
||||||
bne .loop
|
|
||||||
.cleanup
|
|
||||||
lda ZPA0
|
|
||||||
sta STACK,x
|
|
||||||
.end
|
|
||||||
lda ZPA1
|
|
||||||
sta STACK+1,x
|
|
||||||
rts
|
|
||||||
|
|
||||||
rand subroutine
|
|
||||||
jsr rand64k ;Factors of 65535: 3 5 17 257
|
|
||||||
jsr rand32k ;Factors of 32767: 7 31 151 are independent and can be combined
|
|
||||||
lda sr1+1 ;can be left out
|
|
||||||
eor sr2+1 ;if you dont use
|
|
||||||
tay ;y as suggested
|
|
||||||
lda sr1 ;mix up lowbytes of SR1
|
|
||||||
eor sr2 ;and SR2 to combine both
|
|
||||||
rts
|
|
||||||
|
|
||||||
;periode with 65535
|
|
||||||
;10+12+13+15
|
|
||||||
rand64k subroutine
|
|
||||||
lda sr1+1
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
eor sr1+1
|
|
||||||
asl
|
|
||||||
eor sr1+1
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
eor sr1+1
|
|
||||||
asl
|
|
||||||
rol sr1 ;shift this left, "random" bit comes from low
|
|
||||||
rol sr1+1
|
|
||||||
rts
|
|
||||||
|
|
||||||
;periode with 32767
|
|
||||||
;13+14
|
|
||||||
rand32k subroutine
|
|
||||||
lda sr2+1
|
|
||||||
asl
|
|
||||||
eor sr2+1
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
ror sr2 ;shift this right, random bit comes from high - nicer when eor with sr1
|
|
||||||
rol sr2+1
|
|
||||||
rts
|
|
||||||
|
|
||||||
;feel free to set seeds as wished, if put in zeropage some speed-boost is
|
|
||||||
;the result. For example sr1=$5c sr2=5e would fit
|
|
||||||
sr1 dc.w $a55a
|
|
||||||
sr2 dc.w $7653
|
|
2
makefile
2
makefile
@@ -9,7 +9,7 @@ _SRC = $(TARGET).asm
|
|||||||
SRC = $(patsubst %,$(SDIR)/%,$(_SRC))
|
SRC = $(patsubst %,$(SDIR)/%,$(_SRC))
|
||||||
|
|
||||||
IDIR = ./include
|
IDIR = ./include
|
||||||
_DEPS = apple2.asm macros.asm utilities.asm
|
_DEPS = apple2.asm macros.asm
|
||||||
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
|
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
|
||||||
|
|
||||||
BDIR = ./build
|
BDIR = ./build
|
||||||
|
@@ -408,12 +408,6 @@ rulesTable dc.b charOff ;0 neighbors
|
|||||||
dc.b charOff ;7
|
dc.b charOff ;7
|
||||||
dc.b charOff ;8
|
dc.b charOff ;8
|
||||||
|
|
||||||
; ------------------------------------
|
|
||||||
; Utilities
|
|
||||||
; ------------------------------------
|
|
||||||
|
|
||||||
include "utilities.asm"
|
|
||||||
|
|
||||||
; ------------------------------------
|
; ------------------------------------
|
||||||
; Tables
|
; Tables
|
||||||
; ------------------------------------
|
; ------------------------------------
|
||||||
|
Reference in New Issue
Block a user