#--------------------------------------------------------------------------
# Object files
-S_OBJS += crc.o \
+S_OBJS += clearram.o \
+ cmpfstring.o \
+ cmpstring.o \
+ copyfstring.o \
+ copystring.o \
+ crc.o \
doublepop.o \
- clearram.o \
+ doublespop.o \
fillram.o \
initram.o \
- movedata.o \
- doublespop.o \
- copystring.o \
- cmpstring.o \
- copyfstring.o \
- cmpfstring.o
+ movedata.o
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "geossym.inc"
_ClearRam:
- jsr DoublePop
- pha
- txa
- pha
- jsr ClearRam
- pla
- tax
- pla
- rts
+ jsr DoublePop
+ pha
+ txa
+ pha
+ jsr ClearRam
+ pla
+ tax
+ pla
+ rts
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "jumptab.inc"
_CmpFString:
- jsr DoubleSPop
- jsr popa
- jsr SetPtrXY
- jsr CmpFString
- bne L1
- jmp return0
-L1: jmp return1
+ jsr DoubleSPop
+ jsr popa
+ jsr SetPtrXY
+ jsr CmpFString
+ bne L1
+ jmp return0
+L1: jmp return1
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "jumptab.inc"
_CmpString:
- jsr DoubleSPop
- jsr CmpString
- bne L1
- jmp return0
-L1: jmp return1
+ jsr DoubleSPop
+ jsr CmpString
+ bne L1
+ jmp return0
+L1: jmp return1
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "jumptab.inc"
_CopyFString:
- jsr DoubleSPop
- jsr popa
- jsr SetPtrXY
- jmp CopyFString
+ jsr DoubleSPop
+ jsr popa
+ jsr SetPtrXY
+ jmp CopyFString
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
_CopyString:
- jsr DoubleSPop
- jmp CopyString
+ jsr DoubleSPop
+ jmp CopyString
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_CRC:
- jsr DoublePop
- jsr CRC
- lda r2L
- ldx r2H
- rts
+ jsr DoublePop
+ jsr CRC
+ lda r2L
+ ldx r2H
+ rts
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
DoublePop:
- sta r0L
- stx r0H
- jsr popax
- sta r1L
- stx r1H
- rts
+ sta r0L
+ stx r0H
+ jsr popax
+ sta r1L
+ stx r1H
+ rts
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "geossym.inc"
DoubleSPop:
- sta ptr4
- stx ptr4+1
- jsr popax
- sta ptr3
- stx ptr3+1
-; rts
+ sta ptr4
+ stx ptr4+1
+ jsr popax
+ sta ptr3
+ stx ptr3+1
+; rts
;
; SetPtrXY can be sometimes executed twice, but even this way it is few cycles
; faster...
SetPtrXY:
- ldx #ptr4
- ldy #ptr3
- rts
+ ldx #ptr4
+ ldy #ptr3
+ rts
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "geossym.inc"
_FillRam:
- sta r0L
- stx r0H
- jsr popa
- sta r2L
- jsr popax
- sta r1L
- stx r1H
- pha
- txa
- pha
- jsr FillRam
- pla
- tax
- pla
- rts
+ sta r0L
+ stx r0H
+ jsr popa
+ sta r2L
+ jsr popax
+ sta r1L
+ stx r1H
+ pha
+ txa
+ pha
+ jsr FillRam
+ pla
+ tax
+ pla
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_InitRam:
- sta r0L
- stx r0H
- jmp InitRam
+ sta r0L
+ stx r0H
+ jmp InitRam
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "geossym.inc"
_MoveData:
- sta r2L
- stx r2H
- jsr popax
- sta r0L
- stx r0H
- jsr popax
- sta r1L
- stx r1H
- jsr MoveData
- lda r1L ; return dest ptr to be compatible with memmove and memcpy
- ldx r1H
- rts
+ sta r2L
+ stx r2H
+ jsr popax
+ sta r0L
+ stx r0H
+ jsr popax
+ sta r1L
+ stx r1H
+ jsr MoveData
+ lda r1L ; return dest ptr to be compatible with memmove and memcpy
+ ldx r1H
+ rts
#--------------------------------------------------------------------------
# Object files
-S_OBJS += domenu.o \
+S_OBJS += doicons.o \
+ domenu.o \
dopreviousmenu.o \
- redomenu.o \
- recovermenu.o \
- recoverallmenus.o \
gotofirstmenu.o \
- doicons.o
+ recoverallmenus.o \
+ recovermenu.o \
+ redomenu.o
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_DoIcons:
- sta r0L
- stx r0H
- jmp DoIcons
\ No newline at end of file
+ sta r0L
+ stx r0H
+ jmp DoIcons
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_DoMenu:
- sta r0L
- stx r0H
- lda #0
- jmp DoMenu
\ No newline at end of file
+ sta r0L
+ stx r0H
+ lda #0
+ jmp DoMenu
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_DoPreviousMenu = DoPreviousMenu
\ No newline at end of file
+_DoPreviousMenu = DoPreviousMenu
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_GotoFirstMenu = GotoFirstMenu
\ No newline at end of file
+_GotoFirstMenu = GotoFirstMenu
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_RecoverMenu = RecoverMenu
\ No newline at end of file
+_RecoverMenu = RecoverMenu
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_ReDoMenu = ReDoMenu
\ No newline at end of file
+_ReDoMenu = ReDoMenu
\ No newline at end of file
#--------------------------------------------------------------------------
# Object files
-S_OBJS += startmousemode.o \
- clearmousemode.o \
- mouseup.o \
- mouseoff.o \
+S_OBJS += clearmousemode.o \
+ disablsprite.o \
drawsprite.o \
- possprite.o \
enablsprite.o \
- disablsprite.o \
- ismseinregion.o \
+ getnextchar.o \
inittextprompt.o \
+ ismseinregion.o \
+ mouseoff.o \
+ mouseup.o \
+ possprite.o \
promptoff.o \
prompton.o \
- getnextchar.o
+ startmousemode.o
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_ClearMouseMode = ClearMouseMode
\ No newline at end of file
+_ClearMouseMode = ClearMouseMode
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_DisablSprite:
- sta r3L
- jmp DisablSprite
\ No newline at end of file
+ sta r3L
+ jmp DisablSprite
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 30.10.99
-;
; void DrawSprite (char spritenum, char *tab63 );
-;
.import popa
.export _DrawSprite
.include "geossym.inc"
_DrawSprite:
-
- sta r4L
- stx r4H
- jsr popa
- sta r3L
- jmp DrawSprite
\ No newline at end of file
+ sta r4L
+ stx r4H
+ jsr popa
+ sta r3L
+ jmp DrawSprite
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_EnablSprite:
- sta r3L
- jmp EnablSprite
\ No newline at end of file
+ sta r3L
+ jmp EnablSprite
\ No newline at end of file
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "jumptab.inc"
_GetNextChar:
- jsr GetNextChar
- ldx #0
- tay ; preserve Z flag
- rts
+ jsr GetNextChar
+ ldx #0
+ tay ; preserve Z flag
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
; char IsMseInRegion (struct window *mywindow);
.import _InitDrawWindow
-
.export _IsMseInRegion
.include "jumptab.inc"
_IsMseInRegion:
- jsr _InitDrawWindow
- jsr IsMseInRegion
- ldx #0
- rts
+ jsr _InitDrawWindow
+ jsr IsMseInRegion
+ ldx #0
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_MouseOff = MouseOff
\ No newline at end of file
+_MouseOff = MouseOff
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_MouseUp = MouseUp
\ No newline at end of file
+_MouseUp = MouseUp
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 30.10.99
-;
; void PosSprite (char spritenum, struct pixel *position );
-;
.importzp ptr4
.import popa
.include "geossym.inc"
_PosSprite:
- sta ptr4
- stx ptr4+1
- ldy #0
- lda (ptr4),y
- sta r4L
- iny
- lda (ptr4),y
- sta r4H
- iny
- lda (ptr4),y
- sta r5L
- jsr popa
- sta r3L
- jmp PosSprite
\ No newline at end of file
+ sta ptr4
+ stx ptr4+1
+ ldy #0
+ lda (ptr4),y
+ sta r4L
+ iny
+ lda (ptr4),y
+ sta r4H
+ iny
+ lda (ptr4),y
+ sta r5L
+ jsr popa
+ sta r3L
+ jmp PosSprite
\ No newline at end of file
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_PromptOff = PromptOff
\ No newline at end of file
+_PromptOff = PromptOff
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_PromptOn:
- sta ptr4
- stx ptr4+1
- ldy #0
-promptLp: lda (ptr4),y
- sta stringX,y
- iny
- cpy #3
- bne promptLp
- jmp PromptOn
\ No newline at end of file
+ sta ptr4
+ stx ptr4+1
+ ldy #0
+promptLp:
+ lda (ptr4),y
+ sta stringX,y
+ iny
+ cpy #3
+ bne promptLp
+ jmp PromptOn
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
_StartMouseMode:
- clc
- jmp StartMouseMode
\ No newline at end of file
+ clc
+ jmp StartMouseMode
\ No newline at end of file
#--------------------------------------------------------------------------
# Object files
-S_OBJS += processinitrestartenable.o \
- processblock.o \
+S_OBJS += processblock.o \
processfreeze.o \
+ processinitrestartenable.o \
processsleep.o
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 27.10.99
-;
; void InitProcesses (char number, struct process* proctab);
; (rest)
; void BlockProcess (char number);
; void UnBlockProcess (char number);
-;
.export _BlockProcess
.export _UnBlockProcess
.include "jumptab.inc"
_BlockProcess:
- tax
- jmp BlockProcess
+ tax
+ jmp BlockProcess
_UnBlockProcess:
- tax
- jmp UnBlockProcess
+ tax
+ jmp UnBlockProcess
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 27.10.99
-;
; void FreezeProcess (char number);
; void UnFreezeProcess (char number);
-;
.export _FreezeProcess
.export _UnFreezeProcess
.include "jumptab.inc"
_FreezeProcess:
- tax
- jmp FreezeProcess
+ tax
+ jmp FreezeProcess
_UnFreezeProcess:
- tax
- jmp UnFreezeProcess
+ tax
+ jmp UnFreezeProcess
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 27.10.99
-;
; void InitProcesses (char number, struct process* proctab);
; void RestartProcess (char number);
; void EnableProcess (char number);
-;
.import popa
.export _InitProcesses
.include "geossym.inc"
_InitProcesses:
-
- sta r0L
- stx r0H
- jsr popa
- jmp InitProcesses
+ sta r0L
+ stx r0H
+ jsr popa
+ jmp InitProcesses
_RestartProcess:
- tax
- jmp RestartProcess
+ tax
+ jmp RestartProcess
_EnableProcess:
- tax
- jmp EnableProcess
+ tax
+ jmp EnableProcess
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
; 30.10.99, 15.8.2003
-;
; void Sleep (int jiffies);
-;
+ .importzp ptr1
+ .importzp tmp1
.export _Sleep
.include "jumptab.inc"
.include "geossym.inc"
- .importzp ptr1
- .importzp tmp1
_SleepExit:
- jsr Sleep ; call Sleep
- ldx tmp1
- txs ; restore stack pointer
- jmp (ptr1) ; when timeouts control will reach here
+ jsr Sleep ; call Sleep
+ ldx tmp1
+ txs ; restore stack pointer
+ jmp (ptr1) ; when timeouts control will reach here
_Sleep:
- sta r0L ; store data
- stx r0H
- pla
- sta ptr1
- pla
- sta ptr1+1 ; preserve return address
- inc ptr1
- bne @L0
- inc ptr1+1 ; fix return address
-@L0: tsx
- stx tmp1 ; preserve stack pointer
- jsr _SleepExit ; call Sleep
- jmp MainLoop ; immediate return here - go to idle loop
+ sta r0L ; store data
+ stx r0H
+ pla
+ sta ptr1
+ pla
+ sta ptr1+1 ; preserve return address
+ inc ptr1
+ bne @L0
+ inc ptr1+1 ; fix return address
+@L0: tsx
+ stx tmp1 ; preserve stack pointer
+ jsr _SleepExit ; call Sleep
+ jmp MainLoop ; immediate return here - go to idle loop