-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.export gettrse
.importzp ptr4
+
gettrse:
- sta ptr4
- stx ptr4+1
- ldy #1
- lda (ptr4),y
- tax
- dey
- lda (ptr4),y
- rts
+ sta ptr4
+ stx ptr4+1
+ ldy #1
+ lda (ptr4),y
+ tax
+ dey
+ lda (ptr4),y
+ rts
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
C_OBJS += messagebox.o
-S_OBJS += dodlgbox.o \
- rstrfrmdialogue.o \
- dbget2lines.o \
- dlgboxyesno.o \
- dlgboxokcancel.o \
- dlgboxok.o \
+S_OBJS += dbget2lines.o \
dlgboxgetstring.o \
- dlgboxfileselect.o
+ dlgboxfileselect.o \
+ dlgboxok.o \
+ dlgboxokcancel.o \
+ dlgboxyesno.o \
+ dodlgbox.o \
+ rstrfrmdialogue.o
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.code
DB_get2lines:
- sta ptr4 ; fetch line 2
- stx ptr4+1
- jsr popax
- sta ptr3 ; fetch line 1
- stx ptr3+1
- ldx #ptr3
- jsr checknull
- ldx #ptr4
- jmp checknull
+ sta ptr4 ; fetch line 2
+ stx ptr4+1
+ jsr popax
+ sta ptr3 ; fetch line 1
+ stx ptr3+1
+ ldx #ptr3
+ jsr checknull
+ ldx #ptr4
+ jmp checknull
checknull:
- lda $0,x
- ora $1,x
- bne cn_end
- lda #<nullstring
- sta $0,x
- lda #>nullstring
- sta $1,x
-cn_end: rts
+ lda $0,x
+ ora $1,x
+ bne cn_end
+ lda #<nullstring
+ sta $0,x
+ lda #>nullstring
+ sta $1,x
+cn_end: rts
.rodata
nullstring:
- .byte 0
+ .byte 0
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.code
_DlgBoxFileSelect:
-
- sta tmp_r5
- stx tmp_r5+1
- jsr popa
- sta tmp_r7L
- jsr popax
- sta tmp_r10
- stx tmp_r10+1
+ sta tmp_r5
+ stx tmp_r5+1
+ jsr popa
+ sta tmp_r7L
+ jsr popax
+ sta tmp_r10
+ stx tmp_r10+1
DB_FS_reload:
- MoveW tmp_r5, r5
- MoveW tmp_r10, r10
- MoveB tmp_r7L, r7L
-
- lda #<paramStrFileSelect
- ldx #>paramStrFileSelect
- jsr _DoDlgBox
- cmp #DISK
- bne DB_FS_Fin
- jsr OpenDisk
- txa
- beq DB_FS_reload
-DB_FS_Fin: rts
+ MoveW tmp_r5, r5
+ MoveW tmp_r10, r10
+ MoveB tmp_r7L, r7L
+
+ lda #<paramStrFileSelect
+ ldx #>paramStrFileSelect
+ jsr _DoDlgBox
+ cmp #DISK
+ bne DB_FS_Fin
+ jsr OpenDisk
+ txa
+ beq DB_FS_reload
+DB_FS_Fin:
+ rts
.rodata
paramStrFileSelect:
- .byte DEF_DB_POS | 1
- .byte DBGETFILES, 4, 4
- .byte OPEN, DBI_X_2, DBI_Y_0+16
- .byte DISK, DBI_X_2, DBI_Y_0+32+1
- .byte CANCEL, DBI_X_2, DBI_Y_0+64+3
- .byte NULL
+ .byte DEF_DB_POS | 1
+ .byte DBGETFILES, 4, 4
+ .byte OPEN, DBI_X_2, DBI_Y_0+16
+ .byte DISK, DBI_X_2, DBI_Y_0+32+1
+ .byte CANCEL, DBI_X_2, DBI_Y_0+64+3
+ .byte NULL
.bss
-tmp_r5: .res 2
-tmp_r7L: .res 1
-tmp_r10: .res 2
+tmp_r5:
+ .res 2
+tmp_r7L:
+ .res 1
+tmp_r10:
+ .res 2
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.code
_DlgBoxGetString:
- jsr DB_get2lines
- jsr popa
- sta DB_strlen
- jsr popax
- sta ptr2
- stx ptr2+1
- lda #<paramStrGetString
- ldx #>paramStrGetString
- jmp _DoDlgBox
+ jsr DB_get2lines
+ jsr popa
+ sta DB_strlen
+ jsr popax
+ sta ptr2
+ stx ptr2+1
+ lda #<paramStrGetString
+ ldx #>paramStrGetString
+ jmp _DoDlgBox
.data
paramStrGetString:
- .byte DEF_DB_POS | 1
- .byte DBVARSTR, TXT_LN_X, TXT_LN_1_Y, ptr3
- .byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr4
- .byte DBGETSTRING, TXT_LN_X, TXT_LN_3_Y, ptr2
-DB_strlen: .byte 17
- .byte CANCEL, DBI_X_2, DBI_Y_2
- .byte NULL
+ .byte DEF_DB_POS | 1
+ .byte DBVARSTR, TXT_LN_X, TXT_LN_1_Y, ptr3
+ .byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr4
+ .byte DBGETSTRING, TXT_LN_X, TXT_LN_3_Y, ptr2
+DB_strlen:
+ .byte 17
+ .byte CANCEL, DBI_X_2, DBI_Y_2
+ .byte NULL
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.code
_DlgBoxOk:
- jsr DB_get2lines
- lda #<paramStrOk
- ldx #>paramStrOk
- jmp _DoDlgBox
+ jsr DB_get2lines
+ lda #<paramStrOk
+ ldx #>paramStrOk
+ jmp _DoDlgBox
.rodata
paramStrOk:
- .byte DEF_DB_POS | 1
- .byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
- .byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
- .byte OK, DBI_X_0, DBI_Y_2
- .byte NULL
+ .byte DEF_DB_POS | 1
+ .byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
+ .byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
+ .byte OK, DBI_X_0, DBI_Y_2
+ .byte NULL
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.code
_DlgBoxOkCancel:
- jsr DB_get2lines
- lda #<paramStrOkCancel
- ldx #>paramStrOkCancel
- jmp _DoDlgBox
+ jsr DB_get2lines
+ lda #<paramStrOkCancel
+ ldx #>paramStrOkCancel
+ jmp _DoDlgBox
.rodata
paramStrOkCancel:
- .byte DEF_DB_POS | 1
- .byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
- .byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
- .byte OK, DBI_X_0, DBI_Y_2
- .byte CANCEL, DBI_X_2, DBI_Y_2
- .byte NULL
+ .byte DEF_DB_POS | 1
+ .byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
+ .byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
+ .byte OK, DBI_X_0, DBI_Y_2
+ .byte CANCEL, DBI_X_2, DBI_Y_2
+ .byte NULL
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.code
_DlgBoxYesNo:
- jsr DB_get2lines
- lda #<paramStrYesNo
- ldx #>paramStrYesNo
- jmp _DoDlgBox
+ jsr DB_get2lines
+ lda #<paramStrYesNo
+ ldx #>paramStrYesNo
+ jmp _DoDlgBox
.rodata
paramStrYesNo:
- .byte DEF_DB_POS | 1
- .byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
- .byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
- .byte YES, DBI_X_0, DBI_Y_2
- .byte NO, DBI_X_2, DBI_Y_2
- .byte NULL
+ .byte DEF_DB_POS | 1
+ .byte DBVARSTR, TXT_LN_X, TXT_LN_2_Y, ptr3
+ .byte DBVARSTR, TXT_LN_X, TXT_LN_3_Y, ptr4
+ .byte YES, DBI_X_0, DBI_Y_2
+ .byte NO, DBI_X_2, DBI_Y_2
+ .byte NULL
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "geossym.inc"
_DoDlgBox:
- sta r0L
- stx r0H
- jsr DoDlgBox
- ldx #0
- lda r0L
- rts
+ sta r0L
+ stx r0H
+ jsr DoDlgBox
+ ldx #0
+ lda r0L
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_RstrFrmDialogue = RstrFrmDialogue
+_RstrFrmDialogue = RstrFrmDialogue
#--------------------------------------------------------------------------
# Object files
-S_OBJS += get1stdirentry.o \
- getnxtdirentry.o \
- openrecordfile.o \
+S_OBJS += appendrecord.o \
closerecordfile.o \
- nextrecord.o \
- previousrecord.o \
- pointrecord.o \
+ deletefile.o \
deleterecord.o \
- insertrecord.o \
- appendrecord.o \
- readrecord.o \
- writerecord.o \
- updaterecordfile.o \
findfile.o \
+ findftypes.o \
+ freefile.o \
+ get1stdirentry.o \
getfhdrinfo.o \
+ getfile.o \
+ getnxtdirentry.o \
+ insertrecord.o \
+ nextrecord.o \
+ openrecordfile.o \
+ previousrecord.o \
+ pointrecord.o \
+ readbyte.o \
readfile.o \
- savefile.o \
- freefile.o \
- deletefile.o \
+ readrecord.o \
renamefile.o \
- findftypes.o \
- readbyte.o \
- getfile.o \
+ savefile.o \
sysremove.o \
- sysrename.o
+ sysrename.o \
+ writerecord.o \
+ updaterecordfile.o
\ No newline at end of file
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.bss
-tmpFileMax: .res 1
+tmpFileMax:
+ .res 1
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
#--------------------------------------------------------------------------
# Object files
-S_OBJS += drawline.o \
+S_OBJS += bitmapclip.o \
+ bitmapregs.o \
+ bitmapup.o \
+ bitotherclip.o \
+ drawline.o \
drawpoint.o \
framerectangle.o \
+ getcharwidth.o \
+ getintcharint.o \
+ graphicsstring.o \
hlineregs.o \
horizontalline.o \
imprintrectangle.o \
+ initdrawwindow.o \
invertline.o \
invertrectangle.o \
+ loadcharset.o \
pointregs.o \
+ put_char.o \
+ putdecimal.o \
+ putstring.o \
recoverline.o \
recoverrectangle.o \
rectangle.o \
- initdrawwindow.o \
setpattern.o \
testpoint.o \
- verticalline.o \
- put_char.o \
- putdecimal.o \
- putstring.o \
usesystemfont.o \
- getcharwidth.o \
- loadcharset.o \
- bitmapup.o \
- bitmapregs.o \
- bitmapclip.o \
- bitotherclip.o \
- graphicsstring.o \
- getintcharint.o
+ verticalline.o \
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_BitmapClip:
- jsr BitmapRegs
- jsr popax
- sta r12L
- stx r12H
- jsr popa
- sta r11H
- jsr popa
- sta r11L
- jmp BitmapClip
+ jsr BitmapRegs
+ jsr popax
+ sta r12L
+ stx r12H
+ jsr popa
+ sta r11H
+ jsr popa
+ sta r11L
+ jmp BitmapClip
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 21.12.99
.importzp ptr4
-
.export BitmapRegs
.include "geossym.inc"
-BitmapRegs: ;a/x is a struct iconpic*
- sta ptr4
- stx ptr4+1
- ldy #0
-bmpLp: lda (ptr4),y
- sta r0L,y
- iny
- cpy #6
- bne bmpLp
- rts
+BitmapRegs: ; a/x is a struct iconpic*
+ sta ptr4
+ stx ptr4+1
+ ldy #0
+bmpLp: lda (ptr4),y
+ sta r0L,y
+ iny
+ cpy #6
+ bne bmpLp
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; void BitmapUp (struct iconpic *myGfx);
-
.import BitmapRegs
.export _BitmapUp
.include "jumptab.inc"
_BitmapUp:
- jsr BitmapRegs
- jmp BitmapUp
+ jsr BitmapRegs
+ jmp BitmapUp
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_BitOtherClip:
- jsr BitOtherRegs
- jsr popax
- sta r12L
- stx r12H
- jsr popa
- sta r11H
- jsr popa
- sta r11L
- jsr popax
- sta r14L
- stx r14H
- jsr popax
- sta r13L
- stx r13H
- jmp BitOtherClip
+ jsr BitOtherRegs
+ jsr popax
+ sta r12L
+ stx r12H
+ jsr popa
+ sta r11H
+ jsr popa
+ sta r11L
+ jsr popax
+ sta r14L
+ stx r14H
+ jsr popax
+ sta r13L
+ stx r13H
+ jmp BitOtherClip
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "geosmac.ca65.inc"
_DrawLine:
- tay
- PushW r2
- tya
- jsr _InitDrawWindow
- MoveW r2, r11
- PopW r2
- jsr popa
- sta tmp1
- clc
- bit tmp1
- bvc @1
- sec
-@1: jmp DrawLine
+ tay
+ PushW r2
+ tya
+ jsr _InitDrawWindow
+ MoveW r2, r11
+ PopW r2
+ jsr popa
+ sta tmp1
+ clc
+ bit tmp1
+ bvc @1
+ sec
+@1: jmp DrawLine
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
; void DrawPoint (char mode, struct pixel *mypixel);
-
.import PointRegs
.import popa
.importzp tmp1
.include "jumptab.inc"
_DrawPoint:
- jsr PointRegs
- jsr popa
- sta tmp1
- clc
- bit tmp1
- bvc @1
- sec
-@1: jmp DrawPoint
+ jsr PointRegs
+ jsr popa
+ sta tmp1
+ clc
+ bit tmp1
+ bvc @1
+ sec
+@1: jmp DrawPoint
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_FrameRectangle = FrameRectangle
+_FrameRectangle = FrameRectangle
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "jumptab.inc"
_GetCharWidth:
- jsr GetCharWidth
- ldx #0
- rts
+ jsr GetCharWidth
+ ldx #0
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
getintcharint:
- sta r11L
- stx r11H
- jsr popa
- sta r1H
- jsr popax
- sta r0L
- stx r0H
- rts
+ sta r11L
+ stx r11H
+ jsr popa
+ sta r1H
+ jsr popax
+ sta r0L
+ stx r0H
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_GraphicsString:
- sta r0L
- stx r0H
- jmp GraphicsString
+ sta r0L
+ stx r0H
+ jmp GraphicsString
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.import popax, popa
-
.export HLineRegs
.include "geossym.inc"
HLineRegs:
- stx r4H
- sta r4L
- jsr popax
- stx r3H
- sta r3L
- jsr popa
- sta r11L
- rts
+ stx r4H
+ sta r4L
+ jsr popax
+ stx r3H
+ sta r3L
+ jsr popa
+ sta r11L
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.import popa
.import HLineRegs
-
.export _HorizontalLine
.include "jumptab.inc"
_HorizontalLine:
- jsr HLineRegs
- jsr popa
- jmp HorizontalLine
+ jsr HLineRegs
+ jsr popa
+ jmp HorizontalLine
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; void InitDrawWindow (struct window *myWindow);
.importzp ptr4
-
.export _InitDrawWindow
.include "geossym.inc"
-_InitDrawWindow: ;a/x is a struct window*
- sta ptr4
- stx ptr4+1
- ldy #0
-copyWin: lda (ptr4),y
- sta r2L,y
- iny
- cpy #6
- bne copyWin
- rts
+_InitDrawWindow: ; a/x is a struct window*
+ sta ptr4
+ stx ptr4+1
+ ldy #0
+copyWin:lda (ptr4),y
+ sta r2L,y
+ iny
+ cpy #6
+ bne copyWin
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
_InvertLine:
- jsr HLineRegs
- jmp InvertLine
+ jsr HLineRegs
+ jmp InvertLine
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_LoadCharSet:
- sta r0L
- stx r0H
- jmp LoadCharSet
+ sta r0L
+ stx r0H
+ jmp LoadCharSet
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; 29.10.99
.importzp ptr4
-
.export PointRegs
.include "geossym.inc"
-PointRegs: ;a/x is a struct pixel*
- sta ptr4
- stx ptr4+1
- ldy #0
- lda (ptr4),y
- sta r3L
- iny
- lda (ptr4),y
- sta r3H
- iny
- lda (ptr4),y
- sta r11L
- rts
+PointRegs: ; a/x is a struct pixel*
+ sta ptr4
+ stx ptr4+1
+ ldy #0
+ lda (ptr4),y
+ sta r3L
+ iny
+ lda (ptr4),y
+ sta r3H
+ iny
+ lda (ptr4),y
+ sta r11L
+ rts
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "geossym.inc"
_PutChar:
- sta r11L
- stx r11H
- jsr popa
- sta r1H
- jsr popa
- jmp PutChar
+ sta r11L
+ stx r11H
+ jsr popa
+ sta r1H
+ jsr popa
+ jmp PutChar
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "jumptab.inc"
_PutDecimal:
- jsr getintcharint
- jsr popa
- jmp PutDecimal
+ jsr getintcharint
+ jsr popa
+ jmp PutDecimal
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
_PutString:
- jsr getintcharint
- jmp PutString
+ jsr getintcharint
+ jmp PutString
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; void RecoverLine (char y, int xstart, int xend);
.import HLineRegs
-
.export _RecoverLine
.include "jumptab.inc"
_RecoverLine:
- jsr HLineRegs
- jmp RecoverLine
+ jsr HLineRegs
+ jmp RecoverLine
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_Rectangle = Rectangle
+_Rectangle = Rectangle
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_SetPattern = SetPattern
+_SetPattern = SetPattern
-
;
; Maciej 'YTM/Elysium' Witkowiak
;
.include "jumptab.inc"
_TestPoint:
- jsr PointRegs
- jsr TestPoint
- bcc goFalse
- jmp return1
-goFalse: jmp return0
+ jsr PointRegs
+ jsr TestPoint
+ bcc goFalse
+ jmp return1
+goFalse:jmp return0
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
.include "jumptab.inc"
-_UseSystemFont = UseSystemFont
+_UseSystemFont = UseSystemFont
-
;
; Maciej 'YTM/Alliance' Witkowiak
;
; void VerticalLine (char pattern, char ystart, char yend, int x);
- .import popa
-
+ .import popa
.export _VerticalLine
.include "jumptab.inc"
.include "geossym.inc"
_VerticalLine:
- stx r4H
- sta r4L
- jsr popa
- sta r3H
- jsr popa
- sta r3L
- jsr popa
- jmp VerticalLine
+ stx r4H
+ sta r4L
+ jsr popa
+ sta r3H
+ jsr popa
+ sta r3L
+ jsr popa
+ jmp VerticalLine