cputc.o \
kbhit.o \
mouse.o \
+ randomize.o \
readjoy.o \
rs232.o \
tgi_mode_table.o\
ST = $90 ; IEC status byte
+TIME = $A0 ; 60HZ clock
FNAM_LEN = $B7 ; Length of filename
SECADR = $B9 ; Secondary address
DEVNUM = $BA ; Device number
--- /dev/null
+;
+; Ullrich von Bassewitz, 05.11.2002
+;
+; void randomize (void);
+; /* Initialize the random number generator */
+;
+
+ .export _randomize
+ .import _srand
+
+ .include "c128.inc"
+
+_randomize:
+ ldx VIC_HLINE ; Use VIC rasterline as high byte
+ lda TIME ; Use 60HZ clock as low byte
+ jmp _srand ; Initialize generator
+
cputc.o \
kbhit.o \
mouse.o \
+ randomize.o \
readjoy.o \
rs232.o \
tgi_mode_table.o \
clean:
@rm -f $(OBJS) $(TGIS:.tgi=.o)
-
+
ST = $90 ; IEC status byte
+TIME = $A0 ; 60 HZ clock
FNAM_LEN = $B7 ; Length of filename
SECADR = $B9 ; Secondary address
DEVNUM = $BA ; Device number
--- /dev/null
+;
+; Ullrich von Bassewitz, 05.11.2002
+;
+; void randomize (void);
+; /* Initialize the random number generator */
+;
+
+ .export _randomize
+ .import _srand
+
+ .include "c64.inc"
+
+_randomize:
+ ldx VIC_HLINE ; Use VIC rasterline as high byte
+ lda TIME ; Use 60HZ clock as low byte
+ jmp _srand ; Initialize generator
+
mouse.o \
peeksys.o \
pokesys.o \
+ randomize.o \
readjoy.o \
rs232.o \
tgi_mode_table.o
--- /dev/null
+;
+; Ullrich von Bassewitz, 05.11.2002
+;
+; void randomize (void);
+; /* Initialize the random number generator */
+;
+
+ .export _randomize
+ .import _srand
+ .importzp time
+
+_randomize:
+ ldx time ; Use 50/60HZ clock
+ lda time+1
+ jmp _srand ; Initialize generator
+
kudtim.o \
peeksys.o \
pokesys.o \
+ randomize.o \
rs232.o
all: $(OBJS)
--- /dev/null
+;
+; Ullrich von Bassewitz, 05.11.2002
+;
+; void randomize (void);
+; /* Initialize the random number generator */
+;
+
+ .export _randomize
+ .import _srand
+ .importzp time
+
+_randomize:
+ ldx time ; Use 50/60HZ clock
+ lda time+1
+ jmp _srand ; Initialize generator
+
conio.o \
cputc.o \
crt0.o \
- kbhit.o
+ kbhit.o \
+ randomize.o
all: $(OBJS)
; ---------------------------------------------------------------------------
; Zero page, Commodore stuff
+TIME = $8D ; 60HZ clock
MEMSIZE = $34 ; Size of memory installed
ST = $96 ; IEC status byte
SECADR = $D3 ; Secondary address
--- /dev/null
+;
+; Ullrich von Bassewitz, 05.11.2002
+;
+; void randomize (void);
+; /* Initialize the random number generator */
+;
+
+ .export _randomize
+ .import _srand
+
+ .include "pet.inc"
+
+_randomize:
+ ldx TIME
+ lda TIME+1 ; Use 60HZ clock
+ jmp _srand ; Initialize generator
+
cputc.o \
crt0.o \
kbhit.o \
+ randomize.o \
readjoy.o \
tgi_mode_table.o
ST = $90 ; IEC status byte
+TIME = $A3 ; 60HZ clock
FNAM_LEN = $AB ; Length of filename
SECADR = $AD ; Secondary address
DEVNUM = $AE ; Device number
--- /dev/null
+;
+; Ullrich von Bassewitz, 05.11.2002
+;
+; void randomize (void);
+; /* Initialize the random number generator */
+;
+
+ .export _randomize
+ .import _srand
+
+ .include "plus4.inc"
+
+_randomize:
+ ldx TED_VLINELO ; Use TED rasterline as high byte
+ lda TIME ; Use 60HZ clock as low byte
+ jmp _srand ; Initialize generator
+
conio.o \
cputc.o \
kbhit.o \
+ randomize.o \
readjoy.o \
write.o
--- /dev/null
+;
+; Ullrich von Bassewitz, 05.11.2002
+;
+; void randomize (void);
+; /* Initialize the random number generator */
+;
+
+ .export _randomize
+ .import _srand
+
+ .include "vic20.inc"
+
+_randomize:
+ lda VIC_LINES ; Get overflow bit
+ asl a ; Shift bit 7 into carry
+ lda VIC_HLINE ; Get bit 1-8 of rasterline
+ rol a ; Use bit 0-7
+ tax ; Use VIC rasterline as high byte
+ lda TIME ; Use 60HZ clock as low byte
+ jmp _srand ; Initialize generator
+
ST = $90 ; IEC status byte
+TIME = $A0 ; 60HZ clock
FNAM_LEN = $B7 ; Length of filename
SECADR = $B9 ; Secondary address
DEVNUM = $BA ; Device number
; Kernal routines
; Direct entries
-CLRSCR = $E55F
-KBDREAD = $E5CF
+CLRSCR = $E55F
+KBDREAD = $E5CF
NAMED_OPEN = $F495
-NAMED_CLOSE = $F6DA
+NAMED_CLOSE = $F6DA
PLOTCHAR = $EAAA ; Char in A, color in X
; ---------------------------------------------------------------------------
; ---------------------------------------------------------------------------
; I/O: 6560 VIC
-VIC = $9000
-VIC_COLOR = $900F
+VIC = $9000
+VIC_LINES = $9003 ; Screen lines, bit 7 is bit 0 from VIC_HLINE
+VIC_HLINE = $9004 ; Rasterline, bits 1-8
+VIC_COLOR = $900F ; Border and background color
; ---------------------------------------------------------------------------
; I/O: 6522 VIA1