mirror of
https://github.com/fadden/6502bench.git
synced 2026-04-25 21:18:25 +00:00
Initial file commit
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,420 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":1,"FileDataLength":661,"FileDataCrc32":2075163852,"ProjectProps":{
|
||||
"CpuName":"6502","IncludeUndocumentedInstr":false,"EntryFlags":32702671,"AnalysisParams":{
|
||||
"AnalyzeUncategorizedData":true,"MinCharsForString":4,"SeekNearbyTargets":true},
|
||||
"PlatformSymbolFileIdentifiers":["RT:Apple/F8-ROM.sym65","RT:Apple/Cxxx-IO.sym65","RT:Apple/Applesoft.sym65","PROJ:fdraw-exports.sym65"],"ExtensionScriptFileIdentifiers":[],"ProjectSyms":{
|
||||
}},
|
||||
"AddressMap":[{
|
||||
"Offset":0,"Addr":7520}],"TypeHints":[{
|
||||
"Low":0,"High":0,"Hint":"Code"},
|
||||
{
|
||||
"Low":16,"High":16,"Hint":"Code"},
|
||||
{
|
||||
"Low":85,"High":85,"Hint":"Code"},
|
||||
{
|
||||
"Low":112,"High":112,"Hint":"Code"},
|
||||
{
|
||||
"Low":118,"High":118,"Hint":"Code"},
|
||||
{
|
||||
"Low":177,"High":177,"Hint":"Code"},
|
||||
{
|
||||
"Low":209,"High":209,"Hint":"Code"},
|
||||
{
|
||||
"Low":228,"High":228,"Hint":"Code"},
|
||||
{
|
||||
"Low":252,"High":252,"Hint":"Code"},
|
||||
{
|
||||
"Low":255,"High":255,"Hint":"Code"},
|
||||
{
|
||||
"Low":261,"High":261,"Hint":"Code"},
|
||||
{
|
||||
"Low":267,"High":267,"Hint":"Code"},
|
||||
{
|
||||
"Low":283,"High":283,"Hint":"Code"},
|
||||
{
|
||||
"Low":289,"High":289,"Hint":"Code"},
|
||||
{
|
||||
"Low":295,"High":295,"Hint":"Code"},
|
||||
{
|
||||
"Low":301,"High":301,"Hint":"Code"},
|
||||
{
|
||||
"Low":304,"High":304,"Hint":"Code"}],"StatusFlagOverrides":{
|
||||
},
|
||||
"Comments":{
|
||||
"0":"JMP, in case it got","2":" trashed","37":"eat token, jump","85":"match Init result","95":"init \"previous hplot\"","96":" coord to zero","100":"279/2","104":"191/2","112":"page 1","114":"$c054","118":"page 2","120":"$c055","128":"probably useful","145":"restore color","191":"eat \u0027)\u0027 (we assume)","194":"X/Y unaltered","199":"multiply x32","209":"get color","238":"about to start drawing on 2?","240":"yes, show page 1","242":"no, show page 2","252":"well, that was easy","304":"check next token","307":"is this an \"HPLOT TO\"?","311":"get the first coord","317":"see if single point","322":"nope, draw line","324":"draw point, and save x/y","327":" for subsequent HPLOT TO","330":"\"HPLOT TO\", restore the","333":" previous coord to x0/y0","336":"(can\u0027t rely on f_in_zzz","339":" being there -- we might","342":" have drawn a rect)","348":"eat the TO","351":"get the coords","354":"draw it","357":"shift 1-\u003e0 for next round","363":"another TO?","365":"yes, branch","367":"no, save prev and bail","373":"store X/Y/A in coord1","463":"get vertex buffer address","469":"copy to A1L","477":"eat the comma","480":"get index buffer address","483":"leave it in LINNUM","489":"get the count","492":"range check (0-127)","500":"nothing to do","502":"double it","503":"stash it","516":"eat the AT","519":"the code that reads the","521":" hi-res coordinates will","522":" overwrite LINNUM, so","524":" we have to save \u0026 restore","553":"use BIT to skip the inc","569":"must be 0-127","580":"0-255, ok","584":"512+","588":"280-511","593":"Y is neg or \u003e 255","606":"hi byte of vertex","608":"x-coord","612":"sign-extend hi byte","630":"y-coord","634":"sign-extend hi byte","649":"$20 or $40","654":"Center-point coordinates","655":" for array-based line","656":" draw (\u0026AT, \u0026PLOT).","657":"16-bit coordinates for","659":" array-based line draw"},
|
||||
"LongComments":{
|
||||
"-2147483647":{
|
||||
"Text":"\r\nAmper-fdraw\r\nBy Andy McFadden\r\nFor fdraw version 0.3\r\n\r\nApplesoft ampersand interface for fdraw.\r\n\r\n","BoxMode":true,"MaxWidth":30,"BackgroundColor":0},
|
||||
"0":{
|
||||
"Text":"Prepare the ampersand vector.\r\n\r\nIdeally we\u0027d check to see if the existing vector is different from ours, and if so, jump to it when we get a token we don\u0027t recognize. Not convinced there\u0027s an actual use case for this.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"16":{
|
||||
"Text":"\r\nEntry point from BASIC. The token is in A.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"85":{
|
||||
"Text":"\r\n\u0026NEW - initialize\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"112":{
|
||||
"Text":"\r\n\u0026HGR - show page 1 with mixed text, and clear screen. Sets the color to zero.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"118":{
|
||||
"Text":"\r\n\u0026HGR2 - show page 2 with no text, and clear screen. Sets the color to zero.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"122":{
|
||||
"Text":"We go slightly out of our way to clear the screen before tripping the softswitches. This avoids flashing the previous hi-res page contents when\r\nentering from text mode.\r\n\r\nWe also want to go nomix-page2 but page1-mix (note reverse order) to avoid flashing text pg 2.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"177":{
|
||||
"Text":"\r\n\u0026SCRN({1,2}) - set the current hi-res page\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"209":{
|
||||
"Text":"\r\n\u0026HCOLOR={0-7} - set the current color\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"228":{
|
||||
"Text":"\r\n\u0026INVERSE - flip pages\r\n\r\nIf we\u0027re currently drawing on $20, we set the page to $40 and hit $c054 to show $20. And vice-versa. The goal is to make double-buffered animation easy.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"252":{
|
||||
"Text":"\r\n\u0026CLEAR - clear current page to current color\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"255":{
|
||||
"Text":"\r\n\u0026XDRAW left, top, right, bottom - draw rectangle outline\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"261":{
|
||||
"Text":"\r\n\u0026DRAW left,top,right,bottom - draw filled rectangle\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"267":{
|
||||
"Text":"\r\n\u0026EXP {0,1} - set line draw mode\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"283":{
|
||||
"Text":"\r\n\u0026COS cx,cy,rad - draw filled circle\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"289":{
|
||||
"Text":"\r\n\u0026SIN cx,cy,rad - draw filled circle\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"295":{
|
||||
"Text":"\r\n\u0026AT x,y - select center for array draw\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"301":{
|
||||
"Text":"\r\n\u0026PLOT vertexAddr, indexAddr, indexCount [AT cx,cy] - draw lines from arrays of vertices and indices\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"304":{
|
||||
"Text":"\r\n\u0026HPLOT x,y - draw a point\r\n\u0026HPLOT TO x,y - draw a line from last point to x,y\r\n\u0026HPLOT x0,y0 to x1,y1 - draw a line\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"370":{
|
||||
"Text":"Get coordinates and store in X1/Y1.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"383":{
|
||||
"Text":"Save x0/y0 as our \"previous\" coordinate.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"402":{
|
||||
"Text":"Copy X1/Y1 to X0/Y0.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"421":{
|
||||
"Text":"Store X/Y/A into array-center.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"431":{
|
||||
"Text":"Get left/top/right/bottom coordinates.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"447":{
|
||||
"Text":"Get cetner coordinates and radius.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"463":{
|
||||
"Text":"\r\nArray-draw handler.\r\n\r\nWe know that fdraw doesn\u0027t use LINNUM or A1L/A1H, so it\u0027s safe to use them here.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"509":{
|
||||
"Text":"Check for optional AT at cx,cy.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"563":{
|
||||
"Text":"\r\nGet the Nth vertex, specified by ]cur, and load it into X/Y/A (xlo/xhi/y). Returns with carry set if the vertex is invalid.\r\n\r\nIncrements ]cur by 1.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"604":{
|
||||
"Text":"\r\nGet VX and VY, merging with AC, and store in 16-bit g_out_x and g_out_y. Range not checked here. On entry, A has vertex index.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"649":{
|
||||
"Text":"\r\nGlobal variables.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0}},
|
||||
"Notes":{
|
||||
},
|
||||
"UserLabels":{
|
||||
"16":{
|
||||
"Label":"dispatch","Value":7536,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"40":{
|
||||
"Label":"cmdtab","Value":7560,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"29":{
|
||||
"Label":"match","Value":7549,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"18":{
|
||||
"Label":"loop","Value":7538,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"70":{
|
||||
"Label":"jmptabh","Value":7590,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"55":{
|
||||
"Label":"jmptabl","Value":7575,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"85":{
|
||||
"Label":"h_new","Value":7605,"Source":"User","Type":"GlobalAddr"},
|
||||
"112":{
|
||||
"Label":"h_hgr","Value":7632,"Source":"User","Type":"GlobalAddr"},
|
||||
"118":{
|
||||
"Label":"h_hgr2","Value":7638,"Source":"User","Type":"GlobalAddr"},
|
||||
"122":{
|
||||
"Label":"hgr_com","Value":7642,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"170":{
|
||||
"Label":"pg1","Value":7690,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"177":{
|
||||
"Label":"h_scrn","Value":7697,"Source":"User","Type":"GlobalAddr"},
|
||||
"191":{
|
||||
"Label":"okay","Value":7711,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"209":{
|
||||
"Label":"h_hcolor","Value":7729,"Source":"User","Type":"GlobalAddr"},
|
||||
"228":{
|
||||
"Label":"h_inverse","Value":7748,"Source":"User","Type":"GlobalAddr"},
|
||||
"219":{
|
||||
"Label":"okay1","Value":7739,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"649":{
|
||||
"Label":"g_cur_page","Value":8169,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"243":{
|
||||
"Label":"showpg1","Value":7763,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"252":{
|
||||
"Label":"h_clear","Value":7772,"Source":"User","Type":"GlobalAddr"},
|
||||
"255":{
|
||||
"Label":"h_xdraw","Value":7775,"Source":"User","Type":"GlobalAddr"},
|
||||
"431":{
|
||||
"Label":"getltrb","Value":7951,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"261":{
|
||||
"Label":"h_draw","Value":7781,"Source":"User","Type":"GlobalAddr"},
|
||||
"267":{
|
||||
"Label":"h_exp","Value":7787,"Source":"User","Type":"GlobalAddr"},
|
||||
"277":{
|
||||
"Label":"okay2","Value":7797,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"283":{
|
||||
"Label":"h_cos","Value":7803,"Source":"User","Type":"GlobalAddr"},
|
||||
"447":{
|
||||
"Label":"getcxcyr","Value":7967,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"289":{
|
||||
"Label":"h_sin","Value":7809,"Source":"User","Type":"GlobalAddr"},
|
||||
"295":{
|
||||
"Label":"h_at","Value":7815,"Source":"User","Type":"GlobalAddr"},
|
||||
"421":{
|
||||
"Label":"storeac","Value":7941,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"301":{
|
||||
"Label":"h_plot","Value":7821,"Source":"User","Type":"GlobalAddr"},
|
||||
"463":{
|
||||
"Label":"array_draw","Value":7983,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"304":{
|
||||
"Label":"h_hplot","Value":7824,"Source":"User","Type":"GlobalAddr"},
|
||||
"330":{
|
||||
"Label":"leadingto","Value":7850,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"370":{
|
||||
"Label":"getx1y1","Value":7890,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"402":{
|
||||
"Label":"copy1to0","Value":7922,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"348":{
|
||||
"Label":"hplot_to","Value":7868,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"383":{
|
||||
"Label":"copy0toprev","Value":7903,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"651":{
|
||||
"Label":"g_prefxl","Value":8171,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"652":{
|
||||
"Label":"g_prefixh","Value":8172,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"653":{
|
||||
"Label":"g_prevy","Value":8173,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"654":{
|
||||
"Label":"g_ac_xl","Value":8174,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"655":{
|
||||
"Label":"g_ac_xh","Value":8175,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"656":{
|
||||
"Label":"g_ac_y","Value":8176,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"411":{
|
||||
"Label":"store0","Value":7931,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"373":{
|
||||
"Label":"store1","Value":7893,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"562":{
|
||||
"Label":"done","Value":8082,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"499":{
|
||||
"Label":"countok","Value":8019,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"534":{
|
||||
"Label":"noat","Value":8054,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"563":{
|
||||
"Label":"getvertex","Value":8083,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"554":{
|
||||
"Label":"skip2","Value":8074,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"556":{
|
||||
"Label":"skip","Value":8076,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"657":{
|
||||
"Label":"g_out_x","Value":8177,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"590":{
|
||||
"Label":"xok","Value":8110,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"602":{
|
||||
"Label":"badv","Value":8122,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"659":{
|
||||
"Label":"g_out_y","Value":8179,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"603":{
|
||||
"Label":"goodv","Value":8123,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"604":{
|
||||
"Label":"calcvertex","Value":8124,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"635":{
|
||||
"Label":"ypos","Value":8155,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"645":{
|
||||
"Label":"nocarry","Value":8165,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"650":{
|
||||
"Label":"g_hcolor","Value":8170,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"392":{
|
||||
"Label":"storeprv","Value":7912,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"613":{
|
||||
"Label":"xok1","Value":8133,"Source":"User","Type":"LocalOrGlobalAddr"}},
|
||||
"OperandFormats":{
|
||||
"5":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"dispatch","Part":"Low"}},
|
||||
"7":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"AMPERV","Part":"Low"}},
|
||||
"10":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"dispatch","Part":"High"}},
|
||||
"12":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"AMPERV","Part":"Low"}},
|
||||
"40":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_NEW","Part":"Low"}},
|
||||
"41":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_HGR","Part":"Low"}},
|
||||
"42":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_HGR2","Part":"Low"}},
|
||||
"43":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_SCRN","Part":"Low"}},
|
||||
"44":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_HCOLOR","Part":"Low"}},
|
||||
"45":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_INVERSE","Part":"Low"}},
|
||||
"46":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_CLEAR","Part":"Low"}},
|
||||
"47":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_HPLOT","Part":"Low"}},
|
||||
"48":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_XDRAW","Part":"Low"}},
|
||||
"49":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_DRAW","Part":"Low"}},
|
||||
"50":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_EXP","Part":"Low"}},
|
||||
"51":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_COS","Part":"Low"}},
|
||||
"52":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_SIN","Part":"Low"}},
|
||||
"53":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_AT","Part":"Low"}},
|
||||
"54":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_PLOT","Part":"Low"}},
|
||||
"55":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_new","Part":"Low"}},
|
||||
"56":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_hgr","Part":"Low"}},
|
||||
"57":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_hgr2","Part":"Low"}},
|
||||
"58":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_scrn","Part":"Low"}},
|
||||
"59":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_hcolor","Part":"Low"}},
|
||||
"60":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_inverse","Part":"Low"}},
|
||||
"61":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_clear","Part":"Low"}},
|
||||
"62":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_hplot","Part":"Low"}},
|
||||
"63":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_xdraw","Part":"Low"}},
|
||||
"64":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_draw","Part":"Low"}},
|
||||
"65":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_exp","Part":"Low"}},
|
||||
"66":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_cos","Part":"Low"}},
|
||||
"67":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_sin","Part":"Low"}},
|
||||
"68":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_at","Part":"Low"}},
|
||||
"69":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_plot","Part":"Low"}},
|
||||
"70":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_new","Part":"High"}},
|
||||
"71":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_hgr","Part":"High"}},
|
||||
"72":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_hgr2","Part":"High"}},
|
||||
"73":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_scrn","Part":"High"}},
|
||||
"74":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_hcolor","Part":"High"}},
|
||||
"75":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_inverse","Part":"High"}},
|
||||
"76":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_clear","Part":"High"}},
|
||||
"77":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_hplot","Part":"High"}},
|
||||
"78":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_xdraw","Part":"High"}},
|
||||
"79":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_draw","Part":"High"}},
|
||||
"80":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_exp","Part":"High"}},
|
||||
"81":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_cos","Part":"High"}},
|
||||
"82":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_sin","Part":"High"}},
|
||||
"83":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_at","Part":"High"}},
|
||||
"84":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"h_plot","Part":"High"}},
|
||||
"100":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"104":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"212":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"307":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_TO","Part":"Low"}},
|
||||
"320":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_TO","Part":"Low"}},
|
||||
"363":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_TO","Part":"Low"}},
|
||||
"473":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"LINNUM","Part":"Low"}},
|
||||
"492":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"512":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TOK_AT","Part":"Low"}},
|
||||
"522":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"LINNUM","Part":"Low"}},
|
||||
"529":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"LINNUM","Part":"Low"}},
|
||||
"582":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"586":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"598":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"657":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"659":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null}}}
|
||||
@@ -0,0 +1,549 @@
|
||||
********************************
|
||||
* *
|
||||
* Amper-fdraw *
|
||||
* By Andy McFadden *
|
||||
* For fdraw version 0.3 *
|
||||
* *
|
||||
* Applesoft ampersand *
|
||||
* interface for fdraw. *
|
||||
* *
|
||||
* Developed with Merlin-16 *
|
||||
* *
|
||||
********************************
|
||||
|
||||
lst off
|
||||
org $1d60
|
||||
|
||||
* All of the handler entry points can fit on a single
|
||||
* page, so it's possible to save a few bytes by
|
||||
* dropping the high jump table and just hardcoding
|
||||
* the first page into the jump. This requires that
|
||||
* the ORG be at $xx00.
|
||||
|
||||
PUT FDRAW.DEFS
|
||||
|
||||
* Applesoft BASIC tokens.
|
||||
tok_plot equ $8d
|
||||
tok_hgr2 equ $90
|
||||
tok_hgr equ $91
|
||||
tok_hcolor equ $92
|
||||
tok_hplot equ $93
|
||||
tok_draw equ $94
|
||||
tok_xdraw equ $95
|
||||
tok_inverse equ $9e
|
||||
tok_clear equ $bd
|
||||
tok_new equ $bf
|
||||
tok_to equ $c1
|
||||
tok_at equ $c5
|
||||
*tok_sgn equ $d2
|
||||
tok_scrn equ $d7
|
||||
tok_exp equ $dd
|
||||
tok_cos equ $de
|
||||
tok_sin equ $df
|
||||
|
||||
* System locations.
|
||||
PCL equ $3a ;used by monitor
|
||||
PCH equ $3b ;used by monitor
|
||||
A1L equ $3c ;used by monitor
|
||||
A1H equ $3d ;used by monitor
|
||||
LINNUM equ $50 ;50-51
|
||||
FACLO equ $a1
|
||||
CHRGET equ $b1 ;advance ptr, get next tok
|
||||
CHRGOT equ $b7 ;get next tok (no advance)
|
||||
TXTPTR equ $b8
|
||||
HPAG equ $e6 ;$20 or $40
|
||||
|
||||
AMPERV equ $3f5
|
||||
|
||||
TXTCLR equ $c050
|
||||
TXTSET equ $c051
|
||||
MIXCLR equ $c052
|
||||
MIXSET equ $c053
|
||||
LOWSCR equ $c054
|
||||
HISCR equ $c055
|
||||
LORES equ $c056
|
||||
HIRES equ $c057
|
||||
|
||||
ERROR equ $d412 ;error based on X reg
|
||||
FRMNUM equ $dd67
|
||||
SynError equ $dec9 ;throw SYNTAX ERROR
|
||||
CHKCOM equ $debe
|
||||
IllQError equ $e199 ;throw ILLEGAL QUANTITY ERROR
|
||||
GETADR equ $e752
|
||||
GETBYT equ $e6f8 ;gets byte, in X/FACLO
|
||||
HFNS equ $f6b9 ;get hi-res x/y for hplot
|
||||
|
||||
* Prepare the ampersand vector.
|
||||
*
|
||||
* Ideally we'd check to see if the existing vector is
|
||||
* different from ours, and if so, jump to it when we
|
||||
* get a token we don't recognize. Not convinced
|
||||
* there's an actual use case for this.
|
||||
init
|
||||
lda #$4c ;JMP, in case it got
|
||||
sta AMPERV ; trashed
|
||||
lda #<dispatch
|
||||
sta AMPERV+1
|
||||
lda #>dispatch
|
||||
sta AMPERV+2
|
||||
rts
|
||||
|
||||
* Entry point from BASIC. The token is in A.
|
||||
dispatch
|
||||
ldx #:cmdend-:cmdtab-1
|
||||
]loop cmp :cmdtab,x
|
||||
beq :match
|
||||
dex
|
||||
bpl ]loop
|
||||
jmp SynError
|
||||
|
||||
:match
|
||||
lda :jmptabh,x
|
||||
* lda #>h_new ;all on first page
|
||||
pha
|
||||
lda :jmptabl,x
|
||||
pha
|
||||
jmp CHRGET ;eat token, jump
|
||||
|
||||
|
||||
:cmdtab dfb tok_new
|
||||
dfb tok_hgr
|
||||
dfb tok_hgr2
|
||||
dfb tok_scrn
|
||||
dfb tok_hcolor
|
||||
dfb tok_inverse
|
||||
dfb tok_clear
|
||||
dfb tok_hplot
|
||||
dfb tok_xdraw
|
||||
dfb tok_draw
|
||||
dfb tok_exp
|
||||
dfb tok_cos
|
||||
dfb tok_sin
|
||||
dfb tok_at
|
||||
dfb tok_plot
|
||||
:cmdend
|
||||
|
||||
:jmptabl dfb <h_new-1
|
||||
dfb <h_hgr-1
|
||||
dfb <h_hgr2-1
|
||||
dfb <h_scrn-1
|
||||
dfb <h_hcolor-1
|
||||
dfb <h_inverse-1
|
||||
dfb <h_clear-1
|
||||
dfb <h_hplot-1
|
||||
dfb <h_xdraw-1
|
||||
dfb <h_draw-1
|
||||
dfb <h_exp-1
|
||||
dfb <h_cos-1
|
||||
dfb <h_sin-1
|
||||
dfb <h_at-1
|
||||
dfb <h_plot-1
|
||||
:jmptabh dfb >h_new-1
|
||||
dfb >h_hgr-1
|
||||
dfb >h_hgr2-1
|
||||
dfb >h_scrn-1
|
||||
dfb >h_hcolor-1
|
||||
dfb >h_inverse-1
|
||||
dfb >h_clear-1
|
||||
dfb >h_hplot-1
|
||||
dfb >h_xdraw-1
|
||||
dfb >h_draw-1
|
||||
dfb >h_exp-1
|
||||
dfb >h_cos-1
|
||||
dfb >h_sin-1
|
||||
dfb >h_at-1
|
||||
dfb >h_plot-1
|
||||
|
||||
|
||||
********************************
|
||||
* &NEW - initialize
|
||||
h_new
|
||||
lda #$20 ;match Init result
|
||||
sta g_cur_page
|
||||
lda #$00
|
||||
sta g_hcolor
|
||||
tax ;init "previous hplot"
|
||||
tay ; coord to zero
|
||||
jsr storeprv
|
||||
ldx #139 ;279/2
|
||||
ldy #0
|
||||
lda #95 ;191/2
|
||||
jsr storeac
|
||||
jmp f_Init
|
||||
|
||||
********************************
|
||||
* &HGR - show page 1 with mixed text, and clear screen.
|
||||
* Sets the color to zero.
|
||||
h_hgr
|
||||
ldx #$20 ;page 1
|
||||
lda #$00 ;$c054
|
||||
beq hgr_com
|
||||
|
||||
********************************
|
||||
* &HGR2 - show page 2 with no text, and clear screen.
|
||||
* Sets the color to zero.
|
||||
h_hgr2
|
||||
ldx #$40 ;page 2
|
||||
lda #$01 ;$c055
|
||||
;fall through to hgr_com
|
||||
|
||||
* We go slightly out of our way to clear the screen
|
||||
* before tripping the softswitches. This avoids
|
||||
* flashing the previous hi-res page contents when
|
||||
* entering from text mode.
|
||||
*
|
||||
* We also want to go nomix-page2 but page1-mix
|
||||
* (note reverse order) to avoid flashing text pg 2.
|
||||
hgr_com stx f_in_arg
|
||||
stx g_cur_page
|
||||
stx HPAG ;probably useful
|
||||
pha
|
||||
jsr f_SetPage
|
||||
lda #$00
|
||||
sta f_in_arg
|
||||
jsr f_SetColor
|
||||
jsr f_Clear
|
||||
lda g_hcolor ;restore color
|
||||
sta f_in_arg
|
||||
jsr f_SetColor
|
||||
bit TXTCLR ;$c050
|
||||
bit HIRES ;$c057
|
||||
pla
|
||||
beq :pg1
|
||||
bit MIXCLR ;$c052
|
||||
bit HISCR ;$c055
|
||||
rts
|
||||
:pg1 bit LOWSCR ;$c054
|
||||
bit MIXSET ;$c053
|
||||
rts
|
||||
|
||||
********************************
|
||||
* &SCRN({1,2}) - set the current hi-res page
|
||||
h_scrn
|
||||
jsr GETBYT
|
||||
cpx #1
|
||||
beq :okay
|
||||
cpx #2
|
||||
beq :okay
|
||||
jmp IllQError
|
||||
:okay jsr CHRGET ;eat ')' (we assume)
|
||||
txa ;X/Y unaltered
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
asl ;multiply x32
|
||||
sta g_cur_page
|
||||
sta f_in_arg
|
||||
jmp f_SetPage
|
||||
|
||||
********************************
|
||||
* &HCOLOR={0-7} - set the current color
|
||||
h_hcolor
|
||||
jsr GETBYT ;get color
|
||||
cpx #8
|
||||
blt :okay
|
||||
jmp IllQError
|
||||
:okay stx f_in_arg
|
||||
stx g_hcolor
|
||||
jmp f_SetColor
|
||||
|
||||
********************************
|
||||
* &INVERSE - flip pages
|
||||
*
|
||||
* If we're currently drawing on $20, we set the page
|
||||
* to $40 and hit $c054 to show $20. And vice-versa.
|
||||
* The goal is to make double-buffered animation easy.
|
||||
h_inverse
|
||||
lda g_cur_page
|
||||
eor #$60
|
||||
sta g_cur_page
|
||||
ldx #$00
|
||||
cmp #$40 ;about to start drawing on 2?
|
||||
beq :showpg1 ;yes, show page 1
|
||||
inx ;no, show page 2
|
||||
:showpg1 ldy LOWSCR,x
|
||||
sta f_in_arg
|
||||
jmp f_SetPage
|
||||
|
||||
********************************
|
||||
* &CLEAR - clear current page to current color.
|
||||
h_clear
|
||||
jmp f_Clear ;well, that was easy
|
||||
|
||||
********************************
|
||||
* &XDRAW left,top,right,bottom - draw rectangle outline
|
||||
h_xdraw
|
||||
jsr getltrb
|
||||
jmp f_DrawRect
|
||||
|
||||
********************************
|
||||
* &DRAW left,top,right,bottom - draw filled rectangle
|
||||
h_draw
|
||||
jsr getltrb
|
||||
jmp f_FillRect
|
||||
|
||||
********************************
|
||||
* &EXP {0,1} - set line draw mode
|
||||
h_exp
|
||||
jsr GETBYT
|
||||
cpx #2
|
||||
blt :okay
|
||||
jmp IllQError
|
||||
:okay stx f_in_arg
|
||||
jmp f_SetLineMode
|
||||
|
||||
********************************
|
||||
* &COS cx,cy,rad - draw outline circle
|
||||
h_cos
|
||||
jsr getcxcyr
|
||||
jmp f_DrawCircle
|
||||
|
||||
********************************
|
||||
* &SIN cx,cy,rad - draw filled circle
|
||||
h_sin
|
||||
jsr getcxcyr
|
||||
jmp f_FillCircle
|
||||
|
||||
********************************
|
||||
* &AT x,y - select center for array draw
|
||||
h_at
|
||||
jsr HFNS
|
||||
jmp storeac
|
||||
|
||||
********************************
|
||||
* &PLOT vertexAddr, indexAddr, indexCount [AT cx,cy]
|
||||
* draw lines from arrays of vertices and indices
|
||||
h_plot jmp array_draw
|
||||
|
||||
********************************
|
||||
* &HPLOT x,y - draw a point
|
||||
* &HPLOT TO x,y - draw a line from last point to x,y
|
||||
* &HPLOT x0,y0 to x1,y1 - draw a line
|
||||
lst on ;last token handler --
|
||||
h_hplot equ * ; must be on first page
|
||||
lst off ; to omit high byte table
|
||||
|
||||
jsr CHRGOT ;check next token
|
||||
lst off
|
||||
cmp #tok_to ;is this an "HPLOT TO"?
|
||||
beq :leadingto
|
||||
jsr getx1y1 ;get the first coord
|
||||
jsr copy1to0
|
||||
jsr CHRGOT ;see if single point
|
||||
cmp #tok_to
|
||||
beq :hplot_to ;nope, draw line
|
||||
jsr copy0toprev ;draw point, and save x/y
|
||||
jmp f_DrawPoint ; for subsequent HPLOT TO
|
||||
|
||||
:leadingto ;"HPLOT TO", restore the
|
||||
lda g_prevxl ; previous coord to x0/y0
|
||||
sta f_in_x0l ;(can't rely on f_in_zzz
|
||||
lda g_prevxh ; being there -- we might
|
||||
sta f_in_x0h ; have drawn a rect)
|
||||
lda g_prevy
|
||||
sta f_in_y0
|
||||
:hplot_to
|
||||
jsr CHRGET ;eat the TO
|
||||
jsr getx1y1 ;get the coords
|
||||
jsr f_DrawLine ;draw it
|
||||
jsr copy1to0 ;shift 1->0 for next round
|
||||
jsr CHRGOT
|
||||
cmp #tok_to ;another TO?
|
||||
beq :hplot_to ;yes, branch
|
||||
jmp copy0toprev ;no, save prev and bail
|
||||
|
||||
* Get coordinates and store in X1/Y1.
|
||||
getx1y1
|
||||
jsr HFNS
|
||||
store1 stx f_in_x1l ;store X/Y/A in coord1
|
||||
sty f_in_x1h
|
||||
sta f_in_y1
|
||||
rts
|
||||
|
||||
* Save x0/y0 as our "previous" coordinate.
|
||||
copy0toprev
|
||||
ldx f_in_x0l
|
||||
ldy f_in_x0h
|
||||
lda f_in_y0
|
||||
storeprv stx g_prevxl ;store X/Y/A in g_prev
|
||||
sty g_prevxh
|
||||
sta g_prevy
|
||||
rts
|
||||
|
||||
* Copy X1/Y1 into X0/Y0.
|
||||
copy1to0
|
||||
ldx f_in_x1l
|
||||
ldy f_in_x1h
|
||||
lda f_in_y1
|
||||
store0 stx f_in_x0l ;store X/Y/A in coord 0
|
||||
sty f_in_x0h
|
||||
sta f_in_y0
|
||||
rts
|
||||
|
||||
* Store X/Y/A into array-center.
|
||||
storeac stx g_ac_xl
|
||||
sty g_ac_xh
|
||||
sta g_ac_y
|
||||
rts
|
||||
|
||||
* Get left/top/right/bottom coordinates.
|
||||
getltrb
|
||||
jsr HFNS
|
||||
jsr store0 ;save as X0/Y0
|
||||
jsr CHKCOM ;eat a comma
|
||||
jsr HFNS
|
||||
jsr store1 ;save as X1/Y1
|
||||
rts
|
||||
|
||||
* Get center coordinates and radius.
|
||||
getcxcyr
|
||||
jsr HFNS ;get CX and CY
|
||||
jsr store0 ;save as X0/Y0
|
||||
jsr CHKCOM ;eat a comma
|
||||
jsr GETBYT ;convert to 0-255
|
||||
stx f_in_rad
|
||||
rts
|
||||
|
||||
* Array-draw handler.
|
||||
*
|
||||
* We know that fdraw doesn't use LINNUM or A1L/A1H,
|
||||
* so it's safe to use them here.
|
||||
array_draw
|
||||
]vertices equ A1L ;2b
|
||||
]indices equ LINNUM ;2b
|
||||
]count equ PCL
|
||||
]cur equ PCH
|
||||
|
||||
jsr FRMNUM ;get vertex buffer address
|
||||
jsr GETADR
|
||||
lda LINNUM ;copy to A1L
|
||||
sta ]vertices
|
||||
lda LINNUM+1
|
||||
sta ]vertices+1
|
||||
jsr CHKCOM ;eat the comma
|
||||
jsr FRMNUM ;get index buffer address
|
||||
jsr GETADR ;leave it in LINNUM
|
||||
jsr CHKCOM
|
||||
jsr GETBYT ;get the count
|
||||
cpx #128 ;range check (0-127)
|
||||
blt :countok
|
||||
jmp IllQError
|
||||
:countok txa
|
||||
beq :done ;nothing to do
|
||||
asl ;double it
|
||||
sta ]count ;stash it
|
||||
lda #$00
|
||||
sta ]cur
|
||||
|
||||
* Check for optional AT cx,cy.
|
||||
jsr CHRGOT
|
||||
cmp #tok_at
|
||||
bne :noat
|
||||
JSR CHRGET ;eat the AT
|
||||
lda LINNUM ;the code that reads the
|
||||
pha ; hi-res coordinates will
|
||||
lda LINNUM+1 ; overwrite LINNUM, so
|
||||
pha ; we have to save & restore
|
||||
jsr h_at
|
||||
pla
|
||||
sta LINNUM+1
|
||||
pla
|
||||
sta LINNUM
|
||||
:noat
|
||||
|
||||
]loop jsr getvertex
|
||||
bcs :skip2
|
||||
jsr store0
|
||||
jsr getvertex
|
||||
bcs :skip
|
||||
jsr store1
|
||||
jsr f_DrawLine
|
||||
dfb $2c ;BIT addr
|
||||
:skip2 inc ]cur
|
||||
:skip lda ]cur
|
||||
cmp ]count
|
||||
blt ]loop
|
||||
:done rts
|
||||
|
||||
* Get the Nth vertex, specified by ]cur, and load it
|
||||
* into X/Y/A (xlo/xhi/y). Returns with carry set if
|
||||
* the vertex is invalid.
|
||||
*
|
||||
* Increments ]cur by 1.
|
||||
getvertex
|
||||
ldy ]cur
|
||||
inc ]cur
|
||||
lda (]indices),y
|
||||
bmi :badv ;must be 0-127
|
||||
jsr :calcvertex
|
||||
|
||||
ldx g_out_x
|
||||
ldy g_out_x+1
|
||||
beq :xok ;0-255, ok
|
||||
cpy #1
|
||||
bne :badv ;512+
|
||||
cpx #280-256
|
||||
bge :badv ;280-511
|
||||
:xok
|
||||
lda g_out_y+1
|
||||
bne :badv ;Y is neg or > 255
|
||||
lda g_out_y
|
||||
cmp #192
|
||||
bcc :goodv
|
||||
:badv
|
||||
sec
|
||||
:goodv rts
|
||||
|
||||
* Get VX and VY, merging with AC, and store in
|
||||
* 16-bit g_out_x and g_out_y. Range not checked
|
||||
* here. On entry, A has vertex index.
|
||||
:calcvertex
|
||||
asl
|
||||
tay
|
||||
ldx #$00 ;hi byte of vertex
|
||||
lda (]vertices),y ;x-coord
|
||||
bpl :xpos
|
||||
dex ;sign-extend hi byte
|
||||
:xpos clc
|
||||
adc g_ac_xl
|
||||
sta g_out_x
|
||||
txa
|
||||
adc g_ac_xh
|
||||
sta g_out_x+1
|
||||
|
||||
iny
|
||||
ldx #$00
|
||||
lda (]vertices),y ;y-coord
|
||||
bpl :ypos
|
||||
dex ;sign-extend hi byte
|
||||
:ypos clc
|
||||
adc g_ac_y
|
||||
sta g_out_y
|
||||
bcc :nocarry
|
||||
inx
|
||||
:nocarry stx g_out_y+1
|
||||
rts
|
||||
|
||||
|
||||
|
||||
********************************
|
||||
* Global variables
|
||||
|
||||
g_cur_page ds 1 ;$20 or $40
|
||||
g_hcolor ds 1
|
||||
g_prevxl ds 1
|
||||
g_prevxh ds 1
|
||||
g_prevy ds 1
|
||||
g_ac_xl ds 1 ;Center-point coordinates
|
||||
g_ac_xh ds 1 ; for array-based line
|
||||
g_ac_y ds 1 ; draw (&AT, &PLOT).
|
||||
g_out_x ds 2 ;16-bit coordinates for
|
||||
g_out_y ds 2 ; array-based line draw
|
||||
|
||||
|
||||
|
||||
lst on
|
||||
end equ *
|
||||
sav amperfdraw
|
||||
lst off
|
||||
@@ -0,0 +1,44 @@
|
||||
********************************
|
||||
* *
|
||||
* Definitions for fdraw v0.3 *
|
||||
* *
|
||||
* Use "PUT" to include these *
|
||||
* definitions in code that *
|
||||
* uses fdraw. *
|
||||
* *
|
||||
********************************
|
||||
|
||||
fdraw_start equ $6000
|
||||
|
||||
f_Init equ fdraw_start+0
|
||||
f_majvers equ fdraw_start+3
|
||||
f_minvers equ fdraw_start+4
|
||||
|
||||
f_in_arg equ fdraw_start+5
|
||||
f_in_x0l equ fdraw_start+6
|
||||
f_in_x0h equ fdraw_start+7
|
||||
f_in_y0 equ fdraw_start+8
|
||||
f_in_x1l equ fdraw_start+9
|
||||
f_in_x1h equ fdraw_start+10
|
||||
f_in_y1 equ fdraw_start+11
|
||||
f_in_rad equ fdraw_start+12
|
||||
|
||||
f_SetColor equ fdraw_start+16
|
||||
f_SetPage equ fdraw_start+19
|
||||
f_Clear equ fdraw_start+22
|
||||
f_DrawPoint equ fdraw_start+25
|
||||
f_DrawLine equ fdraw_start+28
|
||||
f_DrawRect equ fdraw_start+31
|
||||
f_FillRect equ fdraw_start+34
|
||||
f_DrawCircle equ fdraw_start+37
|
||||
f_FillCircle equ fdraw_start+40
|
||||
f_SetLineMode equ fdraw_start+43
|
||||
|
||||
f_FillRaster equ fdraw_start+49
|
||||
f_rast_top equ fdraw_start+52
|
||||
f_rast_bottom equ fdraw_start+53
|
||||
|
||||
f_rastx0l equ fdraw_start+54
|
||||
f_rastx0h equ fdraw_start+56
|
||||
f_rastx1l equ fdraw_start+58
|
||||
f_rastx1h equ fdraw_start+60
|
||||
@@ -0,0 +1,40 @@
|
||||
; Copyright 2018 faddenSoft. All Rights Reserved.
|
||||
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
||||
|
||||
*SYNOPSIS Addresses exported from fdraw
|
||||
|
||||
; These come from FDRAW.DEFS.S, which would be included as a source
|
||||
; file in any code that wanted to use the fdraw library.
|
||||
|
||||
fdraw_start = $6000
|
||||
f_Init @ $6000 ;init library; sets color=0 page=$20
|
||||
f_majvers @ $6003 ;library major version
|
||||
f_minvers @ $6004 ;library minor version
|
||||
f_in_arg @ $6005 ;arg for misc functions
|
||||
f_in_x0l @ $6006 ;low part of X0 coord (0-279)
|
||||
f_in_x0h @ $6007 ;high part of X0 coord (0-279)
|
||||
f_in_y0 @ $6008 ;Y0 coord (0-191)
|
||||
f_in_x1l @ $6009 ;low part of X1 coord (0-279)
|
||||
f_in_x1h @ $600a ;high part of X1 coord (0-279)
|
||||
f_in_y1 @ $600b ;Y1 coord (0-191)
|
||||
f_in_rad @ $600c ;circle radius (0-255)
|
||||
|
||||
f_SetColor @ $6010 ;set color used for drawing (0-7)
|
||||
f_SetPage @ $6013 ;set page to value in arg ($20 or $40)
|
||||
f_Clear @ $6016 ;erase current page to current color
|
||||
f_DrawPoint @ $6019 ;plot a single point at X0,Y0
|
||||
f_DrawLine @ $601c ;draw line from X0,Y0 to X1,Y1 (inclusive)
|
||||
f_DrawRect @ $601f ;draw rect w/corners X0,Y0 and X1,Y1
|
||||
f_FillRect @ $6022 ;draw filled rect w/corners X0,Y0 and X1,Y1
|
||||
f_DrawCircle @ $6025 ;draw circle at X0,Y0 with radius=rad
|
||||
f_FillCircle @ $6028 ;draw filled circle at X0,Y0 with radius=rad
|
||||
f_SetLineMode @ $602b ;set line mode from arg (0=normal, 1=xdraw)
|
||||
|
||||
f_FillRaster @ $6031 ;draw shape from raster table
|
||||
f_rast_top @ $6034 ;top line (0-191)
|
||||
f_rast_bottom @ $6035 ;bottom line (inclusive) (0-191)
|
||||
|
||||
f_rastx0l @ $6036 ;address of rastx1l table (read-only)
|
||||
f_rastx0h @ $6038 ;address of rastx1h table (read-only)
|
||||
f_rastx1l @ $603a ;address of rastx2l table (read-only)
|
||||
f_rastx1h @ $603c ;address of rastx2h table (read-only)
|
||||
Binary file not shown.
@@ -0,0 +1,282 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":1,"FileDataLength":1816,"FileDataCrc32":775804905,"ProjectProps":{
|
||||
"CpuName":"65816","IncludeUndocumentedInstr":false,"EntryFlags":12780031,"AnalysisParams":{
|
||||
"AnalyzeUncategorizedData":true,"MinCharsForString":4,"SeekNearbyTargets":true},
|
||||
"PlatformSymbolFileIdentifiers":["RT:Apple/Cxxx-IO.sym65","RT:Apple/IIgs-ROM.sym65","RT:Apple/GSOS.sym65"],"ExtensionScriptFileIdentifiers":["RT:Apple/GSOS.cs","RT:Apple/IIgs-Toolbox.cs"],"ProjectSyms":{
|
||||
}},
|
||||
"AddressMap":[{
|
||||
"Offset":0,"Addr":131072},
|
||||
{
|
||||
"Offset":158,"Addr":196608},
|
||||
{
|
||||
"Offset":232,"Addr":0}],"TypeHints":[{
|
||||
"Low":358,"High":358,"Hint":"Code"}],"StatusFlagOverrides":{
|
||||
},
|
||||
"Comments":{
|
||||
"306":"3 states for item 1","308":"2 here"},
|
||||
"LongComments":{
|
||||
"-2147483647":{
|
||||
"Text":"6502bench SourceGen v1.0.0-alpha1","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"0":{
|
||||
"Text":"~ExpressLoad segment header","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"158":{
|
||||
"Text":"Code segment header\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"232":{
|
||||
"Text":"\r\nStart of code.\r\n\r\nThis begins with the header required for CDAs.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"296":{
|
||||
"Text":"\r\nGlobal variable storage.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"310":{
|
||||
"Text":"\r\nText screen line offsets.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"865":{
|
||||
"Text":"\r\nCDA shutdown entry point.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1597":{
|
||||
"Text":"\r\nMesgData\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"358":{
|
||||
"Text":"\r\nMain entry point from system.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1672":{
|
||||
"Text":"Not sure what this is.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0}},
|
||||
"Notes":{
|
||||
"232":{
|
||||
"Text":"Start of the interesting stuff. The values that are updated by the relocating loader are all based off of 00/0000, so that\u0027s where we set the ORG. This confuses things a bit, since we seem to be running our code off of zero page, but it mostly seems to work.\r\n\r\nThis could use further refinement, but I\u0027m not sure there\u0027s much point without actual OMF support.","BoxMode":false,"MaxWidth":80,"BackgroundColor":-7278960}},
|
||||
"UserLabels":{
|
||||
"72":{
|
||||
"Label":"ExpressLoad","Value":131144,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"232":{
|
||||
"Label":"Header","Value":0,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"306":{
|
||||
"Label":"max1","Value":74,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"300":{
|
||||
"Label":"hilite_opt","Value":68,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"304":{
|
||||
"Label":"stat2","Value":72,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"302":{
|
||||
"Label":"stat1","Value":70,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"298":{
|
||||
"Label":"global_flags","Value":66,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"296":{
|
||||
"Label":"global_mode","Value":64,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"308":{
|
||||
"Label":"max2","Value":76,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"358":{
|
||||
"Label":"Main","Value":126,"Source":"User","Type":"GlobalAddr"},
|
||||
"770":{
|
||||
"Label":"fail_cause","Value":538,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"948":{
|
||||
"Label":"InitScreen","Value":716,"Source":"User","Type":"GlobalAddr"},
|
||||
"671":{
|
||||
"Label":"ErrorMain","Value":439,"Source":"User","Type":"GlobalAddr"},
|
||||
"865":{
|
||||
"Label":"ShutDown","Value":633,"Source":"User","Type":"GlobalAddr"},
|
||||
"310":{
|
||||
"Label":"texttab","Value":78,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"866":{
|
||||
"Label":"GetKey","Value":634,"Source":"User","Type":"GlobalAddr"},
|
||||
"932":{
|
||||
"Label":"event_rec","Value":700,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1175":{
|
||||
"Label":"err_flag","Value":943,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1270":{
|
||||
"Label":"DrawScreen","Value":1038,"Source":"User","Type":"GlobalAddr"},
|
||||
"1477":{
|
||||
"Label":"items","Value":1245,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1483":{
|
||||
"Label":"item1","Value":1251,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1573":{
|
||||
"Label":"item2","Value":1341,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1465":{
|
||||
"Label":"cur_line","Value":1233,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1467":{
|
||||
"Label":"cur_item","Value":1235,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1469":{
|
||||
"Label":"item_stat","Value":1237,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1471":{
|
||||
"Label":"item_ptr","Value":1239,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1473":{
|
||||
"Label":"cmask","Value":1241,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1475":{
|
||||
"Label":"csub","Value":1243,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1493":{
|
||||
"Label":"title1","Value":1261,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1501":{
|
||||
"Label":"i1compr","Value":1269,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1525":{
|
||||
"Label":"i1decomp","Value":1293,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1549":{
|
||||
"Label":"i1inact","Value":1317,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1581":{
|
||||
"Label":"title2","Value":1349,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1624":{
|
||||
"Label":"data_in","Value":1392,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1626":{
|
||||
"Label":"data_out","Value":1394,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1646":{
|
||||
"Label":"SendMsg","Value":1414,"Source":"User","Type":"GlobalAddr"},
|
||||
"1597":{
|
||||
"Label":"idstring","Value":1365,"Source":"User","Type":"LocalOrGlobalAddr"}},
|
||||
"OperandFormats":{
|
||||
"0":{
|
||||
"Length":72,"Format":"Dense","SubFormat":"None","SymbolRef":null},
|
||||
"72":{
|
||||
"Length":86,"Format":"Dense","SubFormat":"None","SymbolRef":null},
|
||||
"158":{
|
||||
"Length":74,"Format":"Dense","SubFormat":"None","SymbolRef":null},
|
||||
"232":{
|
||||
"Length":20,"Format":"String","SubFormat":"L8String","SymbolRef":null},
|
||||
"252":{
|
||||
"Length":4,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"Main","Part":"Low"}},
|
||||
"256":{
|
||||
"Length":4,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"ShutDown","Part":"Low"}},
|
||||
"260":{
|
||||
"Length":36,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"296":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"298":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"300":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"302":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"304":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"306":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"308":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"310":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"312":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"314":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"316":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"318":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"320":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"322":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"324":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"326":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"328":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"330":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"332":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"334":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"336":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"338":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"340":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"342":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"344":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"346":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"348":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"350":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"352":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"354":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"356":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"770":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"772":{
|
||||
"Length":31,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"803":{
|
||||
"Length":29,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"832":{
|
||||
"Length":33,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"877":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"880":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"883":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"event_rec","Part":"Bank"}},
|
||||
"886":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"event_rec","Part":"Low"}},
|
||||
"1175":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1177":{
|
||||
"Length":20,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1465":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1467":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1469":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1471":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1473":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1475":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1477":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1479":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1481":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1483":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1485":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1487":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1489":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1491":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1493":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1501":{
|
||||
"Length":24,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1525":{
|
||||
"Length":24,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1549":{
|
||||
"Length":24,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1573":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1575":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1577":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Address","SymbolRef":null},
|
||||
"1579":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1581":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1589":{
|
||||
"Length":4,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1593":{
|
||||
"Length":4,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1597":{
|
||||
"Length":27,"Format":"String","SubFormat":"L8String","SymbolRef":null},
|
||||
"1624":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1650":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"idstring","Part":"Bank"}},
|
||||
"1653":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"idstring","Part":"Low"}},
|
||||
"1658":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"data_out","Part":"Bank"}},
|
||||
"1672":{
|
||||
"Length":144,"Format":"Dense","SubFormat":"None","SymbolRef":null}}}
|
||||
@@ -0,0 +1,850 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;
|
||||
; cda.asm - HardPressed classic desk accessory
|
||||
; Copyright (C) 1993 by Andy McFadden
|
||||
;
|
||||
; This is an example of communication with HardPressed. It illustrates
|
||||
; getting and setting the INIT's status with SendRequest. The calls used
|
||||
; here are the ONLY ones which are guaranteed to exist in future versions
|
||||
; of HardPressed.
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
CASE ON
|
||||
OBJCASE ON
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
Header START
|
||||
;
|
||||
; System-required header for the CDA.
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
dc I1'str_end-str_begin'
|
||||
str_begin anop
|
||||
dc C'HardPressed Control'
|
||||
str_end anop
|
||||
|
||||
dc A4'Main'
|
||||
dc A4'ShutDown'
|
||||
|
||||
dc C'Copyright (C) 1993 by Andy McFadden',H'00'
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
Globals DATA
|
||||
;
|
||||
; Program-wide defs.
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;
|
||||
; DP defs
|
||||
;
|
||||
ptr gequ $00 ;4b
|
||||
ptr2 gequ $04 ;4b
|
||||
|
||||
;
|
||||
; Softswitches
|
||||
;
|
||||
CLR80VID equ $e0c00c
|
||||
SETALTCHR equ $e0c00f
|
||||
|
||||
;
|
||||
; Global variables
|
||||
;
|
||||
global_mode ds 2
|
||||
global_flags ds 2
|
||||
|
||||
; CDA display status
|
||||
dMaxOpt equ 2
|
||||
hilite_opt ds 2
|
||||
stat_tab anop
|
||||
stat1 ds 2
|
||||
stat2 ds 2
|
||||
max_tab anop
|
||||
max1 dc I2'3' ;3 states for item 1
|
||||
max2 dc I2'2' ;2 here
|
||||
|
||||
;
|
||||
; reasons for failure
|
||||
;
|
||||
failP8 gequ 1
|
||||
failInactive gequ 2
|
||||
failBusy gequ 3
|
||||
|
||||
;
|
||||
; Text screen line offsets
|
||||
;
|
||||
texttab ANOP
|
||||
dc I2'$400,$480,$500,$580,$600,$680,$700,$780'
|
||||
dc I2'$428,$4a8,$528,$5a8,$628,$6a8,$728,$7a8'
|
||||
dc I2'$450,$4d0,$550,$5d0,$650,$6d0,$750,$7d0'
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
Main START
|
||||
;
|
||||
; Calling conventions:
|
||||
; (called by control panel)
|
||||
;
|
||||
; Stack is on page 1, DP is on page 0.
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
using MesgData
|
||||
using Globals
|
||||
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
; see if GS/OS is active
|
||||
lda >$e100bc ;OS_KIND
|
||||
and #$00ff
|
||||
cmp #$0001 ;GS/OS
|
||||
beq is_gsos
|
||||
lda #failP8
|
||||
jmp ErrorMain
|
||||
is_gsos anop
|
||||
|
||||
; see if HardPressed is active
|
||||
lda #dMping
|
||||
ldx #$0000 ;no data_in
|
||||
txy
|
||||
jsr SendMsg ;leaves version in data_out+$02
|
||||
bcc hp_active ;if no error, HP is up
|
||||
; cmp #$0120 ;reqNotAccepted
|
||||
; beq nohear ;else probably $0122 (invalidReq)
|
||||
|
||||
inactive anop
|
||||
lda #failInactive
|
||||
jmp ErrorMain
|
||||
hp_busy anop
|
||||
lda #failBusy
|
||||
jmp ErrorMain
|
||||
|
||||
hp_active anop
|
||||
lda #dMgetStatus
|
||||
ldx #$0000 ;no data_in
|
||||
txy
|
||||
jsr SendMsg ;failure here probably means that
|
||||
bcs hp_busy ; HP is busy (must be _AlertWindow)
|
||||
|
||||
;
|
||||
; From here on, assume HardPressed is active and functioning normally.
|
||||
;
|
||||
lda data_out+2 ;split the mode and the flags into
|
||||
tax ; two parts
|
||||
and #$00ff
|
||||
sta global_mode
|
||||
txa
|
||||
and #$ff00
|
||||
sta global_flags
|
||||
|
||||
lda #$0000
|
||||
jsr InitScreen ;set 40 cols, clear, draw border
|
||||
|
||||
; init menu stuff
|
||||
stz hilite_opt
|
||||
|
||||
ldx #$0000
|
||||
lda global_mode
|
||||
cmp #dVpolOn
|
||||
beq got_pol
|
||||
inx
|
||||
cmp #dVpolDecode
|
||||
beq got_pol
|
||||
inx
|
||||
got_pol anop
|
||||
stx stat1
|
||||
|
||||
ldx #$0000
|
||||
lda global_flags
|
||||
bit #fGverify
|
||||
beq got_ver
|
||||
inx
|
||||
got_ver anop
|
||||
stx stat2
|
||||
|
||||
;
|
||||
; main loop
|
||||
;
|
||||
redraw_loop ANOP
|
||||
jsr DrawScreen
|
||||
|
||||
key_loop ANOP
|
||||
jsr GetKey
|
||||
|
||||
cmp #$000d ;return?
|
||||
beq save_status
|
||||
cmp #$001b ;escape?
|
||||
bne not_esc
|
||||
brl escape_hit
|
||||
not_esc anop
|
||||
|
||||
cmp #$000a ;Ctrl-J (down arrow)?
|
||||
beq dn
|
||||
cmp #$000b ;Ctrl-K (up arrow)?
|
||||
beq up
|
||||
cmp #$0008 ;Ctrl-H (left arrow)?
|
||||
beq left
|
||||
cmp #$0015 ;Ctrl-U (right arrow)?
|
||||
beq right
|
||||
|
||||
pea $0008 ;sbBadKeypress
|
||||
ldx #$3803 ;_SysBeep2
|
||||
jsl $e10000
|
||||
bra key_loop
|
||||
|
||||
dn anop
|
||||
lda hilite_opt
|
||||
inc A
|
||||
sta hilite_opt
|
||||
cmp #dMaxOpt
|
||||
blt redraw_loop
|
||||
stz hilite_opt
|
||||
bra redraw_loop
|
||||
|
||||
up anop
|
||||
lda hilite_opt
|
||||
dec A
|
||||
bpl upstore
|
||||
lda #dMaxOpt-1
|
||||
upstore anop
|
||||
sta hilite_opt
|
||||
bra redraw_loop
|
||||
|
||||
right anop
|
||||
lda hilite_opt
|
||||
asl A
|
||||
tax
|
||||
lda stat_tab,x
|
||||
inc A
|
||||
cmp max_tab,x
|
||||
blt rightstore
|
||||
lda #$0000
|
||||
rightstore anop
|
||||
sta stat_tab,x
|
||||
bra redraw_loop
|
||||
|
||||
left anop
|
||||
lda hilite_opt
|
||||
asl A
|
||||
tax
|
||||
lda stat_tab,x
|
||||
dec A
|
||||
bpl leftstore
|
||||
lda max_tab,x
|
||||
dec A
|
||||
leftstore anop
|
||||
sta stat_tab,x
|
||||
bra redraw_loop
|
||||
|
||||
;
|
||||
; If return was hit, send the new status to the INIT
|
||||
;
|
||||
save_status ANOP
|
||||
ldx #dVpolOn ;translate the menu index into
|
||||
lda stat1 ; the HP state value
|
||||
beq got_opol
|
||||
ldx #dVpolDecode
|
||||
cmp #$0001
|
||||
beq got_opol
|
||||
ldx #dVpolOff
|
||||
got_opol anop
|
||||
stx global_mode
|
||||
|
||||
; set/clear the "verify" flag without disturbing any of the others
|
||||
lda #fGverify ;verify flag
|
||||
ldx stat2 ;is verify on?
|
||||
beq v_off
|
||||
tsb global_flags ;enable verify
|
||||
bra v_set
|
||||
v_off anop
|
||||
trb global_flags ;disable verify
|
||||
v_set anop
|
||||
|
||||
lda global_mode ;now put it together with the mode
|
||||
ora global_flags
|
||||
tay ;lo word is status
|
||||
ldx #$0000 ;hi word is zero
|
||||
lda #dMsetStatus
|
||||
jsr SendMsg
|
||||
bcc Done
|
||||
pea $000c ;sbOperationFailed
|
||||
ldx #$3803 ;_SysBeep2
|
||||
jsl $e10000
|
||||
bra Done
|
||||
|
||||
; if escape was hit, just exit
|
||||
escape_hit ANOP
|
||||
|
||||
Done ANOP
|
||||
plb
|
||||
rtl
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ErrorMain START
|
||||
;
|
||||
; Calling conventions:
|
||||
; JMP from Main with reason for failure in Acc
|
||||
;
|
||||
; Displays a screen which tells the user why he/she/it can't use the CDA at
|
||||
; this time.
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
using Globals
|
||||
|
||||
sta fail_cause
|
||||
|
||||
lda #$0001
|
||||
jsr InitScreen
|
||||
|
||||
;
|
||||
; Just draw the message from here
|
||||
;
|
||||
phb
|
||||
pea $e0e0 ;write to text page in bank $e0
|
||||
plb
|
||||
plb
|
||||
|
||||
ldx #11*2
|
||||
lda >texttab,x
|
||||
clc
|
||||
adc #3 ;start at column 4
|
||||
sta <ptr
|
||||
|
||||
lda >fail_cause
|
||||
cmp #failP8
|
||||
bne fail2
|
||||
fail1 anop
|
||||
lda #fail_p8
|
||||
bra fail_comm
|
||||
fail2 anop
|
||||
cmp #failInactive
|
||||
bne fail3
|
||||
lda #fail_hp
|
||||
bra fail_comm
|
||||
fail3 anop
|
||||
lda #fail_busy
|
||||
fail_comm anop
|
||||
sta <ptr2
|
||||
lda #fail_msg|-16
|
||||
sta <ptr2+2
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
ldy #$0000
|
||||
stat_loop anop
|
||||
lda [<ptr2],y
|
||||
beq stat_done
|
||||
sta (ptr),y
|
||||
iny
|
||||
bra stat_loop
|
||||
stat_done anop
|
||||
rep #$20
|
||||
LONGA ON
|
||||
|
||||
plb
|
||||
|
||||
;
|
||||
; Wait for keypress, then bail
|
||||
;
|
||||
key_loop anop
|
||||
jsr GetKey
|
||||
|
||||
cmp #$0020 ;space? (also error result)
|
||||
beq Done
|
||||
cmp #$000d ;return?
|
||||
beq Done
|
||||
cmp #$001b ;escape?
|
||||
bne key_loop
|
||||
|
||||
Done ANOP
|
||||
plb
|
||||
rtl
|
||||
|
||||
fail_cause ds 2
|
||||
fail_msg anop
|
||||
MSB ON
|
||||
fail_p8 dc C" Not accessible from ProDOS 8",H'00'
|
||||
fail_hp dc C" HardPressed is not loaded",H'00'
|
||||
fail_busy dc C" HardPressed is busy doing stuff",H'00'
|
||||
MSB OFF
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ShutDown START
|
||||
;
|
||||
; (does nothing useful)
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
rtl
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
GetKey START
|
||||
;
|
||||
; Calling conventions:
|
||||
; JSR
|
||||
; Returns with key hit in Acc
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
pha
|
||||
ldx #$0606 ;_EMStatus
|
||||
jsl $e10000
|
||||
pla
|
||||
beq inactive
|
||||
|
||||
; EM is active, so use it
|
||||
active ANOP
|
||||
pea $0000
|
||||
pea $0028 ;keyDown and autoKey events only
|
||||
pea event_rec|-16
|
||||
pea event_rec
|
||||
ldx #$0a06 ;_GetNextEvent
|
||||
jsl $e10000
|
||||
pla ;boolean handleEventFlag
|
||||
bcs Fail
|
||||
beq active ;flag was 0, skip it
|
||||
|
||||
lda message
|
||||
bra Done
|
||||
|
||||
; event manager not active, just poll the keyboard
|
||||
inactive ANOP
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
sta >$e0c010
|
||||
lp lda >$e0c000
|
||||
bpl lp
|
||||
sta >$e0c010
|
||||
rep #$20
|
||||
LONGA ON
|
||||
and #$007f
|
||||
|
||||
Done ANOP
|
||||
rts
|
||||
Fail ANOP
|
||||
lda #$0020 ;call it a space bar
|
||||
rts
|
||||
|
||||
event_rec anop
|
||||
what ds 2
|
||||
message ds 4
|
||||
when ds 4
|
||||
where ds 4
|
||||
modifiers ds 2
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
InitScreen START
|
||||
;
|
||||
; Calling conventions:
|
||||
; JSR with 0 or 1 in acc (indicating normal or error start)
|
||||
;
|
||||
; Sets 40 columns and mousetext, then draws the title, border, and key
|
||||
; instructions.
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
using Globals
|
||||
|
||||
sta err_flag
|
||||
|
||||
phb
|
||||
pea $e0e0 ;write to text page in bank $e0
|
||||
plb
|
||||
plb
|
||||
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
sta |CLR80VID ;set 40 columns
|
||||
sta |SETALTCHR ;we want MouseText
|
||||
rep #$20
|
||||
LONGA ON
|
||||
|
||||
home ANOP
|
||||
ldx #23*2
|
||||
loop anop
|
||||
lda >texttab,x
|
||||
sta <ptr
|
||||
ldy #38
|
||||
loop2 anop
|
||||
lda #$a0a0
|
||||
sta (ptr),y
|
||||
dey
|
||||
dey
|
||||
bpl loop2
|
||||
|
||||
dex
|
||||
dex
|
||||
bpl loop
|
||||
|
||||
title ANOP
|
||||
lda >texttab ;addr of line 0 ($400, duh)
|
||||
sta ptr
|
||||
ldx #2*2
|
||||
lda >texttab,x
|
||||
sta ptr2
|
||||
ldy #37 ;two at a time, starting from 37/38
|
||||
tloop1 anop
|
||||
lda #$dfdf ;normal '_'
|
||||
sta (ptr),y
|
||||
lda #$4c4c ;flashing 'L'
|
||||
sta (ptr2),y
|
||||
dey
|
||||
dey
|
||||
bpl tloop1 ;should end at -1
|
||||
|
||||
ldx #1*2
|
||||
lda >texttab,x
|
||||
sta ptr
|
||||
lda #$a05a ;'Z ' (right-bar, space)
|
||||
sta (ptr)
|
||||
; lda #$a041 ;'A ' (apple symbol, space)
|
||||
; ldy #$0002
|
||||
; sta (ptr),y
|
||||
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
ldy #$0002
|
||||
ldx #$0000
|
||||
tloop2 anop
|
||||
lda >title_str,x
|
||||
beq tloop2_done
|
||||
sta (ptr),y
|
||||
inx
|
||||
iny
|
||||
bra tloop2
|
||||
tloop2_done anop
|
||||
lda #$a0
|
||||
sta (ptr),y
|
||||
iny
|
||||
|
||||
lda #$20
|
||||
tloop3 anop
|
||||
cpy #39
|
||||
bge tloop3_done
|
||||
sta (ptr),y
|
||||
iny
|
||||
bra tloop3
|
||||
tloop3_done anop
|
||||
lda #$5f ;left-bar
|
||||
sta (ptr),y
|
||||
rep #$20
|
||||
LONGA ON
|
||||
|
||||
|
||||
box ANOP
|
||||
ldx #2*2
|
||||
edge anop
|
||||
lda >texttab,x
|
||||
sta <ptr
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
lda #$5a
|
||||
sta (ptr)
|
||||
lda #$5f
|
||||
ldy #39
|
||||
sta (ptr),y
|
||||
rep #$20
|
||||
LONGA ON
|
||||
inx
|
||||
inx
|
||||
cpx #23*2
|
||||
blt edge
|
||||
|
||||
bottom anop
|
||||
ldx #23*2
|
||||
lda >texttab,x
|
||||
sta ptr
|
||||
ldy #37
|
||||
bloop anop
|
||||
lda #$4c4c ;flashing 'L' - upper line
|
||||
sta (ptr),y
|
||||
dey
|
||||
dey
|
||||
bpl bloop ;should end at -1
|
||||
|
||||
text ANOP
|
||||
ldx #22*2
|
||||
lda >texttab,x
|
||||
sta ptr
|
||||
|
||||
ldy #$0002
|
||||
ldx #$0000
|
||||
lda >err_flag
|
||||
beq noerr
|
||||
ldx #finstr_str-instr_str
|
||||
noerr anop
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
instr_loop anop
|
||||
lda >instr_str,x
|
||||
beq instr_done
|
||||
sta (ptr),y
|
||||
iny
|
||||
inx
|
||||
bra instr_loop
|
||||
instr_done anop
|
||||
rep #$20
|
||||
LONGA ON
|
||||
|
||||
|
||||
Done ANOP
|
||||
plb
|
||||
rts
|
||||
|
||||
err_flag ds 2
|
||||
|
||||
msg_tab anop
|
||||
MSB ON
|
||||
title_str dc C'HardPressed Control',H'00'
|
||||
instr_str dc C'Select: ',H'48a055a04aa04b'
|
||||
dc C' Cancel:Esc Save: ',H'4d00'
|
||||
finstr_str dc C' Exit: ',H'4d00'
|
||||
MSB OFF
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
DrawScreen START
|
||||
;
|
||||
; Calling conventions:
|
||||
; JSR
|
||||
;
|
||||
; Draws the menu items (selected one in inverse), the appropriate selection,
|
||||
; and a check mark for defaults.
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
using Globals
|
||||
|
||||
;
|
||||
; Initialize counters
|
||||
;
|
||||
lda #4
|
||||
sta cur_line
|
||||
lda #0
|
||||
sta cur_item
|
||||
lda #$00e0
|
||||
sta <ptr2+2
|
||||
|
||||
item_loop ANOP
|
||||
lda cur_line ;set text ptr
|
||||
asl A
|
||||
tax
|
||||
lda texttab,x
|
||||
sta <ptr2
|
||||
|
||||
ldy #2 ;start drawing at column 2
|
||||
lda cur_item
|
||||
asl A
|
||||
tax
|
||||
lda items,x
|
||||
bne _cont1
|
||||
brl Done
|
||||
_cont1 anop
|
||||
sta <ptr
|
||||
sta item_ptr
|
||||
lda (<ptr) ;get pointer to title
|
||||
sta <ptr
|
||||
lda stat_tab,x
|
||||
sta item_stat
|
||||
bne not_default
|
||||
|
||||
lda #$44 ;check mark
|
||||
bra def_comm
|
||||
not_default anop
|
||||
lda #$a0 ;space
|
||||
def_comm anop
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
sta [<ptr2],y
|
||||
rep #$20
|
||||
LONGA ON
|
||||
|
||||
lda #$00ff
|
||||
sta cmask
|
||||
stz csub
|
||||
lda hilite_opt
|
||||
cmp cur_item
|
||||
bne not_hilite
|
||||
lda #$007f
|
||||
sta cmask
|
||||
lda #$0040
|
||||
sta csub
|
||||
not_hilite anop
|
||||
|
||||
iny
|
||||
iny
|
||||
stz <ptr+2 ;temp
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
title_loop anop
|
||||
tyx
|
||||
ldy <ptr+2
|
||||
lda (<ptr),y
|
||||
beq title_done
|
||||
iny
|
||||
sty <ptr+2
|
||||
txy
|
||||
and cmask ;make it inverse if this is current
|
||||
cmp #$60 ;if it's > $60, then it's inverse
|
||||
bge islorn ; lower case or normal text
|
||||
cmp #$40 ;if it's < $40, it's inverse
|
||||
blt islorn ; punctuation (e.g. ':')
|
||||
sec
|
||||
sbc csub
|
||||
islorn anop
|
||||
sta [<ptr2],y
|
||||
iny
|
||||
bra title_loop
|
||||
title_done anop
|
||||
rep #$20
|
||||
LONGA ON
|
||||
txy
|
||||
iny ;space between title and status
|
||||
|
||||
lda item_stat
|
||||
inc A
|
||||
asl A
|
||||
clc
|
||||
adc item_ptr
|
||||
sta <ptr
|
||||
lda (<ptr)
|
||||
sta <ptr
|
||||
|
||||
stz <ptr+2
|
||||
sep #$20
|
||||
LONGA OFF
|
||||
stat_loop anop
|
||||
tyx
|
||||
ldy <ptr+2
|
||||
lda (<ptr),y
|
||||
beq stat_done
|
||||
iny
|
||||
sty <ptr+2
|
||||
txy
|
||||
sta [<ptr2],y
|
||||
iny
|
||||
bra stat_loop
|
||||
stat_done anop
|
||||
rep #$20
|
||||
LONGA ON
|
||||
txy
|
||||
|
||||
;
|
||||
; increment counters and branch
|
||||
;
|
||||
inc cur_item
|
||||
inc cur_line
|
||||
inc cur_line
|
||||
brl item_loop
|
||||
|
||||
Done ANOP
|
||||
rts
|
||||
|
||||
; counters and temp vars
|
||||
cur_line ds 2
|
||||
cur_item ds 2
|
||||
item_stat ds 2
|
||||
item_ptr ds 2
|
||||
cmask ds 2
|
||||
csub ds 2
|
||||
|
||||
;
|
||||
; Definitions for CDA items
|
||||
;
|
||||
items anop
|
||||
dc A2'item1,item2,0'
|
||||
|
||||
item1 anop
|
||||
dc A2'title1'
|
||||
dc A2'i1compr,i1decomp,i1inact,0'
|
||||
MSB ON
|
||||
title1 dc C'Status:',H'00'
|
||||
i1compr dc C'Compress and Expand ',H'00'
|
||||
i1decomp dc C'Expand only ',H'00'
|
||||
i1inact dc C'Inactive ',H'00'
|
||||
MSB OFF
|
||||
|
||||
item2 anop
|
||||
dc A2'title2'
|
||||
dc A2'i2off,i2on,0'
|
||||
MSB ON
|
||||
title2 dc C'Verify:',H'00'
|
||||
i2off dc C'Off',H'00'
|
||||
i2on dc C'On ',H'00'
|
||||
MSB OFF
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
MesgData DATA
|
||||
;
|
||||
; IPC stuff
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
idstring anop
|
||||
dc I1'idend-idbeg'
|
||||
idbeg dc C'WestCode~HardPressed~Main~'
|
||||
idend anop
|
||||
|
||||
data_in anop
|
||||
ds 2 ;room for status word
|
||||
data_out anop
|
||||
ds 2 ;recipient count (set by system)
|
||||
ds 4 ;room for version # or status info
|
||||
ds 16 ;in case HP starts returning more
|
||||
|
||||
; calls that non-WestCode programs may make:
|
||||
dMping equ $8000 ;return HP version number (4 bytes)
|
||||
dMsetStatus equ $8001 ;set global status (on/off/decode)
|
||||
dMgetStatus equ $8002 ;get global status
|
||||
|
||||
; low byte of status word (choose exactly one):
|
||||
dVpolDecode equ $0001 ;Expand only
|
||||
dVpolOn equ $0002 ;Compress and Expand
|
||||
dVpolOff equ $0003 ;Inactive
|
||||
|
||||
; high byte of status word (these are flags; OR them together):
|
||||
; (other flags may be added later; make sure you copy the existing values)
|
||||
fGverify equ $4000 ;do verify on encoded close
|
||||
fGoneTemp equ $2000 ;use a single temp directory
|
||||
fGmouseTrix equ $1000 ;show progress by changing the mouse
|
||||
END
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
SendMsg START
|
||||
;
|
||||
; Calling conventions:
|
||||
; JSR with message in Acc and data_in in X/Y (hi/lo)
|
||||
; Returns with acc/carry as set by _SendRequest
|
||||
;
|
||||
; Sends a message to HP.
|
||||
;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
using MesgData
|
||||
|
||||
pha ;request code
|
||||
pea $8001 ;send to one, by name
|
||||
pea idstring|-16
|
||||
pea idstring
|
||||
phx ;push data_in on
|
||||
phy
|
||||
pea data_out|-16 ;data_out is always here
|
||||
pea data_out
|
||||
ldx #$1c01
|
||||
jsl $e10000 ;_SendRequest
|
||||
rts
|
||||
END
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,699 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":1,"FileDataLength":2087,"FileDataCrc32":315385475,"ProjectProps":{
|
||||
"CpuName":"65816","IncludeUndocumentedInstr":false,"EntryFlags":32702671,"AnalysisParams":{
|
||||
"AnalyzeUncategorizedData":true,"MinCharsForString":4,"SeekNearbyTargets":true},
|
||||
"PlatformSymbolFileIdentifiers":["RT:Apple/F8-ROM.sym65","RT:Apple/Cxxx-IO.sym65","RT:Apple/ProDOS8.sym65","RT:Apple/IIgs-ROM.sym65"],"ExtensionScriptFileIdentifiers":["RT:Apple/ProDOS8.cs","RT:Apple/IIgs-Toolbox.cs"],"ProjectSyms":{
|
||||
"DR_ENAB":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"DR_ENAB","Value":1690,"Source":"Project","Type":"ExternalAddr"},
|
||||
"DR_OPTA":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"DR_OPTA","Value":1739,"Source":"Project","Type":"ExternalAddr"},
|
||||
"DR_OPTB":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"DR_OPTB","Value":1599,"Source":"Project","Type":"ExternalAddr"},
|
||||
"DR_OPTC":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"DR_OPTC","Value":1847,"Source":"Project","Type":"ExternalAddr"},
|
||||
"DR_OPTF":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"DR_OPTF","Value":1867,"Source":"Project","Type":"ExternalAddr"},
|
||||
"DR_OPTP":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"DR_OPTP","Value":1719,"Source":"Project","Type":"ExternalAddr"},
|
||||
"DR_SPDBAR":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"DR_SPDBAR","Value":1236,"Source":"Project","Type":"ExternalAddr"},
|
||||
"ENABLE":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"Zip: R=bit options, W=enable card","Label":"ENABLE","Value":49243,"Source":"Project","Type":"ExternalAddr"},
|
||||
"LOCK":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"Zip: R=get speed, W=lock/unlock","Label":"LOCK","Value":49242,"Source":"Project","Type":"ExternalAddr"},
|
||||
"OPTIONS":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"Zip: R/W=bit options","Label":"OPTIONS","Value":49241,"Source":"Project","Type":"ExternalAddr"},
|
||||
"PTR":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"PTR","Value":2,"Source":"Project","Type":"ExternalAddr"},
|
||||
"PTR2":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"PTR2","Value":4,"Source":"Project","Type":"ExternalAddr"},
|
||||
"RESET":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"Zip: R=nop, W=force reset","Label":"RESET","Value":49240,"Source":"Project","Type":"ExternalAddr"},
|
||||
"SLOTENAB":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"Zip: R/W=slot/speaker enable","Label":"SLOTENAB","Value":49244,"Source":"Project","Type":"ExternalAddr"},
|
||||
"SPEED":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"Zip: R=bank, W=set speed","Label":"SPEED","Value":49245,"Source":"Project","Type":"ExternalAddr"},
|
||||
"TAG1":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"Zip","Label":"TAG1","Value":49246,"Source":"Project","Type":"ExternalAddr"},
|
||||
"TAG2":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"Zip","Label":"TAG2","Value":49247,"Source":"Project","Type":"ExternalAddr"},
|
||||
"TMP":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"TMP","Value":0,"Source":"Project","Type":"ExternalAddr"}}},
|
||||
"AddressMap":[{
|
||||
"Offset":0,"Addr":8192}],"TypeHints":[{
|
||||
"Low":0,"High":0,"Hint":"Code"}],"StatusFlagOverrides":{
|
||||
},
|
||||
"Comments":{
|
||||
"3":"ProDOS startup protocol","5":"65 bytes of space","74":"disable 80-col store","77":"disable 80-col hardware","80":"disable MouseText","114":"set hi bit","123":"enable?","133":"disable","185":"enable","188":"100%","226":"convert to upper case","228":"secret option","252":"mark as disabled","255":"update options","266":"mark as enabled (0)","269":"update options","274":"down arrow","278":"left arrow","286":"at max?","288":"yes, don\u0027t update","298":"up arrow","302":"right arrow","310":"under 0, don\u0027t update","436":"convert \u00271\u0027-\u00277\u0027 to 1-7","441":"want bits 1-7 in mask","461":"carriage return","465":"write stuff to zip","470":"escape","474":"restore entry values","519":"lock the registers","528":"execute MLI Quit call","546":"clear all but board disable","550":"disable board","555":"enable board","558":"get current speed","561":"shift it back","565":"set speed","584":"only want low two bits","587":"two bytes/entry","621":"need Y-reg to start at 0","634":"back to zero","644":"advance ptr according to Y","645":"(could have \u003e256 bytes of data)","668":"line 1, column 1","709":"line 5, column 1","1098":"end of list","1100":"get current zip speed","1105":"want it x8","1117":"6 chars each","1123":"16 bits for both","1128":"ignore zip_mhz+1","1131":"mult * 256","1137":"now only x16","1140":"for each tick, drop 1/16th","1151":"don\u0027t subtract on 100%","1158":"now result = MHz * 256","1163":"leftmost char","1174":"subtract 10","1186":"put space or 1 on left","1188":"(16-bit store)","1193":"return to emulation mode","1197":"exactly zero?","1201":"counting 5-1, from first","1205":"result; start at two","1209":"how often do you see this?","1211":"save counter","1213":"divisible by 64?","1215":"nope","1220":"have to SBC for decimal mode","1230":"add two","1234":"reset Y","1238":"the base 16 fraction","1242":"very important!","1243":"now that we\u0027ve got it,","1245":" store it.","1273":"now X has 1=6.25%, 10=100%","1274":"inverse mode AND mask","1276":"AND mask","1301":"X hit 0, so switch to norrmal","1305":"2 * 16 settings","1474":"want bit 4","1593":"save the mask","1595":"get ZipGS options register","1598":"strip off the boring ones","1600":"note: reverse of board enb","1640":"bit 2 = slot 1","1699":"go back and do speaker delay","1704":"slot 1","1716":"slot 7","1718":"speaker delay","1729":"set native mode","1732":"clear the output buffer","1744":"do the actual speed calc","1747":"result is decimal speed,","1750":" so convert to a decimal","1753":" string","1754":"hiaddr","1757":"loaddr","1760":"length","1763":"unsigned","1773":"back to emulation mode","1780":"seek to end","1789":"kill last char","1792":"extend length by one","1800":"now scoot the two decimal","1801":" places over by one to make","1803":" room for the period","1813":"stuff the decimal point in","1818":"init to zero","1821":"10s column","1824":"set hi bit","1826":"stuff it into static string","1829":"is it a 1 (not expected 25)","1831":"yes, we\u0027re less than 10","1838":"1s column","1841":"set hi bit","1843":"stuff it","1847":"convert to numeric","1850":"add to what we got already","1881":"back to 8 bits","1889":"set slow mode (!)","1894":"FIX me","1896":"set 100% speed","1899":"enable board","1908":"disable ext del, CPS","1915":"this is a no-op?","1920":"(should clear cshupd)","1977":"ta-da!","2002":"6-10 MHz","2003":"raw #of cycles counted","2005":"what ENABLE should be","2006":"what LOCK should look like (/16)","2007":"what SLOTENAB should look like","2008":"what OPTIONS should look like","2009":"ENABLE on entry","2010":"LOCK on entry","2011":"SLOTENAB on entry","2012":"OPTIONS on entry","2028":"key hit?","2031":"yup, exit","2035":"get count","2037":"count == 0, so wait for key","2041":"get color","2043":"save for later","2045":"get line","2047":"mult x4","2048":"8 line per, but one bit in horicnt","2050":"add 128, just because","2053":"4 wait until scanner reaches line","2056":"3","2058":"3 found it, so change color","2059":"4","2062":"all done with changes?","2063":"nope, keep going","2072":"7 regions","2073":"to be set to current color","2074":"starting at line 0","2075":"black text / white bkgnd","2076":"starting at line 1","2077":"white text / blue bkgnd","2078":"starting at line 4","2079":"yellow text / blue bkgnd","2080":"starting at line 9","2081":"green text / blue bkgnd","2082":"starting at line 18","2083":"white text / blue bkgnd","2084":"starting at line 19","2085":"current color","2086":"line 23 (one up from bottom)"},
|
||||
"LongComments":{
|
||||
"-2147483647":{
|
||||
"Text":"ZipGS Control Program\r\nBy Andy McFadden\r\nv1.0 11-Dec-91\r\nv1.1 14-Dec-91\r\n\r\nThis program is in the public domain.","BoxMode":true,"MaxWidth":30,"BackgroundColor":0},
|
||||
"95":{
|
||||
"Text":"Unlock the ZipGS registers","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"109":{
|
||||
"Text":"Check the startup protocol stuff","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"143":{
|
||||
"Text":"Initialize variables and the screen","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"185":{
|
||||
"Text":"Enable the Zip, and set it to max speed","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"191":{
|
||||
"Text":"Draw initial screen","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"503":{
|
||||
"Text":"Unknown key; make a tiny noise\r\n(don\u0027t forget, we\u0027re still in the VBL!)\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"517":{
|
||||
"Text":"\r\nQuit to ProDOS\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"543":{
|
||||
"Text":"\r\nMake changes\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"581":{
|
||||
"Text":"\r\nDraw the initial screen\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"584":{
|
||||
"Text":"Embed the cache size in the static string\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"660":{
|
||||
"Text":"Table of cache sizes\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"668":{
|
||||
"Text":"Initial screen data","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1100":{
|
||||
"Text":"\r\nDraw speed-related info\r\n(percent, MHz, the speed bar, etc)\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1103":{
|
||||
"Text":"Insert percent of max speed into speed bar\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1191":{
|
||||
"Text":"\r\nWe got the whole number okay, now we need the fractional percentage. This burns a few cycles here... not pretty neither. What we want to do is convert 0-255 in the low byte of tmp to 0-99.\r\n\r\nWe count 0-255 or less, incrementing twice every five, and subtracting one every 64. We get roughly 0-99. This is reasonably accurate, within +/- .02.\r\n\r\n","BoxMode":false,"MaxWidth":64,"BackgroundColor":0},
|
||||
"1267":{
|
||||
"Text":"Draw the speed thermometer bar\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1310":{
|
||||
"Text":"Table of percentages, padded to 8 bytes each","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1438":{
|
||||
"Text":"Text for speed bar","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1471":{
|
||||
"Text":"\r\nDraw options\r\n(enabled/disabled, external delay, etc)\r\n\r\nStarts with board enable/disable. We do this one specially (print \"enabled.\" instead of \"enab). Easier to special case than do \"right\".","BoxMode":false,"MaxWidth":64,"BackgroundColor":0},
|
||||
"1593":{
|
||||
"Text":"draw_opts subroutine\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1638":{
|
||||
"Text":"\r\nDraw slot info\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1728":{
|
||||
"Text":"\r\nCalculate the max ZipGS speed\r\n\r\nI pulled this out of the source for the Zip S16 program. I don\u0027t pretend to understand most of what this does. If you figure it out, send me a note...\r\n\r\n","BoxMode":false,"MaxWidth":64,"BackgroundColor":0},
|
||||
"1777":{
|
||||
"Text":"At this point, the buffer would contain \"8005\" for a speed of 8.005. This reduces it to \"8.00\".","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1818":{
|
||||
"Text":"Now it\u0027s in a format which makes output nice. We want it in a numeric format too, so...","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1867":{
|
||||
"Text":"\r\nThis is the meat of the speed calculator.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1870":{
|
||||
"Text":"I think this forces the card to cache us.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1883":{
|
||||
"Text":"Set up the board and IIgs firmware\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1913":{
|
||||
"Text":"Now we do something weird.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"1923":{
|
||||
"Text":"Now we get down and get funky.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"2002":{
|
||||
"Text":"\r\nVariable data stash\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"2013":{
|
||||
"Text":"\r\nFancy text routines\r\n(See FancyText demo for doc)\r\n\r\n Colors are:\r\n $00 - Black $08 - Brown\r\n $01 - Deep red $09 - Orange\r\n $02 - Deep blue $0a - Light gray\r\n $03 - Purple $0b - Pink\r\n $04 - Dark green $0c - Green\r\n $05 - Dark gray $0d - Yellow\r\n $06 - Medium blue $0e - Aquamarine\r\n $07 - Light blue $0f - White\r\n","BoxMode":false,"MaxWidth":64,"BackgroundColor":0},
|
||||
"2041":{
|
||||
"Text":"This is important part... shift bits around, wait for right time, and change.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"2065":{
|
||||
"Text":"Done with colors, so branch back to top of main loop.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"2067":{
|
||||
"Text":"All done, so restore color and exit.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0}},
|
||||
"Notes":{
|
||||
},
|
||||
"UserLabels":{
|
||||
"71":{
|
||||
"Label":"startup","Value":8263,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"6":{
|
||||
"Label":"stval","Value":8198,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"143":{
|
||||
"Label":"nostartup","Value":8335,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"123":{
|
||||
"Label":"isupper1","Value":8315,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"517":{
|
||||
"Label":"quit","Value":8709,"Source":"User","Type":"GlobalAddr"},
|
||||
"2006":{
|
||||
"Label":"zip_lock","Value":10198,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2010":{
|
||||
"Label":"ent_lock","Value":10202,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2005":{
|
||||
"Label":"zip_enb","Value":10197,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2009":{
|
||||
"Label":"ent_enb","Value":10201,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2007":{
|
||||
"Label":"zip_slot","Value":10199,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2011":{
|
||||
"Label":"ent_slot","Value":10203,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2008":{
|
||||
"Label":"zip_opts","Value":10200,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2012":{
|
||||
"Label":"ent_opts","Value":10204,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2073":{
|
||||
"Label":"cc1","Value":10265,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2085":{
|
||||
"Label":"cc2","Value":10277,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1728":{
|
||||
"Label":"calc_speed","Value":9920,"Source":"User","Type":"GlobalAddr"},
|
||||
"581":{
|
||||
"Label":"draw_scrn","Value":8773,"Source":"User","Type":"GlobalAddr"},
|
||||
"1100":{
|
||||
"Label":"draw_speed","Value":9292,"Source":"User","Type":"GlobalAddr"},
|
||||
"1471":{
|
||||
"Label":"draw_opts","Value":9663,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1638":{
|
||||
"Label":"draw_slot","Value":9830,"Source":"User","Type":"GlobalAddr"},
|
||||
"2013":{
|
||||
"Label":"color_scrn","Value":10205,"Source":"User","Type":"GlobalAddr"},
|
||||
"215":{
|
||||
"Label":"loop","Value":8407,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"228":{
|
||||
"Label":"isupper","Value":8420,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"246":{
|
||||
"Label":"notbang","Value":8438,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2003":{
|
||||
"Label":"zip_cyc","Value":10195,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"260":{
|
||||
"Label":"notD","Value":8452,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"274":{
|
||||
"Label":"notE","Value":8466,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"282":{
|
||||
"Label":"isslow","Value":8474,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"298":{
|
||||
"Label":"notslow","Value":8490,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"306":{
|
||||
"Label":"isfast","Value":8498,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"320":{
|
||||
"Label":"notfast","Value":8512,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"355":{
|
||||
"Label":"notp","Value":8547,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"337":{
|
||||
"Label":"notb","Value":8529,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"373":{
|
||||
"Label":"nota","Value":8565,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"391":{
|
||||
"Label":"notc","Value":8583,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"409":{
|
||||
"Label":"notf","Value":8601,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"427":{
|
||||
"Label":"nots","Value":8619,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"461":{
|
||||
"Label":"notnum","Value":8653,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"441":{
|
||||
"Label":"sloop","Value":8633,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"470":{
|
||||
"Label":"notret","Value":8662,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"543":{
|
||||
"Label":"update_zip","Value":8735,"Source":"User","Type":"GlobalAddr"},
|
||||
"503":{
|
||||
"Label":"notesc","Value":8695,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"534":{
|
||||
"Label":"Quit_p","Value":8726,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"555":{
|
||||
"Label":"enab","Value":8747,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"558":{
|
||||
"Label":"cont","Value":8750,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"660":{
|
||||
"Label":"cache_tab","Value":8852,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"711":{
|
||||
"Label":"statline","Value":8903,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"668":{
|
||||
"Label":"screen_data","Value":8860,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"659":{
|
||||
"Label":"done","Value":8851,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"635":{
|
||||
"Label":"txtloop","Value":8827,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"609":{
|
||||
"Label":"loop1","Value":8801,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"644":{
|
||||
"Label":"txtdone","Value":8836,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1310":{
|
||||
"Label":"perc_tab","Value":9502,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1438":{
|
||||
"Label":"speed","Value":9630,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1109":{
|
||||
"Label":"ploop","Value":9301,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2002":{
|
||||
"Label":"zip_mhz","Value":10194,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1150":{
|
||||
"Label":"subloop","Value":9342,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1158":{
|
||||
"Label":"subdone","Value":9350,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1182":{
|
||||
"Label":"ok","Value":9374,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1243":{
|
||||
"Label":"iszero","Value":9435,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1210":{
|
||||
"Label":"xloop","Value":9402,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1224":{
|
||||
"Label":"not64","Value":9416,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1236":{
|
||||
"Label":"not5","Value":9428,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1280":{
|
||||
"Label":"bloop","Value":9472,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1305":{
|
||||
"Label":"not0","Value":9497,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1488":{
|
||||
"Label":"enb","Value":9680,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1496":{
|
||||
"Label":"copy","Value":9688,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1573":{
|
||||
"Label":"disabled_txt","Value":9765,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1583":{
|
||||
"Label":"enabled_txt","Value":9775,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1508":{
|
||||
"Label":"done1","Value":9700,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1498":{
|
||||
"Label":"loop2","Value":9690,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1593":{
|
||||
"Label":"draw_enab","Value":9785,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1612":{
|
||||
"Label":"enb1","Value":9804,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1630":{
|
||||
"Label":"enab_txt","Value":9822,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1634":{
|
||||
"Label":"disb_txt","Value":9826,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1620":{
|
||||
"Label":"copy1","Value":9812,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1622":{
|
||||
"Label":"loop3","Value":9814,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1704":{
|
||||
"Label":"dr_slot","Value":9896,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1720":{
|
||||
"Label":"slow_txt","Value":9912,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1724":{
|
||||
"Label":"fast_txt","Value":9916,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1679":{
|
||||
"Label":"copy2","Value":9871,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1671":{
|
||||
"Label":"disb","Value":9863,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1681":{
|
||||
"Label":"cloop","Value":9873,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1642":{
|
||||
"Label":"loop4","Value":9834,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1703":{
|
||||
"Label":"done2","Value":9895,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1857":{
|
||||
"Label":"ascii","Value":10049,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1867":{
|
||||
"Label":"getspeed","Value":10059,"Source":"User","Type":"GlobalAddr"},
|
||||
"2000":{
|
||||
"Label":"result","Value":10192,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1779":{
|
||||
"Label":"loop5","Value":9971,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1803":{
|
||||
"Label":"loop6","Value":9995,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1838":{
|
||||
"Label":"lt10","Value":10030,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1873":{
|
||||
"Label":"caloop","Value":10065,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1998":{
|
||||
"Label":"save_cya","Value":10190,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1999":{
|
||||
"Label":"save_opts","Value":10191,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1931":{
|
||||
"Label":"bloop1","Value":10123,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1937":{
|
||||
"Label":"bloop2","Value":10129,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1943":{
|
||||
"Label":"bloop3","Value":10135,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1949":{
|
||||
"Label":"bloop4","Value":10141,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"1953":{
|
||||
"Label":"delay1","Value":10145,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2072":{
|
||||
"Label":"color_data","Value":10264,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2028":{
|
||||
"Label":"main_loop","Value":10220,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2067":{
|
||||
"Label":"done3","Value":10259,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2041":{
|
||||
"Label":"color_loop","Value":10233,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"2053":{
|
||||
"Label":"wait_loop","Value":10245,"Source":"User","Type":"LocalOrGlobalAddr"}},
|
||||
"OperandFormats":{
|
||||
"123":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"125":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"noten","Part":"Low"}},
|
||||
"133":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"228":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"246":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"260":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"320":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"337":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"355":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"373":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"391":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"409":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"427":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"431":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"433":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"notnum","Part":"Low"}},
|
||||
"436":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"445":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"TMP","Part":"Low"}},
|
||||
"591":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"statline","Part":"Low"}},
|
||||
"598":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"statline","Part":"Low"}},
|
||||
"601":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"screen_data","Part":"Low"}},
|
||||
"603":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"605":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"screen_data","Part":"High"}},
|
||||
"607":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"611":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"617":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"628":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"632":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"651":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"655":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"668":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"670":{
|
||||
"Length":39,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"709":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"711":{
|
||||
"Length":26,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"737":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"739":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"747":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"749":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"757":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"759":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"767":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"769":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"777":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"779":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"787":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"789":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"797":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"799":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"807":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"809":{
|
||||
"Length":8,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"817":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"819":{
|
||||
"Length":22,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"841":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"843":{
|
||||
"Length":14,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"857":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"859":{
|
||||
"Length":14,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"873":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"875":{
|
||||
"Length":14,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"889":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"891":{
|
||||
"Length":14,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"905":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"907":{
|
||||
"Length":35,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"942":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"944":{
|
||||
"Length":41,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"985":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"987":{
|
||||
"Length":34,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1021":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1023":{
|
||||
"Length":34,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1057":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1059":{
|
||||
"Length":39,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1098":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1112":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"speed","Part":"Low"}},
|
||||
"1177":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"1188":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"speed","Part":"Low"}},
|
||||
"1211":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"1236":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"1253":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"1255":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"speed","Part":"Low"}},
|
||||
"1262":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"1264":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"speed","Part":"Low"}},
|
||||
"1438":{
|
||||
"Length":33,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1478":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"disabled_txt","Part":"Low"}},
|
||||
"1482":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"enabled_txt","Part":"High"}},
|
||||
"1484":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"1488":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"enabled_txt","Part":"Low"}},
|
||||
"1492":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"enabled_txt","Part":"High"}},
|
||||
"1494":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"1502":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_ENAB","Part":"Low"}},
|
||||
"1508":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTB","Part":"Low"}},
|
||||
"1512":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTB","Part":"High"}},
|
||||
"1514":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"1521":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTP","Part":"Low"}},
|
||||
"1525":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTP","Part":"High"}},
|
||||
"1527":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"1534":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTA","Part":"Low"}},
|
||||
"1538":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTA","Part":"High"}},
|
||||
"1540":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"1547":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTC","Part":"Low"}},
|
||||
"1551":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTC","Part":"High"}},
|
||||
"1553":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"1560":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTF","Part":"Low"}},
|
||||
"1564":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"DR_OPTF","Part":"High"}},
|
||||
"1566":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"1573":{
|
||||
"Length":10,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1583":{
|
||||
"Length":10,"Format":"String","SubFormat":"CString","SymbolRef":null},
|
||||
"1602":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"disb_txt","Part":"Low"}},
|
||||
"1608":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"1612":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"enab_txt","Part":"Low"}},
|
||||
"1616":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"enab_txt","Part":"High"}},
|
||||
"1618":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"1652":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}},
|
||||
"1661":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"slow_txt","Part":"Low"}},
|
||||
"1665":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"slow_txt","Part":"High"}},
|
||||
"1667":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"1671":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"fast_txt","Part":"Low"}},
|
||||
"1675":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"fast_txt","Part":"High"}},
|
||||
"1677":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR2","Part":"Low"}},
|
||||
"1704":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1706":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1708":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1710":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1712":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1714":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1716":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1718":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1738":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"ascii","Part":"Low"}},
|
||||
"1741":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"ascii","Part":"Low"}},
|
||||
"1754":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1763":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"1813":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"1829":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"1847":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Ascii","SymbolRef":null},
|
||||
"2000":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"2003":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"2013":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"color_data","Part":"Low"}},
|
||||
"2017":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"color_data","Part":"High"}},
|
||||
"2019":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"PTR","Part":"Low"}}}}
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,166 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":1,"FileDataLength":194,"FileDataCrc32":177347202,"ProjectProps":{
|
||||
"CpuName":"6502","IncludeUndocumentedInstr":false,"EntryFlags":32702671,"AnalysisParams":{
|
||||
"AnalyzeUncategorizedData":true,"MinCharsForString":4,"SeekNearbyTargets":true},
|
||||
"PlatformSymbolFileIdentifiers":["RT:Apple/F8-ROM.sym65"],"ExtensionScriptFileIdentifiers":[],"ProjectSyms":{
|
||||
"A1H":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"hide platform def","Label":"A1H","Value":-1,"Source":"Project","Type":"Constant"},
|
||||
"copyptr":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"2b","Label":"copyptr","Value":0,"Source":"Project","Type":"ExternalAddr"},
|
||||
"dstptr":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"2b A1H","Label":"dstptr","Value":62,"Source":"Project","Type":"ExternalAddr"},
|
||||
"in_dst":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"in_dst","Value":766,"Source":"Project","Type":"ExternalAddr"},
|
||||
"in_src":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"in_src","Value":764,"Source":"Project","Type":"ExternalAddr"},
|
||||
"lz4fh_magic":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"ascii \u0027f\u0027","Label":"lz4fh_magic","Value":102,"Source":"Project","Type":"Constant"},
|
||||
"savlen":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"1b","Label":"savlen","Value":3,"Source":"Project","Type":"ExternalAddr"},
|
||||
"savmix":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"1b","Label":"savmix","Value":2,"Source":"Project","Type":"ExternalAddr"},
|
||||
"srcptr":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"2b A1L","Label":"srcptr","Value":60,"Source":"Project","Type":"ExternalAddr"},
|
||||
"tok_empty":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"Comment":"","Label":"tok_empty","Value":253,"Source":"Project","Type":"Constant"},
|
||||
"tok_eod":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"Comment":"","Label":"tok_eod","Value":254,"Source":"Project","Type":"Constant"}}},
|
||||
"AddressMap":[{
|
||||
"Offset":0,"Addr":768}],"TypeHints":[{
|
||||
"Low":0,"High":0,"Hint":"Code"}],"StatusFlagOverrides":{
|
||||
"39":2,"48":2},
|
||||
"Comments":{
|
||||
"0":"copy source address to zero page","15":"copy destination address to zero page","27":"does magic match?","54":"success!","83":"get mixed-length byte","87":"get the literal length","93":"sets carry for \u003e= 15","101":"get length extension","103":"(carry set) add 15 - will not exceed 255","109":"if len is 255, copy 0-254","112":"16 cycles/byte","115":"this gets us the +1","122":"carry cleared by hi3","129":"Y=0; DEY so next INY goes to 0","139":"get length extension","141":"\"normal\" values are 0-236","145":"will not exceed 255","147":"min match; won\u0027t exceed 255","149":"save match len for later","151":"and keep it in X","153":"match offset, lo","158":"match offset, hi","160":"OR in hi-res page","172":"hi5 clears carry","180":"18 cycles/byte"},
|
||||
"LongComments":{
|
||||
"-2147483647":{
|
||||
"Text":"LZ4FH uncompression for 6502\r\nBy Andy McFadden\r\nVersion 1.0.1, August 2015\r\n*\r\nRefactored for size \u0026 speed by Peter Ferrie.\r\n","BoxMode":true,"MaxWidth":40,"BackgroundColor":0},
|
||||
"0":{
|
||||
"Text":"\r\nThe parameters (in_src and in_dst) are stashed at the top of the text input buffer. We use this, rather than having them poked directly into the code, so that the 6502 and 65816 implementations work the same way without either getting weird.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"37":{
|
||||
"Text":"\r\nThese stubs increment the high byte and then jump back. This saves a cycle because branch-not-taken becomes the common case. We assume that we\u0027re not unpacking data at $FFxx, so BNE is branch-always.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"55":{
|
||||
"Text":"Handle \"special\" match values (value in A)\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"81":{
|
||||
"Text":"Get the mixed-length byte and handle the literal.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"105":{
|
||||
"Text":"\r\nAt this point, srcptr holds the address of the \"mix\" word or the length extension, and dstptr holds the address of the next output location. So we want to read from (srcptr),y+1 and write to (dstptr),y. We can do this by sticking the DEY between the LDA and STA.\r\n\r\nWe could save a couple of cycles by substituting addr,y in place of (dp),y, but the added setup cost would only benefit longer literal strings.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"114":{
|
||||
"Text":"Advance srcptr by savlen+1, and dstptr by savlen\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"130":{
|
||||
"Text":"\r\nHandle match. Y holds an offset into srcptr such taht we need to increment it once to get the next interesting byte.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"147":{
|
||||
"Text":"Put the destination address into copyptr.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"164":{
|
||||
"Text":"\r\nAdvance srcptr past the encoded match while we still remember how many bytes it took to encode. Y is indexing the last value used, so we want to go advance srcptr by Y+1.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"172":{
|
||||
"Text":"\r\nCopy the match. The length is in X. Note this must be a forward copy so overlapped data works.\r\n\r\nWe know the match is at least 4 bytes long, so we could save a few cycles by not doing the ADC #4 earlier, and unrolling the first 4 load/store operations here.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"182":{
|
||||
"Text":"Advance dstptr past copied data.","BoxMode":false,"MaxWidth":80,"BackgroundColor":0}},
|
||||
"Notes":{
|
||||
},
|
||||
"UserLabels":{
|
||||
"0":{
|
||||
"Label":"entry","Value":768,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"31":{
|
||||
"Label":"fail","Value":799,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"75":{
|
||||
"Label":"goodmagic","Value":843,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"37":{
|
||||
"Label":"hi2","Value":805,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"41":{
|
||||
"Label":"hi3","Value":809,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"46":{
|
||||
"Label":"hi4","Value":814,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"50":{
|
||||
"Label":"notempty","Value":818,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"55":{
|
||||
"Label":"specialmatch","Value":823,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"101":{
|
||||
"Label":"nohi2","Value":869,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"122":{
|
||||
"Label":"nohi3","Value":890,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"129":{
|
||||
"Label":"nohi4","Value":897,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"81":{
|
||||
"Label":"mainloop","Value":849,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"70":{
|
||||
"Label":"hi5","Value":838,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"172":{
|
||||
"Label":"nohi5","Value":940,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"130":{
|
||||
"Label":"noliteral","Value":898,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"105":{
|
||||
"Label":"shortlit","Value":873,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"107":{
|
||||
"Label":"litloop","Value":875,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"147":{
|
||||
"Label":"shortmatch","Value":915,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"160":{
|
||||
"Label":"_desthi","Value":928,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"174":{
|
||||
"Label":"copyloop","Value":942,"Source":"User","Type":"LocalOrGlobalAddr"}},
|
||||
"OperandFormats":{
|
||||
"27":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"lz4fh_magic","Part":"Low"}},
|
||||
"37":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"srcptr","Part":"Low"}},
|
||||
"41":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"srcptr","Part":"Low"}},
|
||||
"46":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"dstptr","Part":"Low"}},
|
||||
"50":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"tok_eod","Part":"Low"}},
|
||||
"55":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"tok_empty","Part":"Low"}},
|
||||
"66":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"srcptr","Part":"Low"}},
|
||||
"70":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"srcptr","Part":"Low"}},
|
||||
"79":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"srcptr","Part":"Low"}},
|
||||
"103":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"141":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"145":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"147":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"162":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"copyptr","Part":"Low"}},
|
||||
"190":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"dstptr","Part":"Low"}}}}
|
||||
@@ -0,0 +1,242 @@
|
||||
********************************
|
||||
* *
|
||||
* LZ4FH uncompression for 6502 *
|
||||
* By Andy McFadden *
|
||||
* Version 1.0.1, August 2015 *
|
||||
* *
|
||||
* Refactored for size & speed *
|
||||
* by Peter Ferrie. *
|
||||
* *
|
||||
* Developed with Merlin-16 *
|
||||
* *
|
||||
********************************
|
||||
lst off
|
||||
org $0300
|
||||
|
||||
*
|
||||
* Constants
|
||||
*
|
||||
lz4fh_magic equ $66 ;ascii 'f'
|
||||
tok_empty equ 253
|
||||
tok_eod equ 254
|
||||
|
||||
overrun_check equ 0
|
||||
|
||||
*
|
||||
* Variable storage
|
||||
*
|
||||
srcptr equ $3c ;2b a1l
|
||||
dstptr equ $3e ;2b a1h
|
||||
copyptr equ $00 ;2b
|
||||
savmix equ $02 ;1b
|
||||
savlen equ $03 ;1b
|
||||
|
||||
*
|
||||
* ROM routines
|
||||
*
|
||||
bell equ $ff3a
|
||||
monitor equ $ff69
|
||||
|
||||
*
|
||||
* Parameters, stashed at the top of the text input
|
||||
* buffer. We use this, rather than just having them
|
||||
* poked directly into the code, so that the 6502 and
|
||||
* 65816 implementations work the same way without
|
||||
* either getting weird.
|
||||
*
|
||||
in_src equ $2fc ;2b
|
||||
in_dst equ $2fe ;2b
|
||||
|
||||
entry
|
||||
lda in_src ;copy source address to zero page
|
||||
sta srcptr
|
||||
lda in_src+1
|
||||
sta srcptr+1
|
||||
lda in_dst ;copy destination address to zero page
|
||||
sta dstptr
|
||||
lda in_dst+1
|
||||
sta dstptr+1
|
||||
sta _desthi+1
|
||||
|
||||
ldy #$00
|
||||
lda (srcptr),y
|
||||
cmp #lz4fh_magic ;does magic match?
|
||||
beq goodmagic
|
||||
|
||||
fail
|
||||
jsr bell
|
||||
jmp monitor
|
||||
|
||||
* These stubs increment the high byte and then jump
|
||||
* back. This saves a cycle because branch-not-taken
|
||||
* becomes the common case. We assume that we're not
|
||||
* unpacking data at $FFxx, so BNE is branch-always.
|
||||
hi2
|
||||
inc srcptr+1
|
||||
bne nohi2
|
||||
|
||||
hi3
|
||||
inc srcptr+1
|
||||
clc
|
||||
bcc nohi3
|
||||
|
||||
hi4
|
||||
inc dstptr+1
|
||||
bne nohi4
|
||||
|
||||
notempty
|
||||
cmp #tok_eod
|
||||
bne fail
|
||||
rts ;success!
|
||||
|
||||
* handle "special" match values (value in A)
|
||||
specialmatch
|
||||
cmp #tok_empty
|
||||
bne notempty
|
||||
|
||||
tya ;empty match, advance srcptr
|
||||
adc srcptr ; past and jump to main loop
|
||||
sta srcptr
|
||||
bcc mainloop
|
||||
inc srcptr+1
|
||||
bne mainloop
|
||||
|
||||
hi5
|
||||
inc srcptr+1
|
||||
clc
|
||||
bcc nohi5
|
||||
|
||||
goodmagic
|
||||
inc srcptr
|
||||
bne mainloop
|
||||
inc srcptr+1
|
||||
|
||||
mainloop
|
||||
* Get the mixed-length byte and handle the literal.
|
||||
ldy #$00
|
||||
lda (srcptr),y ;get mixed-length byte
|
||||
sta savmix
|
||||
lsr A ;get the literal length
|
||||
lsr A
|
||||
lsr A
|
||||
lsr A
|
||||
beq noliteral
|
||||
cmp #$0f ;sets carry for >= 15
|
||||
bne shortlit
|
||||
|
||||
inc srcptr
|
||||
beq hi2
|
||||
nohi2
|
||||
lda (srcptr),y ;get length extension
|
||||
adc #14 ;(carry set) add 15 - will not exceed 255
|
||||
|
||||
* At this point, srcptr holds the address of the "mix"
|
||||
* word or the length extension, and dstptr holds the
|
||||
* address of the next output location. So we want to
|
||||
* read from (srcptr),y+1 and write to (dstptr),y.
|
||||
* We can do this by sticking the DEY between the LDA
|
||||
* and STA.
|
||||
*
|
||||
* We could save a couple of cycles by substituting
|
||||
* addr,y in place of (dp),y, but the added setup cost
|
||||
* would only benefit longer literal strings.
|
||||
shortlit tax
|
||||
tay
|
||||
:litloop
|
||||
lda (srcptr),y ;5
|
||||
dey ;2 if len is 255, copy 0-254
|
||||
sta (dstptr),y ;6
|
||||
bne :litloop ;3 -> 16 cycles/byte
|
||||
|
||||
* Advance srcptr by savlen+1, and dstptr by savlen
|
||||
txa
|
||||
sec ;this gets us the +1
|
||||
adc srcptr
|
||||
sta srcptr
|
||||
bcs hi3
|
||||
nohi3 ;carry cleared by hi3
|
||||
txa
|
||||
adc dstptr
|
||||
sta dstptr
|
||||
bcs hi4
|
||||
nohi4
|
||||
dey ;Y=0; DEY so next INY goes to 0
|
||||
|
||||
* Handle match. Y holds an offset into srcptr such
|
||||
* that we need to increment it once to get the next
|
||||
* interesting byte.
|
||||
noliteral
|
||||
lda savmix
|
||||
and #$0f
|
||||
cmp #$0f
|
||||
blt :shortmatch ;BCC
|
||||
|
||||
iny
|
||||
lda (srcptr),y ;get length extension
|
||||
cmp #237 ;"normal" values are 0-236
|
||||
bge specialmatch ;BCS
|
||||
adc #15 ;will not exceed 255
|
||||
|
||||
* Put the destination address into copyptr.
|
||||
:shortmatch
|
||||
adc #4 ;min match; won't exceed 255
|
||||
sta savlen ;save match len for later
|
||||
tax ;and keep it in X
|
||||
iny
|
||||
lda (srcptr),y ;match offset, lo
|
||||
sta copyptr
|
||||
iny
|
||||
lda (srcptr),y ;match offset, hi
|
||||
_desthi ora #$00 ;OR in hi-res page
|
||||
sta copyptr+1
|
||||
|
||||
* Advance srcptr past the encoded match while we still
|
||||
* remember how many bytes it took to encode. Y is
|
||||
* indexing the last value used, so we want to go
|
||||
* advance srcptr by Y+1.
|
||||
|
||||
tya
|
||||
sec
|
||||
adc srcptr
|
||||
sta srcptr
|
||||
bcs hi5
|
||||
nohi5 ;hi5 clears carry
|
||||
|
||||
* Copy the match. The length is in X. Note this
|
||||
* must be a forward copy so overlapped data works.
|
||||
*
|
||||
* We know the match is at least 4 bytes long, so
|
||||
* we could save a few cycles by not doing the
|
||||
* ADC #4 earlier, and unrolling the first 4
|
||||
* load/store operations here.
|
||||
ldy #$00
|
||||
:copyloop
|
||||
lda (copyptr),y ;5
|
||||
sta (dstptr),y ;6
|
||||
iny ;2
|
||||
dex ;2
|
||||
bne :copyloop ;3 -> 18 cycles/byte
|
||||
|
||||
* advance dstptr past copied data
|
||||
lda dstptr
|
||||
adc savlen ;carry is clear
|
||||
sta dstptr
|
||||
bcc mainloop
|
||||
inc dstptr+1
|
||||
|
||||
DO overrun_check
|
||||
LDA dstptr+1
|
||||
CMP #$60
|
||||
bcc mainloop
|
||||
BRK
|
||||
BRK
|
||||
|
||||
ELSE
|
||||
|
||||
bne mainloop ;always (not unpacking at $FFxx)
|
||||
|
||||
FIN
|
||||
|
||||
lst on
|
||||
sav LZ4FH6502
|
||||
lst off
|
||||
Binary file not shown.
@@ -0,0 +1,98 @@
|
||||
### 6502bench SourceGen dis65 v1.0 ###
|
||||
{
|
||||
"_ContentVersion":1,"FileDataLength":121,"FileDataCrc32":657890661,"ProjectProps":{
|
||||
"CpuName":"65816","IncludeUndocumentedInstr":false,"EntryFlags":32702671,"AnalysisParams":{
|
||||
"AnalyzeUncategorizedData":true,"MinCharsForString":4,"SeekNearbyTargets":true},
|
||||
"PlatformSymbolFileIdentifiers":["RT:Apple/F8-ROM.sym65"],"ExtensionScriptFileIdentifiers":[],"ProjectSyms":{
|
||||
"in_dst":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"in_dst","Value":766,"Source":"Project","Type":"ExternalAddr"},
|
||||
"in_src":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"","Label":"in_src","Value":764,"Source":"Project","Type":"ExternalAddr"},
|
||||
"lz4fh_magic":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"ascii \u0027f\u0027","Label":"lz4fh_magic","Value":102,"Source":"Project","Type":"Constant"},
|
||||
"savlen":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"2b","Label":"savlen","Value":2,"Source":"Project","Type":"ExternalAddr"},
|
||||
"savmix":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"Comment":"2b","Label":"savmix","Value":0,"Source":"Project","Type":"ExternalAddr"},
|
||||
"tok_empty":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"Comment":"","Label":"tok_empty","Value":253,"Source":"Project","Type":"Constant"},
|
||||
"tok_eod":{
|
||||
"DataDescriptor":{
|
||||
"Length":1,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"Comment":"","Label":"tok_eod","Value":254,"Source":"Project","Type":"Constant"}}},
|
||||
"AddressMap":[{
|
||||
"Offset":0,"Addr":768}],"TypeHints":[{
|
||||
"Low":0,"High":0,"Hint":"Code"}],"StatusFlagOverrides":{
|
||||
},
|
||||
"Comments":{
|
||||
"0":"go native","2":"16-bit acc/index","30":"end-of-data or error?","33":"return to emulation mode","62":"length \u003e= 15, get next","68":"(carry set) + 15 - won\u0027t exceed 255","71":"MVN wants length-1","85":"add length extension","91":"\"normal\" values are 0-236","96":"carry clear; won\u0027t exceed 255","99":"min match, -1 for MVN","102":"spill A while we get offset","104":"load source buffer offset","108":"save srcptr for later","109":"OR in hi-res page","118":"restore srcptr"},
|
||||
"LongComments":{
|
||||
"-2147483647":{
|
||||
"Text":"LZ4FH uncompression for 65816\r\nBy Andy McFadden\r\nVersion 1.0.1, August 2015\r\n*\r\nRefactored for size \u0026 speed by Peter Ferrie.","BoxMode":true,"MaxWidth":40,"BackgroundColor":0},
|
||||
"38":{
|
||||
"Text":"Handle \"special\" match length values (in A)\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"71":{
|
||||
"Text":"\r\nAt this point, Y holds the address of the next compressed data byte, X has the address of the next output position, and A has the length of the literal.\r\n\r\nThe MVN instruction moves (A+1) bytes from X to Y, advancing X and Y.\r\n\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0},
|
||||
"75":{
|
||||
"Text":"Now handle the match.\r\n","BoxMode":false,"MaxWidth":80,"BackgroundColor":0}},
|
||||
"Notes":{
|
||||
},
|
||||
"UserLabels":{
|
||||
"0":{
|
||||
"Label":"entry","Value":768,"Source":"User","Type":"GlobalAddr"},
|
||||
"109":{
|
||||
"Label":"_dstmod","Value":877,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"43":{
|
||||
"Label":"mainloop","Value":811,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"24":{
|
||||
"Label":"fail","Value":792,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"30":{
|
||||
"Label":"notempty","Value":798,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"38":{
|
||||
"Label":"specialmatch","Value":806,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"71":{
|
||||
"Label":"shortlit","Value":839,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"75":{
|
||||
"Label":"noliteral","Value":843,"Source":"User","Type":"LocalOrGlobalAddr"},
|
||||
"99":{
|
||||
"Label":"shortmatch","Value":867,"Source":"User","Type":"LocalOrGlobalAddr"}},
|
||||
"OperandFormats":{
|
||||
"13":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"19":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"lz4fh_magic","Part":"Low"}},
|
||||
"30":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"tok_eod","Part":"Low"}},
|
||||
"38":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Symbol","SymbolRef":{
|
||||
"Label":"tok_empty","Part":"Low"}},
|
||||
"43":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"62":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"68":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"85":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null},
|
||||
"91":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"96":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"99":{
|
||||
"Length":3,"Format":"NumericLE","SubFormat":"Decimal","SymbolRef":null},
|
||||
"104":{
|
||||
"Length":2,"Format":"NumericLE","SubFormat":"Hex","SymbolRef":null}}}
|
||||
@@ -0,0 +1,142 @@
|
||||
*********************************
|
||||
* *
|
||||
* LZ4FH uncompression for 65816 *
|
||||
* By Andy McFadden *
|
||||
* Version 1.0.1, August 2015 *
|
||||
* *
|
||||
* Refactored for size & speed *
|
||||
* by Peter Ferrie. *
|
||||
* *
|
||||
* Developed with Merlin-16 *
|
||||
* *
|
||||
*********************************
|
||||
lst off
|
||||
org $0300
|
||||
|
||||
xc ;allow 65c02 opcodes
|
||||
xc ;allow 65816 opcodes
|
||||
|
||||
*
|
||||
* Constants
|
||||
*
|
||||
lz4fh_magic equ $66 ;ascii 'f'
|
||||
tok_empty equ 253
|
||||
tok_eod equ 254
|
||||
|
||||
*
|
||||
* Variable storage
|
||||
*
|
||||
savmix equ $00 ;2b
|
||||
savlen equ $02 ;2b
|
||||
|
||||
*
|
||||
* ROM routines
|
||||
*
|
||||
bell equ $ff3a
|
||||
monitor equ $ff69
|
||||
|
||||
*
|
||||
* Parameters.
|
||||
*
|
||||
* in_dst must be $2000 or $4000
|
||||
*
|
||||
in_src equ $2fc ;2b
|
||||
in_dst equ $2fe ;2b
|
||||
|
||||
* Main entry point.
|
||||
entry
|
||||
clc ;go native
|
||||
xce
|
||||
rep #$30 ;16-bit acc/index
|
||||
mx %00 ; tell Merlin
|
||||
|
||||
ldx in_src
|
||||
ldy in_dst
|
||||
sty _dstmod+1
|
||||
|
||||
lda $0000,x
|
||||
inx
|
||||
and #$00ff
|
||||
cmp #lz4fh_magic
|
||||
beq mainloop
|
||||
|
||||
fail
|
||||
jsr bell
|
||||
jmp monitor
|
||||
|
||||
notempty
|
||||
cmp #tok_eod ;end-of-data or error
|
||||
|
||||
* exit
|
||||
sec ;return to emulation mode
|
||||
xce
|
||||
bne fail
|
||||
rts
|
||||
|
||||
mx %00 ;undo the sec/xce
|
||||
|
||||
* handle "special" match length values (in A)
|
||||
specialmatch
|
||||
cmp #tok_empty
|
||||
bne notempty
|
||||
|
||||
mainloop
|
||||
lda $0000,x
|
||||
inx
|
||||
sta savmix
|
||||
and #$00f0
|
||||
beq noliteral
|
||||
lsr A
|
||||
lsr A
|
||||
lsr A
|
||||
lsr A
|
||||
cmp #$000f
|
||||
bne shortlit
|
||||
|
||||
lda $0000,x ;length >= 15, get next
|
||||
inx
|
||||
and #$00ff
|
||||
adc #14 ;(carry set) +15 - won't exceed 255
|
||||
|
||||
* At this point, Y holds the address of the next
|
||||
* compressed data byte, X has the address of the
|
||||
* next output position, and A has the length of
|
||||
* the literal.
|
||||
*
|
||||
* The MVN instruction moves (A+1) bytes from X
|
||||
* to Y, advancing X and Y.
|
||||
shortlit
|
||||
dec A ;MVN wants length-1
|
||||
mvn $00,$00 ;7 cycles/byte
|
||||
|
||||
* Now handle the match.
|
||||
noliteral
|
||||
lda savmix
|
||||
and #$000f
|
||||
cmp #$000f
|
||||
blt :shortmatch ;BCC
|
||||
|
||||
lda $0000,x ;add length extension
|
||||
inx
|
||||
and #$00ff
|
||||
cmp #237 ;"normal" values are 0-236
|
||||
bge specialmatch
|
||||
adc #15 ;carry clear; won't exceed 255
|
||||
:shortmatch
|
||||
adc #3 ;min match, -1 for MVN
|
||||
sta savlen ;spill A while we get offset
|
||||
|
||||
lda $0000,x ;load source buffer offset
|
||||
inx
|
||||
inx
|
||||
phx ;save srcptr for later
|
||||
_dstmod ora #$ff00 ;OR in hi-res page
|
||||
tax
|
||||
lda savlen
|
||||
mvn $00,$00
|
||||
plx ;restore srcptr
|
||||
bra mainloop
|
||||
|
||||
lst on
|
||||
sav LZ4FH65816
|
||||
lst off
|
||||
@@ -0,0 +1,28 @@
|
||||
# SourceGen Examples #
|
||||
|
||||
These are some sample projects you can play with. The binaries are
|
||||
accompanied by the original source code, so you can compare the SourceGen
|
||||
project to the original.
|
||||
|
||||
* Tutorial: a simple project, intended for use with the tutorial in
|
||||
the manual.
|
||||
* A2-lz4fh: two functions for unpacking a simplified form of LZ4 compression.
|
||||
One is 6502, the other is 65816.
|
||||
[(Full project)](https://github.com/fadden/fhpack)
|
||||
* A2-Amper-fdraw: 6502 code that provides an Applesoft BASIC interface
|
||||
to a machine-language graphics library. The public interface of the
|
||||
graphics library is defined in a .sym65 file.
|
||||
[(Full project)](https://github.com/fadden/fdraw)
|
||||
* A2-HP-CDA: HardPressed Classic Desk Accessory. This is 65816 code
|
||||
in OMF loader format, which SourceGen doesn't support, so it's a little
|
||||
rough.
|
||||
[(Full project)](https://fadden.com/apple2/hardpressed.html)
|
||||
* A2-Zippy: a program for controlling an Apple IIgs CPU accelerator card.
|
||||
65816 sources, with a little bit of ProDOS 8 and IIgs toolbox usage.
|
||||
[(Full project)](https://fadden.com/apple2/misc.html#zippy)
|
||||
|
||||
(You may be wondering why some of the example files have filenames with
|
||||
things like "#061d60" in them. It's a method of preserving the file type
|
||||
for Apple II files used by some utilities. The potential advantage here
|
||||
for SourceGen is that the file type often determines the load address,
|
||||
possibly removing some initial guesswork.)
|
||||
Binary file not shown.
@@ -0,0 +1,62 @@
|
||||
; Copyright 2018 faddenSoft. All Rights Reserved.
|
||||
; See the LICENSE.txt file for distribution terms (Apache 2.0).
|
||||
;
|
||||
; Assembler: Merlin 32
|
||||
|
||||
INPUT equ $3000
|
||||
OUTPUT equ $0400
|
||||
|
||||
org $1000
|
||||
|
||||
ldy #END-AFTER
|
||||
copy lda BEFORE,y
|
||||
sta AFTER,y
|
||||
dey
|
||||
bmi done
|
||||
bpl copy
|
||||
|
||||
dfb $00
|
||||
stuff asc 'hello!'
|
||||
|
||||
done jmp AFTER
|
||||
|
||||
BEFORE
|
||||
org $2000
|
||||
AFTER
|
||||
|
||||
lda INPUT ;expecting 0-3
|
||||
cmp #4
|
||||
blt :valid
|
||||
lda #4 ;error message
|
||||
:valid asl A
|
||||
tax
|
||||
lda stringtab,x ;set load to address
|
||||
sta _load+1
|
||||
lda stringtab+1,x
|
||||
sta _load+2
|
||||
|
||||
ldy #12 ;fixed-width strings
|
||||
_load lda $0000,y ;self-modifying code
|
||||
ora #$80
|
||||
sta OUTPUT,y
|
||||
dey
|
||||
bpl _load
|
||||
|
||||
rts
|
||||
|
||||
stringtab
|
||||
dw string0
|
||||
dw string1
|
||||
dw string2
|
||||
dw string3
|
||||
dw stringX
|
||||
dfb $00
|
||||
|
||||
string0 asc 'string zero '
|
||||
string1 asc 'string one '
|
||||
string2 asc 'string two '
|
||||
string3 asc 'string three '
|
||||
stringX asc 'invalid index'
|
||||
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user