Enjoy. Hopefully I'll get around to finishing this, but I don't really want to work on any z80 stuff for a while (at least not until Will on Revsoft releases his Mac IDE).


Code:
.nolist
#include "dcs6.inc"
_clrlcdfull = $4540
_strcpy      =$44E3
_MultAbyE   =$8042
savesscreen = $86ec
_FlashToRam = $5017
MouseMaskLoc = $987e + 16
_memclear    =$4c30   



MouseY   .equ   $989E   
MouseX   .equ   $989F



sk2nd = $36
skAlpha = $30
skMode = $37
skClear = $0f

;null               =$00         ;COMPLETE   XY   [none]
;LargeWin            =$01         ;COMPLETE   --   [5 byte icon, header text]
;SmallWin            =$02         ;COMPLETE   XY   [x,y, 5 byte icon, header text]
;FullScreenImg         =$03         ;COMPLETE   XY   [768 bytes]
;Text               =$04         ;COMPLETE   XY   [x,y,font,z.t. text]
;WinButtons            =$05         ;COMPLETE   --   [which {-,[],X,00000}, onclick[-] {word}, onclick[] {word}, onclick[X] {word}]
;WrappedText         =$06         ;COMPLETE   XY   [x,y,width,font,z.t. text]
;ButtonText            =$07         ;COMPLETE   XY   [x,y,onclick {word},zt text]
;ButtonImg            =$08         ;COMPLETE   XY   [x,y,onclick {word},img width [BYTES],button width [PX], img data (5 rows high)]
;TextLineIn            =$09         ;COMPLETE   XY   [x,y,width,maxchar [word],curdatapos (0 to datalength) [word],data (z.t.)]
;Radio               =$0A         ;COMPLETE   XY   [x,y,group,state {bool},zttext]  1 per group
;Checkbox            =$0B         ;COMPLETE   XY   [x,y,group,state {bool},zttext] ++ per group
;ByteInt            =$0C         ;COMPLETE   XY   [x,y,value,min,max]
;WordInt            =$0D         ;COMPLETE   XY   [x,y,value,min,max]
;Hotspot            =$0E         ;COMPLETE   XY   [x,y,width,height,ptr]
;TextMultiline         =$0F         ;COMPLETE   XY   [x,y,rows,width,curdatapos (0 to datalength) [word],data]
;;Sprite            =$10         ;COMPLETE   XY   [x,y,b,data]
;LargeSprite         =$11         ;COMPLETE   XY   [x,y,a,b,data]
;PassIn               =$12         ;COMPLETE   XY   [x,y,width,maxchar [word],curdatapos (0 to datalength) [word],data (z.t.)]
;ScrollVert            =$13         ;COMPLETE   XY   [x,y,height,ID,per,min [word],max [word],cur [word],onScrollUp,onScrollDown]
;ScrollHoriz         =$14         ;COMPLETE   XY   [x,y,width,ID,per,min [word],max [word],cur [word],onScrollUp,onScrollDown]
;Border               =$15         ;COMPLETE   XY   [x,y,width,height,color]
;Rect               =$16         ;COMPLETE   XY   [x,y,width,height,fill]
;Custom               =$17         ;COMPLETE   --   [ptr_to_routine]
;MouseCursor         =$18         ;COMPLETE   --  [xy,xy,8-byte mask,8-byte sprite]
;MouseClick            =$19      
varmem  = $98F2

.list
   .org progstart
   .db $BB,$6D
INIT:
   xor d
   .db $C9
   jr Start
   .dw $0000
   .db $06,$00
   .dw Icon
   .dw $0000
   .dw Apstart         ;the routine to open files.  DCS will start you here instead of at $9D95
                  ;if a file is pending
   .db $31,$7F         ;argh, this be an APMain
   .db $01            ;number of accepted filetypes
filetype:
   .db $00,$01,$03         ;iPaint files
Icon:
   .db $0F,$F2,$68,$17,$63,$07,$06,$8B,$F7,$97,$F3,$27,$60,$4E,$60,$4E
   .db $60,$EC,$69,$79,$7A,$C1,$35,$81,$0B,$01,$16,$01,$2C,$03,$59,$FE

IconAP:            ;a 16x16 icon
   .db $FF,$F8,$80,$14,$98,$12,$98,$1F,$80,$27,$BC,$4F,$BC,$4F,$98,$ED
   .db $99,$79,$9A,$C1,$9D,$99,$8B,$35,$96,$3D,$AC,$19,$D8,$03,$BF,$FE
START:
   call dispttl
   bcall(_cleargbuf) ;clear the buffer
   bcall(_ClrLcdf) ;now clear the screen
   OpenGuiStack()
   PushGuiStack(Null,Null,1)
   PushGuiStack(FullScreenImg,MainMenu,768)
   PushGuiStack(ButtonText,OpenButton,OpenBSize)
   PushGuiStack(ButtonText,NewButton,NewBSize)
   PushGuiStack(ButtonText,ImportButton,ImportBSize)
   PushGuiStack(ButtonImg,QuitButton,QuitBSize)
rerender:
   GUIMouse(Null)
   CloseGuiStack()
   ret

APStart:
   push ix
   call dispttl
   bcall(_cleargbuf)
   bcall(_clrlcdfull)
   PushGuiStack(Null,Null,1)
   jr OpenHandler2
   
OpenHandler:
   MouseRecover()
   FileOpen()
   ld a,l
   cp 0
   jr z,failopen
   ld a,h
   cp 0
   jr z,failopen
   push hl
   pop ix
   ld a,(ix-3)
   cp 0
   jr nz,failopen
   ld a,(ix-2)
   cp 1
   jr nz,failopen
   ld a,(ix-1)
   cp 3
   jr nz,failopen
   push hl
   PopGuiStacks(5)
OpenHandler2:
   pop hl
   ld de,savesscreen
   ld bc,768
   ldir
OpenHandler3:
   bcall(_cleargbuf)
   bcall(_clrlcdfull)
   PushGuiStack(MouseCursor,PencilCursor,CursorSize)
   PushGuiStack(FullScreenImg,savesscreen,768)
   PushGuiStack(Hotspot,LoelHax,HaxSize)
   PushGuiStack(Hotspot,ExpHax,ExpHaxSize)
drerender:
   GUIMouse(DrawHandler)
   ret
failopen:
   ld hl,rerender
   push hl
   ret

NewHandler:
   MouseRecover()
   PopGuiStacks(5)
   ld hl,savesscreen
   ld bc,768
   bcall(_memclear)
   jr OpenHandler3
   
PatienceHandler:
   MouseRecover()
   PushGuiStack(SmallWin,PatienceWin,PatienceWinSize)
   PushGuiStack(WrappedText,PleaseWaitTxt,PleaseWaitSize)
   RenderGui()
   Pause()
   PopGuiStacks(2)
   ld hl,rerender
   push hl
   ret
   
ImportHandler:
   MouseRecover()
   PushGuiStack(LargeWin,ImportSelWin,ImportSelSize)
   RenderGui()
   Pause()
   PopGuiStack()
   ld hl,rerender
   push hl
   ret

ExpDialog:
   MouseRecover()
   ld hl,MouseX
   ld (hl),48
   ld hl,MouseY
   ld (hl),32
   
   GUIFindFirst()
   GUIFindNext()
   ld de,3
   add hl,de
   ld (varmem),hl
   
   call MakeExpSelPrompt
   GuiMouse(null)
   
AskSave:
   MouseRecover()
   ld hl,MouseX
   ld (hl),48
   ld hl,MouseY
   ld (hl),32
   
   GUIFindFirst()
   GUIFindNext()
   ld de,3
   add hl,de
   ld (varmem),hl
   
   call MakeSavePrompt
   GuiMouse(null)
   
Quit:
   MouseRecover()
   CloseGUIStack()
   ret
   
DrawHandler:
   .db $3f ;debounce flag
   ld h,a
   push hl
   ld a,$ff
   out (1),a
   nop
   ld a,$bf
   out (1),a
   nop \ nop
   in a,(1)
   cp $df            ;2nd
   jr z,PixOn
   cp $bf            ;mode
   jr z,PixFlip
   ld a,$ff
   out (1),a
   nop
   ld a,$df
   out (1),a
   nop \ nop
   in a,(1)
   cp $7f            ;alpha
   jr z,PixOff
   pop hl
   ld a,$ff
   out (1),a
   nop
   ld a,$fd
   out (1),a
   nop \ nop
   in a,(1)
   cp $bf            ;clear
   jr z,DrawQuit
   cp $df
   jr z,PicExport
DrawCont:
   ret
PixOn:
   pop hl
   ld e,l
   ld a,h
   call iGetPixel2
   or (hl)
   ld (hl), a
   call mouseGetMask
   or (hl)
   ld (hl),a
   jr DrawCont
PixOff:
   pop hl
   ld e,l
   ld a,h
   call iGetPixel2
   cpl
   and (hl)
   ld (hl),a
   call mouseGetMask
   cpl
   and (hl)
   ld (hl),a
   jr DrawCont
PixFlip:
   pop hl
   ld e,l
   ld a,h
   call iGetPixel2
   xor (hl)
   ld (hl),a
   call mouseGetMask
   xor (hl)
   ld (hl),a
   jr DrawCont
DrawQuit:
   pop hl
   ld hl,MouseX
   ld (hl),98
   ld hl,MouseY
   ld (hl),1
   ret
PicExport:
   pop hl
   ld hl,MouseX
   ld (hl),98
   ld hl,MouseY
   ld (hl),4
   ret
   
makesaveprompt:
   PushGuiStack(SmallWin,savepwin,savepwinsize)
   PushGuiStack(Text,spwt,spwtsize)
   PushGuiStack(ButtonText,spwyb,spwybsize)
   PushGuiStack(ButtonText,spwnb,spwnbsize)
   PushGuiStack(Buttontext,spwcb,spwcbsize)
   ret
   
makeexpselprompt:
   PushGuiStack(SmallWin,ExportSelWin,ExportSelSize)
   PushGuiStack(ButtonText,ExpSA,ExpSASize)
   PushGuiStack(ButtonText,ExpCancel,ExpCancelSize)
   PushGuiStack(ButtonText,ExpBG,ExpBGSize)
   PushGuiStack(Buttontext,ExpPic,ExpPicSize)
   ret
   
setsavey:
   MouseRecover()
   ld hl,(varmem)
   ld de,filetype
   ld bc,768
   call FileSaveAs
   CloseGuiStack()
   ret

setsavec:
   MouseRecover()
   PopGuiStacks(5)
   jp drerender

setexpy:

setexpc:
   

hlFastCopy:
   di
   ld c,$10
setrow:
   in a,(c)
   rla ;test 7th bit
   jr c,setrow
   ld a,$80
   out ($10),a
   ld de,12
   ld a,$20
col:
   push af ;the push and pop are wasted clocks
colwait: ;but this only occurs 12 times
   in a,(c)
   rla
   jr c,colwait
   pop af
   out ($10),a
   push af
   ld b,64
row:
   in a,(c)
   rla
   jr c,row
   ld a,(hl)
   out ($11),a
   add hl,de
   djnz row
   pop af
   dec h
   dec h
   dec h
   inc hl
   inc a
   cp $2c
   jr nz,col
   ei
   ret
   

;;;;iGetPixel2 (iGetPixel for the gui stack)
iGetPixel2:
   ld   d,$00
   ld   h,d
   ld   l,e
   add   hl,de
   add   hl,de
   add   hl,hl
   add   hl,hl
   push af
   push hl
   GUIFindFirst()
   GUIFindNext()
   ld de,3
   add hl,de
   pop de   
   pop af
   add   hl,de
   ld   b,$00
   ld   c,a
   and   %00000111
   srl   c
   srl   c
   srl   c
   add   hl,bc
   ld   b,a
   inc   b
   ld   a,%00000001
getPixelLoop2:
   rrca
   djnz   getPixelLoop2
   ret
   
;;;;mouseGetMask
mouseGetMask:
   ld hl,MouseX
   ld a,(hl)
   and   7
   ld   b,a
   inc   b
   ld   a,1
mouseGetLoop:
   rrca
   djnz   mouseGetLoop
   ld hl,MouseMaskLoc
   ret   

;;;;;find RIGView files for import
; input:
;   hl=place to start looking
;   ix->first line of data (0 terminated)
; output:
;   de=place stopped + 1
;   hl->program data (after the string)
;   z=0 if found, z=1 if not found.
;   All registers destroyed
rDetect: ld   de,(ptemp)
   bcall(_cphlde)
   ld   a,(hl)
   jr   nz,rDetectContinue
   inc   a
   ret
rDetectContinue:
   push   hl
   and   $01
   jr   nz,rDetectSkip

   dec   hl
   dec   hl
   dec   hl   ; hl->lsb ptr
   ld   e,(hl)
   dec   hl
   ld   d,(hl)
   dec   hl   ; hl->page
   ld   a,(hl)
   or   a
   push   af
   ld   h,d
   ld   l,e   ; hl & de->program
   jr   z,rDetectNoMove
   push   hl
   bcall(_memfree)
   ld   bc,64
   sbc   hl,bc
   pop   hl
   jr   c,rDetectNotEnough
   ld   de,($9820)
   push   ix
   push   hl
   push   de
   bcall(_flashToRam)
   pop   hl
   push   hl
   pop   ix
   ld   a,10
   add   a,(ix+9)
   ld   e,a
   ld   d,0   ; de=flash offset
   add   hl,de
   ex   (sp),hl
   add   hl,de
   pop   de
   ex   de,hl   ; hl-temp, de-perm
   pop   ix
rDetectNoMove:
   inc   de
   inc   de
   ld   c,(hl)
   inc   hl
   ld   b,(hl)
   inc   hl   ; hl->data in ram
   push   bc
   push   ix
   pop   bc
rDetectCheck:
   ld   a,(bc)
   or   a
   jr   z,rDetectFound
   cp   (hl)
   inc   bc
   inc   de
   inc   hl
   jr   z,rDetectCheck
rDetectBad:
   pop   bc
rDetectNotEnough:
   pop   af
rDetectSkip:
   pop   hl
   ld   bc,-6
   add   hl,bc
   ld   b,(hl)
   dec   hl
rDetectNameLoop2:
   dec   hl
   djnz   rDetectNameLoop2
   jr   rDetect
rDetectFound:
   pop   hl
   ; hl=size, de->data
   pop   af   ; a=page, f=(or a)
   jr   z,rDetectInRam
   push   de   ; data
   push   af
   push   hl
   bcall(_enoughRam)
   pop   bc
   jr   c,rDetectBad
   pop   af
   pop   hl
   ld   de,($9820)   ; tempMem
   push   de
   bcall(_flashToRam)
   pop   de
rDetectInRam:   ; de->data in RAM
   pop   hl   ; hl->vat location
   ld   bc,-6
   add   hl,bc
   ld   b,(hl)
   inc   b
rDetectNameLoop1:
   dec   hl
   djnz   rDetectNameLoop1
   ex   de,hl
   xor   a
   ret
dispttl:
   di
   ld   hl,RLE_Image
   ld   de,PlotsScreen
   call   DispRLE
   ld   de,AppBackupScreen
   call   DispRLE

CopyAgain:
   call   RIGCopyTBLR

   ld   bc,$07FE
KeyCheck:
   ld   a,$FF
   out   (1),a
   ld   a,c
   out   (1),a
   in   a,(1)
   inc   a
   jr   nz,exttl
   rlc   c
   djnz   KeyCheck

   ld   c,128
DoDelay:
   ld   b,10
   djnz   $
   dec   c
   jr   nz,DoDelay
   
   ld   bc,308
FixedDelay:
   dec   bc
   ld   a,b
   or   c
   jr   nz,FixedDelay

   jr   CopyAgain

exttl:
   ei
   bcall(_ClrLcdf)
   bcall(_HomeUp)
   bcall(_GetCSC)
   ret

RC_L1   = PlotsScreen
RC_L2   = AppBackupScreen

RIGCopyTBLR:
   ;Move To Top
   ld   a,$80      ;7
   out   ($10),a      ;11

   ;Preserve SP (used as temp register)
   ld   (RC_SP+1),sp   ;20
   ld   sp,RC_L1-RC_L2   ;10
   
   ld   hl,RC_Rotate+1   ;10
   dec   (hl)      ;11
   jp   p,RC_SkipHL2   ;10/1
   ld   (hl),2      ;10
RC_SkipHL2:

   ld   de,RC_L2   ;10
   ld   a,$20      ;7
RC_HLoop:
   ;Set Horizontal Position
   out   ($10),a      ;11

   ld   (RC_LdA+1),a   ;13
   ld   b,64      ;7
RC_Rotate:
   ld   c,1      ;7
RC_VLoop:
   dec   c      ;4
   ld   h,d      ;4
   ld   l,e      ;4

   jp   p,RC_Wait   ;10/1
   or   a      ;4 (waste)
   ld   c,2      ;7
   add   hl,sp      ;11
RC_NotL1:
   

   ld   a,(hl)      ;4
   out   ($11),a      ;11

   inc   de      ;6

   djnz   RC_VLoop   ;13/8

   ld   a,c      ;4
   ld   (RC_Rotate+1),a   ;13

RC_LdA:
   ld   a,0      ;7
   inc   a      ;4
   cp   $2C      ;7
   jp   nz,RC_HLoop   ;10/1
   
RC_SP:
   ld   sp,$0000   ;10
   ret         ;10

RC_Wait:
   jr   RC_NotL1   ;12 (waste)
   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
OpenButton:
   .db 6,17
   .dw OpenHandler
   .db "OPEN",0
OpenBSize = $ - OpenButton

NewButton:
   .db 28,17
   .dw NewHandler
   .db "NEW",0
NewBSize = $ - NewButton

ImportButton:
   .db 46,17
   .dw ImportHandler
   .db "IMPORT",0
ImportBSize = $ - ImportButton

QuitButton:
   .db 76,17
   .dw Quit
   .db 1,5
   .db %10001000
   .db %01010000
   .db %00100000
   .db %01010000
   .db %10001000
QuitBSize = $ - QuitButton
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PatienceWin:
   .db 8,6
   .db %00100000
   .db %00100000
   .db %00100000
   .db %00000000
   .db %00100000
   .db "Oops...",0
PatienceWinSize = $ - PatienceWin

PleaseWaitTxt:
   .db 1,1,74,0
   .db "This feature has not yet been implemented (press any key to continue)",0
PleaseWaitSize = $ - PleaseWaitTxt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
PencilCursor:
   .dw 0,95*256+63
   ;AND mask
   .db %01111111
   .db %10011111
   .db %10001111
   .db %11000111
   .db %11100011
   .db %11110001
   .db %11111000
   .db %11111100
   ;XOR mask
   .db %10000000
   .db %01100000
   .db %01010000
   .db %00101000
   .db %00010100
   .db %00001010
   .db %00000111
   .db %00000011
CursorSize = $ - PencilCursor

LoelHax:
   .db 97,0,2,2
   .dw AskSave
HaxSize = $ - LoelHax

ExpHax:
   .db 97,3,2,2
   .dw ExpDialog
ExpHaxSize = $ - ExpHax
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
savepwin:
   .db 2,2
   .db %01110000
   .db %01011000
   .db %01001000
   .db %01001000
   .db %01111000
   .db "Save Picture?",0
savepwinsize = $ - savepwin

spwyb:
   .db 2,15
   .dw setsavey
   .db "Yes",0
spwybsize = $ - spwyb

spwnb:
   .db 21,15
   .dw Quit
   .db "No",0
spwnbsize = $ - spwnb

spwcb:
   .db 46,15
   .dw setsavec
   .db "Cancel",0
spwcbsize = $ - spwcb

spwt:
   .db 1,7,0
   .db "Save before quitting?",0
spwtsize = $ - spwt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ExportSelWin:
   .db 3,6
   .db %11111000
   .db %10000000
   .db %11110000
   .db %10000000
   .db %11111000
   .db "Select Export Format",0
ExportSelSize = $ - ExportSelWin

ExpSA:
   .db 1,28
   .dw PatienceHandler
   .db "Standalone",0
ExpSASize = $ - ExpSA

ExpCancel:
   .db 51,28
   .dw setsavec
   .db "Cancel",0
ExpCancelSize = $ - ExpCancel

ExpBG:
   .db 1,4
   .dw PatienceHandler
   .db "DCS6 BG",0
ExpBGSize = $ - ExpBG

ExpPic:
   .db 1,16
   .dw PatienceHandler
   .db "TI-OS Pic",0
ExpPicSize = $ - ExpPic
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ImportSelWin:
   .db %11111000
   .db %00100000
   .db %00100000
   .db %00100000
   .db %11111000
   .db "Select Pic...",0
ImportSelSize = $ - ImportSelWin
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; 685 bytes
RLE_Image:
Layer1:
   .db   $91,$00,$13,$80,$F0,$7F,$00,$C0,$FF,$FF,$7F,$7F,$F0,$91,$FF,$14
   .db   $FE,$91,$FF,$0E,$91,$00,$12,$01,$0F,$3C,$F0,$06,$3F,$FF,$FF,$FF
   .db   $FC,$02,$FE,$FC,$FC,$FC,$F8,$FC,$F8,$F8,$F8,$F0,$F8,$F8,$91,$FF
   .db   $09,$7F,$1B,$2F,$69,$79,$1D,$FF,$F3,$91,$FF,$06,$1C,$0C,$06,$0C
   .db   $06,$06,$0C,$06,$0C,$06,$0C,$0C,$18,$18,$31,$73,$67,$CF,$8F,$1F
   .db   $7F,$0F,$0F,$1F,$FE,$C0,$FC,$3E,$1E,$3C,$3C,$78,$3C,$7C,$78,$78
   .db   $F0,$70,$78,$F0,$F1,$91,$FF,$08,$F8,$FA,$91,$FE,$04,$FC,$91,$FF
   .db   $09,$7F,$3F,$7F,$3F,$1F,$3F,$7F,$FF,$7F,$1F,$7F,$FF,$DF,$91,$FF
   .db   $09,$00,$00,$04,$1E,$1E,$3C,$3E,$7C,$50,$01,$07,$7F,$FF,$7F,$91
   .db   $FF,$0B,$CF,$5F,$9F,$C6,$C9,$DD,$D9,$5D,$91,$FF,$20,$3F,$3F,$1F
   .db   $3F,$1F,$3C,$7C,$78,$F0,$F1,$E0,$F1,$E1,$E1,$E0,$F0,$F9,$91,$FF
   .db   $0A,$60,$9A,$9A,$DA,$1A,$91,$FF,$23,$80,$00,$00,$7C,$F8,$F8,$F0
   .db   $F0,$C0,$80,$11,$10,$20,$F1,$91,$FF,$0A,$8E,$77,$06,$37,$20,$91
   .db   $FF,$1D,$FE,$FC,$FE,$FF,$FF,$FF,$78,$38,$7C,$78,$78,$F8,$70,$78
   .db   $F0,$F1,$F0,$E0,$F1,$F1,$91,$FF,$08,$F8,$FB,$FB,$FB,$7B,$7B,$78
   .db   $91,$FF,$1D,$1F,$1F,$3F,$FF,$FF,$FF,$38,$78,$78,$70,$F8,$78,$F0
   .db   $F0,$E1,$E1,$F1,$E1,$E3,$C1,$91,$FF,$08,$7F,$7F,$8C,$AD,$AD,$6C
   .db   $E4,$91,$FF,$23,$78,$E0,$40,$18,$B8,$70,$78,$78,$F0,$F0,$E1,$E0
   .db   $F1,$E1,$91,$FF,$08,$BF,$DF,$14,$5F,$CD,$C3,$30,$91,$FF,$20,$FE
   .db   $FE,$FC,$F0,$70,$74,$7C,$78,$F8,$78,$F0,$F8,$F0,$F0,$F0,$F8,$FC
   .db   $91,$FF,$0A,$0B,$AF,$6F,$EF,$2C,$91,$FF,$21,$3F,$3F,$07,$0F,$4F
   .db   $7F,$7F,$FF,$7F,$7F,$FF,$FF,$FF,$9F,$1F,$3F,$91,$FF,$0A,$45,$D8
   .db   $19,$BD,$11,$91,$FF,$3B,$7F,$BF,$BF,$BF,$DF,$91,$FF,$08
Layer2:
   .db   $91,$00,$15,$80,$91,$FF,$2A,$91,$00,$14,$03,$0F,$FF,$FE,$FF,$FF
   .db   $FF,$FE,$91,$FC,$06,$91,$F8,$05,$F0,$F0,$91,$FF,$08,$7F,$7F,$4B
   .db   $6B,$6E,$6C,$9D,$FD,$F3,$91,$FF,$06,$03,$03,$01,$03,$01,$01,$03
   .db   $01,$03,$01,$03,$03,$07,$07,$0F,$0F,$1F,$3F,$7F,$FF,$FF,$1F,$1F
   .db   $1E,$FE,$FE,$FE,$1C,$91,$3C,$04,$91,$78,$05,$F8,$F0,$F0,$F0,$91
   .db   $FF,$08,$F8,$FE,$7E,$91,$FE,$04,$91,$FF,$1F,$00,$00,$18,$3E,$3E
   .db   $3E,$3C,$38,$20,$00,$03,$7F,$7F,$91,$FF,$0C,$EF,$1F,$CF,$D2,$C8
   .db   $D9,$D9,$D8,$91,$FF,$1F,$7F,$3F,$1F,$1F,$1F,$3F,$3E,$3C,$78,$F8
   .db   $F0,$F1,$E1,$E1,$E1,$E0,$E0,$F0,$91,$FF,$0A,$54,$1A,$9A,$9A,$DA
   .db   $91,$FF,$23,$C0,$00,$18,$38,$78,$F8,$F0,$E0,$E0,$C0,$90,$31,$71
   .db   $E1,$91,$FF,$0A,$CC,$B5,$F4,$A6,$10,$91,$FF,$1D,$FE,$FE,$FC,$FF
   .db   $FF,$FF,$3C,$7C,$91,$78,$04,$F8,$F0,$F0,$F0,$F1,$F1,$E1,$E1,$91
   .db   $FF,$08,$F8,$FB,$7B,$FB,$FB,$7B,$F8,$91,$FF,$1D,$3F,$3F,$3F,$FF
   .db   $FF,$FF,$91,$78,$04,$70,$91,$F0,$04,$F1,$E1,$E1,$E1,$E3,$91,$FF
   .db   $08,$6F,$BF,$8E,$AD,$AD,$AD,$6E,$91,$FF,$23,$70,$60,$C0,$88,$18
   .db   $38,$70,$91,$F0,$04,$F1,$E1,$E1,$91,$FF,$08,$DF,$DF,$52,$85,$C4
   .db   $D4,$5A,$91,$FF,$21,$FC,$FC,$F0,$70,$91,$78,$04,$F8,$F8,$91,$F0
   .db   $05,$F8,$91,$FF,$0A,$42,$AE,$EE,$EF,$2E,$91,$FF,$20,$3F,$3F,$3F
   .db   $0F,$0F,$3F,$7F,$7F,$7F,$91,$FF,$05,$7F,$3F,$3F,$91,$FF,$0A,$24
   .db   $C1,$59,$19,$6D,$91,$FF,$3B,$3F,$BF,$BF,$BF,$9F,$91,$FF,$08
   
MainMenu:
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$60,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$60,$00,$00,$00,$00,$03,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$07,$80,$00,$00,$00,$00,$00,$F1,$E0,$87
   .db   $37,$1F,$C7,$80,$00,$00,$00,$00,$00,$F1,$91,$C7,$3F,$9F,$C7,$80
   .db   $00,$00,$00,$00,$00,$61,$93,$62,$33,$87,$07,$80,$00,$00,$00,$00
   .db   $00,$61,$E3,$E2,$33,$87,$07,$80,$00,$00,$00,$00,$00,$61,$83,$62
   .db   $33,$87,$03,$00,$00,$00,$00,$00,$00,$69,$83,$67,$33,$87,$03,$00
   .db   $01,$03,$80,$00,$00,$79,$83,$67,$33,$87,$00,$00,$03,$04,$C0,$00
   .db   $00,$30,$00,$00,$00,$00,$03,$02,$25,$04,$40,$00,$00,$00,$00,$00
   .db   $00,$00,$06,$83,$61,$04,$40,$00,$03,$FF,$FF,$FF,$FF,$FF,$C7,$81
   .db   $C1,$14,$40,$00,$00,$FF,$FF,$FF,$FF,$FF,$F3,$00,$87,$B3,$80,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$38,$00,$00,$00,$00,$00,$00,$70,$00,$00,$00,$00,$3F,$FF,$FF
   .db   $FF,$FF,$FF,$FF,$F0,$00,$00,$00,$00,$37,$FF,$FF,$FF,$FF,$FF,$FF
   .db   $B0,$00,$00,$00,$00,$18,$00,$00,$00,$00,$00,$00,$60,$00,$00,$00
   .db   $00,$18,$00,$00,$00,$00,$00,$00,$60,$00,$00,$00,$00,$19,$FF,$FF
   .db   $FF,$FF,$FF,$FE,$60,$00,$00,$00,$00,$19,$FF,$FF,$FF,$FF,$FF,$FE
   .db   $60,$00,$00,$00,$00,$19,$FF,$FE,$3F,$FF,$FF,$8E,$60,$00,$00,$00
   .db   $00,$19,$FF,$FC,$1F,$FF,$FF,$36,$60,$00,$00,$00,$00,$19,$FF,$FC
   .db   $5F,$FF,$FE,$16,$60,$00,$00,$00,$00,$19,$FF,$FC,$DF,$FF,$F8,$06
   .db   $60,$00,$00,$00,$00,$19,$FF,$FE,$3F,$FF,$F0,$0E,$60,$00,$00,$00
   .db   $00,$19,$FF,$FF,$BF,$FF,$E0,$1E,$60,$00,$00,$00,$00,$19,$FF,$FF
   .db   $1F,$FF,$E0,$3E,$60,$00,$00,$00,$00,$19,$FF,$FF,$1F,$FF,$E0,$FE
   .db   $60,$00,$00,$00,$00,$19,$FF,$FF,$2F,$FF,$C1,$FE,$60,$00,$00,$00
   .db   $00,$19,$86,$FF,$17,$FF,$81,$FE,$60,$00,$00,$00,$00,$19,$AC,$FF
   .db   $1B,$FF,$A1,$FE,$60,$00,$00,$00,$00,$19,$9A,$FF,$8D,$FF,$B3,$FE
   .db   $60,$00,$00,$00,$00,$19,$B6,$FF,$8D,$FF,$C7,$FE,$60,$00,$00,$00
   .db   $00,$19,$EE,$FF,$C8,$FF,$7F,$FE,$60,$00,$00,$00,$00,$19,$DC,$FF
   .db   $E1,$7F,$FE,$1E,$60,$00,$00,$00,$00,$19,$81,$FF,$FC,$BD,$FC,$8E
   .db   $60,$00,$00,$00,$00,$19,$FF,$FF,$FE,$5F,$FE,$0E,$60,$00,$00,$00
   .db   $00,$19,$FF,$FF,$FF,$2F,$FF,$0E,$60,$00,$00,$00,$00,$19,$FF,$FF
   .db   $FF,$97,$FC,$0E,$60,$00,$00,$00,$00,$19,$FF,$FF,$FF,$CB,$FE,$1E
   .db   $60,$00,$00,$00,$00,$19,$FF,$FF,$FF,$E5,$FF,$FE,$60,$00,$00,$00
   .db   $00,$18,$00,$00,$00,$00,$00,$00,$60,$00,$00,$00,$00,$18,$00,$00
   .db   $00,$00,$00,$00,$60,$00,$00,$00,$00,$37,$FF,$FF,$FF,$FF,$FF,$FF
   .db   $B0,$00,$00,$00,$00,$3F,$FF,$FF,$FF,$FF,$FF,$FF,$F0,$00,$00,$00
   .db   $00,$38,$00,$00,$00,$00,$00,$00,$70,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
   .db   $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00

Pic1name:
   .db PictObj,tVarPict,tPic1,0,0
Pic2name:
   .db PictObj,tVarPict,tPic2,0,0
Pic3name:
   .db PictObj,tVarPict,tPic3,0,0
Pic4name:
   .db PictObj,tVarPict,tPic4,0,0
Pic5name:
   .db PictObj,tVarPict,tPic5,0,0
Pic6name:
   .db PictObj,tVarPict,tPic6,0,0
Pic7name:
   .db PictObj,tVarPict,tPic7,0,0
Pic8name:
   .db PictObj,tVarPict,tPic8,0,0
Pic9name:
   .db PictObj,tVarPict,tPic9,0,0
Pic0name:
   .db PictObj,tVarPict,tPic0,0,0
<random offtopic idea>

Hey Kerm, any chance you could make it so things like code blocks are collapsible? (and default to collapsed if exceed a certain line count)

Surely that wouldn't be too difficult - bit of JavaScript should take care of it...

</>

Screenshots?
Colored syntax would be nice too Wink
Ultimate Dev'r wrote:
Colored syntax would be nice too Wink


Significantly more difficult, though Wink
But cooler Wink
being able to run it if it is HTML or PHP or something directly from the browser would be nice too
Eeems wrote:
being able to run it if it is HTML or PHP or something directly from the browser would be nice too


"running" HTML would be easy. Running PHP would be dangerous, since you could trash Kerm's server
true, but it would be nice
Haha, I love how a simple request to improve readability diverges so quickly...
magicdanw wrote:
Haha, I love how a simple request to improve readability diverges so quickly...


Indeed, I was thinking the same thing. My request was actually doable in a reasonable amount of time. Eeems wants Kerm to build a PHP emulator in JavaScript Rolling Eyes
Kllrnohj wrote:
Screenshots?


First post of the original topic. I've had a lot of people bugging me to post the source, so I finally got around to it. Anyone's welcome to play with it, as long as credit is given where credit is due, but the chances are pretty good I'll finish it once I have a slightly nicer z80 development environment on my new laptop.
@Kllrnohj: I'm not saying that he should, I'm just saying that it would be nice, but it would be easier to just make it open HTML in a separate page if it was HTML
@Elfprince: Evil or Very Mad
Let's go with no on the PHP and HTML execution and rendering, respectively. I wouldn't mind codebox collapsing at all; someone remind me to do that. I'll check out syntax colorization; the hardest part imo would be detecting the code type.
You could have some sort of tag at the beginning like:


Code:
[code="Java"]
public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}
[//code]
Zaphod Beeblebrox wrote:
You could have some sort of tag at the beginning like:


Code:
[code="Java"]
public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}
[//code]


Very Happy that's not a bad idea!
Zaphod Beeblebrox wrote:
You could have some sort of tag at the beginning like:


I've seen auto-detection done and working, but that would work too. Its simpler, at least.

@Kerm: I'm reminding you to do collapsing code boxes Razz
is this done yet so i can download it or no....?


i'm getting antsy Razz
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement