sim65 cycles 32-bit range fix

long is 64-bit on some platforms, making this inconsistent, added range check to catch overflow.
reduced tests requesting 5 billion cycles to 2^32-1 so they can fun on 32-bit long sim65.
This commit is contained in:
bbbradsmith
2023-05-05 21:45:57 -04:00
parent a325c95652
commit f2e7609046
4 changed files with 11 additions and 3 deletions

View File

@@ -22,7 +22,8 @@ ifdef QUIET
NULLERR = 2>$(NULLDEV)
endif
SIM65FLAGS = -x 5000000000
# sim65 can support 64-bit cycle counts on some platforms, but not all. This must fit in 32-bit.
SIM65FLAGS = -x 4294967295
CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65)
LD65 := $(if $(wildcard ../../../bin/ld65*),..$S..$S..$Sbin$Sld65,ld65)