123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772 |
- ************************************************************************
- * *
- * [[[ NOP ]]] OBJECT ACTION PROGRAM *
- * *
- ************************************************************************
- XDEF MAIN_ACTION,GET_REL_POS,INIT_SORT,ORDER_SET
- XDEF ACTION,ACTION_SET,ACT_COUNT_SET
- XDEF NEXT_ACTION,HIT_AREA_SET,SORT_SET
- XDEF CHARA_SET
- XREF ?A5
- ;by SOUND
- XREF SET_SOUND,SET_SPHERO
- SECT.S SYS,,C
- INCLUDE NEO_GEO.INC @@@
- INCLUDE LABEL.INC
- CH_TABLE EQU 0FCH
- USER_ACT EQU 900H
- IFNE 0
- ;
- ; *** sprite(obj) action program sequence ***
- ;
- in main routine
- JSR INIT_SORT initialize SORT_WORK
- LOOP:
- JSR user PWORK move program
- ; (A6=temp PWORK)
- JSR MAIN_ACTION action logical process
- LOOP
- JSR ORDER_SET sorting order set for interruput
- in interrupt routine (after color generate process)
- JSR ACTION action physical process
- (output LSPC)
- ;
- ; *** logical action process ***
- ;
- MAIN_ACTION:
- JSR NEXT_ACTION
- ACT_COUNT(action counter) increment by ACT_TIMER-ACT_DEC
- if ACT_DEC d7=1 then action stop
- parameter set by ACT_No & ACT_COUNT
- hit area data (only ACT_COUNT=0)
- ACT_FLAG (d0-3 don't care)
- ACT_ADRS (for ACTION program)
- JSR HIT_AREA_SET(PC)
- hit area calcurate by temporary position & reduction
- JSR SORT_SET(PC)
- SORT_WORK set by PRIORITY (0=low - FF=high)
- RTS
- ORDER_SET:
- transfwer work No from SORT_WORK to ORDER_BUFFER
- by OBJ_DIV_POINT
- OBJ_DIV_POINT data format
- [order command insert prioriry No (word),
- order command (word-high byte don't care)],......
- ex.
- DC.W 40H,80H+5*4,0C0H,80H+2*4,-1
- a) b) c)
- a) SORT_WORK+40H insert order command 5
- b) SORT_WORK+C0H insert order command 2
- c) dummy data
- ;
- ; *** physical action process ***
- ;
- ACTION
- ORDER_BUFFER (sprite transfer order & command) format
- 0=<data<80H data is transfere PWORK No
- 80H=<data data is order command*4+80H
- order command
- 0 :all job end
- 1 :sprite group change to OBJ2 normal type
- 2 :sprite group change to OBJ3 normal type
- 3 :sprite group change to OBJ4 normal type
- 4 :start sprite group change to OBJ1 double type
- 5 :sprite group change to OBJ2 double type
- 6 :sprite group change to OBJ3 double type
- 7 :sprite group change to OBJ4 double type
- sprite group definition
- OBJ1(-4)_MAP
- start sprite No (word)
- use sprite count (word)
- *** double type real use sprite count*2
- and count set value must be 8*n. (n=1,2,3,...)
- start sprite group is OBJ1 normal type.
- *** action use parameter ***
- REL_X(Y) display base x(y) position
- use normal relocate co-ordinates
- DISP_X(Y) display offset
- ACT_ATTR action attribute bit work
- ACTAT_FLIP d0 softwear h flip
- ACTAT_ERACE d3 non use y area (=<16) clear (*1)
- ACTAT_CUT d4 h over display area cut (*2)
- ACTAT_OFF d5 non display
- ACTAT_FLASH d6 palette fixed by FLASH_PALETTE (*1)
- ACTAT_SET d7 character change (*2)
- (*1) flag auto clear
- (*2) not effectiv in double sprite type
- BIG_X(Y) display x(y) reduction. {(n+1)/256}
- PALETTE_ADD display palette add value (normal 0)
- FLASH_PALETTE flash palette code (set ACTAT_FLASH)
- ;
- ; *** action data format ***
- ;
- *** 1st table ***
- CH_TABLE:
- DC.L [d31-24:action max number]
- +[d23-0:2nd table address]
- DC.L ..........
- DC.L .......... -------ACT_No*4
- DC.L ..........
- *** 2nd table ***
- DC.B hit data (4 bytes)
- DC.L [d31-24:action time,0=action stop]
- +[d23-16:flag data into ACT_FLAG(d7-d0)
- +[d15-0:display data address offset (adrs-*)]
- DC.L ..........
- DC.L .......... -------(ACT_COUNT+1)*4
- DC.L ..........
- *** display data ***
- DC.W [conversion No*4] or 8000H+[offset command No*4]
- +[d1-0 y,x offset sign]
- DC.B y offset
- DC.B x offset
- offset command
- 0 :data end (without y,x offset)
- 1 :hit data change
- 2-5 :offset postion output WORKN0-3
- 6-D :user define command (long jump vector from 0C0H)
- *** conversion table ***
- CONV_TABLE(OBJT_INFO)
- DC.L [d31-29:conversion type]
- +[d28-25:y size-1(1=<y=<16)]
- +[d24-20:x size-1(1=<y=<32)]
- +[d20-0:conversion address]
- DC.L ..........
- DC.L .......... -------conversion No*4
- DC.L ..........
- *** conversion data ***
- [..]=common element (..)=repeat element
- ch.h(.l)=chara code high(low) 8bit
- pal=palette(8bit) art=attribute(8bit)
- type 0 (ch.h ch.l pal atr).....
- type 1 [pal][dummy byte](ch.h ch.l).....
- type 2 [pal][ch.h](ch.l).....
- type 3 [pal][dummy byte][base ch] ch code increment
- type 4 (ch.h ch.l pal).....
- type 5 [ch.h](ch.l pal).....
- type 6 [base ch](pal)..... ch code increment
- type 7 (ch.h ch.l pal atr)....
- atr<10H non command
- 10H=<atr=<7FH same data at atr/10H+1 times
- 80H=<atr=<FFH same pal,atr data at (atr-80H)/10H+1 times
- ie. {ch.h ch.l [pal atr]}(ch.h ch.l).....
- type 1-6 non attribute
- ENDC
- ;
- ; *** ACTION PROGRAM IN INTERRUPT ROUTINE ***
- ;
- ACTION:
- LEA.L LSPC_DATA,A2
- JSR DB_SEND(PC)
- JSR SET_OBJ1(PC)
- BCHG.B #0,TEMP_SPG(A5)
- LEA.L ORDER_BUFFER(A5),A3
- TST.B TEMP_ORDER(A5)
- BEQ.S ACT_1
- LEA.L 128(A3),A3
- ACT_1:
- ; loop top normal type
- ACT_2:
- MOVE.B (A3)+,(A5)
- BMI ORDER_COMMAND
- MOVE.W (A5),D0
- TST.W TYPE(A5,D0.W)
- BLE.S ACT_1 work non used or busy
- BTST.B #ACTAT_OFF,ACT_ATTR(A5,D0.W)
- BNE.S ACT_1 action not ready
- LEA.L 0(A5,D0.W),A6
- JSR GET_PWORK_VALUE(PC) PWORK parameter set
- MOVE.W TEMP_PAL_COM(A5),TEMP_PAL_COM2(A5)
- MOVE.L ACT_ADRS(A6),A0
- MOVE.W TEMP_SPRITE(A5),D3
- CMP.W SPRITE_POS(A6),D3
- BEQ.S ACT_3
- BSET.B #ACTAT_SET,ACT_ATTR(A6) physical sprite move ch write flag set
- MOVE.W D3,SPRITE_POS(A6)
- ACT_3:
- MOVE.L (A0)+,CONV_MARK(A5)
- MOVE.W CONV_MARK(A5),D4
- BPL.S ACT_4
- JSR OFFSET_COMMAND(PC)
- BEQ ACT_3
- BPL ACT_1
- ACT_4:
- JSR GET_CONV_TYPE(PC) conversion parameter set
- MOVE.W MAX_SPRITE(A5),D0
- SUB.W D6,D0
- BLS ACT_1 sprite over
- MOVE.W D0,MAX_SPRITE(A5)
- MOVE.W TEMP_SPRITE(A5),D4
- TST.B ACT_ATTR(A6)
- BPL NON_ACT chara no change
- MOVEQ.L #0,D0
- JSR FIRST_Y_SET(PC) y clear & chane set
- MOVE.W #0,(A2)
- JSR GET_Y_OFFSET(PC)
- JSR GET_Y_VALUE(PC)
- MOVE.W D1,START_V_VALUE(A5) y value store
- JSR GET_X_OFFSET(PC)
- ADD.W #SP_H-SP_V,D4
- ADD.W REL_X(A6),D1
- BTST.B #ACTAT_CUT,ACT_ATTR(A6)
- BEQ.S ACT_5
- JSR H_OUT_CUT(PC) h over area cut
- ACT_5:
- MOVE.W D4,-2(A2)
- LSL.W #7,D1
- MOVE.W D1,(A2) x value write
- JSR BIG_SET(PC)
- JSR CHARA_SET(PC) character write
- MOVE.W TEMP_PAL_COM2(A5),TEMP_PAL_COM(A5)
- BTST.B #ACTAT_KEEP,ACT_ATTR(A6)
- BNE ACT_3
- MOVE.L START_V_ADRS(A5),-2(A2) y value write
- JMP ACT_3(PC)
- ACTDB_1:
- ; action double sprite type loop top
- MOVE.B (A3)+,(A5)
- BMI ORDER_COMMAND
- ACTDB_2:
- MOVE.W (A5),D0
- TST.W TYPE(A5,D0.W)
- BLE.S ACTDB_1 work non used or busy
- BTST.B #ACTAT_OFF,ACT_ATTR(A5,D0.W)
- BNE.S ACTDB_1 action not ready
- LEA.L 0(A5,D0.W),A6
- JSR GET_PWORK_VALUE(PC)
- MOVE.W TEMP_PAL_COM(A5),TEMP_PAL_COM2(A5)
- MOVE.L ACT_ADRS(A6),A0
- MOVE.W TEMP_SPRITE(A5),SPRITE_POS(A6)
- BSET.B #ACTAT_SET,ACT_ATTR(A6)
- ACTDB_3:
- MOVE.L (A0)+,CONV_MARK(A5)
- MOVE.W CONV_MARK(A5),D4
- BPL.S ACTDB_4
- JSR OFFSET_COMMAND(PC)
- BEQ ACTDB_3
- BPL ACTDB_1
- ACTDB_4:
- JSR GET_CONV_TYPE(PC)
- MOVE.W MAX_SPRITE(A5),D0
- SUB.W D6,D0
- BLO ACTDB_1 sprite over
- MOVE.W D0,MAX_SPRITE(A5)
- MOVE.W TEMP_SPRITE(A5),D4
- JSR GET_Y_OFFSET(PC)
- JSR GET_Y_VALUE(PC)
- JSR Y_VAL_SET_DB(PC)
- JSR GET_X_OFFSET(PC)
- ADD.W #SP_H,D4
- ADD.W REL_X(A6),D1
- BTST.B #ACTAT_CUT,ACT_ATTR(A6)
- BEQ.S ACTDB_5
- JSR H_OUT_CUT(PC) h over area cut
- ACTDB_5:
- MOVE.W D4,-2(A2)
- LSL.W #7,D1
- MOVE.W D1,(A2)
- JSR BIG_SET(PC)
- JSR CHARA_SET(PC)
- MOVE.W TEMP_PAL_COM2(A5),TEMP_PAL_COM(A5)
- JMP ACTDB_3(PC)
- Y_VAL_SET_DB:
- ; chain bit set and active 0
- ; in) D6=x size
- ; D1=y value
- MOVE.W D1,(A4)
- ADD.W D6,A4
- ADD.W D6,A4
- RTS
- CHARA_SET:
- MOVE.W TEMP_SPRITE(A5),D3
- ADD.W D6,TEMP_SPRITE(A5)
- MOVE.W ERACE_CHARA(A5),D0
- TST.B ERACE_16(A5)
- BEQ.S CHARA_SET_1
- MOVEQ.L #16,D0
- SUB.W D5,D0
- CHARA_SET_1:
- SUBQ.W #1,D5
- SUBQ.W #1,D6
- MOVE.W D0,ERACE_CHARA(A5)
- MOVE.W H_FLIP_FLAG(A5),D2
- BNE CHS_FLIP
- MOVEQ.L #40H,D4
- LSL.W #6,D3
- MOVE.W TEMP_PAL_COM(A5),D1
- BEQ CHS_NN
- TST.B D1
- BNE CHS_NF
- CHS_NA:
- ; palette addition type
- MOVEQ.L #0,D0
- MOVE.B CONV_TYPE(A5),D0
- JMP CHS_NA_TBL(PC,D0.W)
- CHS_NA_TBL:
- JMP CHS_NA_T0(PC)
- JMP CHS_NA_T1(PC)
- JMP CHS_NA_T2(PC)
- JMP CHS_NA_T3(PC)
- JMP CHS_NA_T4(PC)
- JMP CHS_NA_T5(PC)
- JMP CHS_NA_T6(PC)
- JMP CHS_NA_T7(PC)
- CHS_NA_T0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NA_T0_1:
- MOVE.W (A1)+,(A2)
- MOVE.W (A1)+,D0
- ADD.W D1,D0
- MOVE.W D0,(A2)
- DBRA D7,CHS_NA_T0_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NA_T0_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NA_T0_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NA_T0_2
- MOVE.W #1,2(A2)
- CHS_NA_T0_3:
- ADD.W D4,D3
- DBRA D6,CHS_NA_T0
- RTS
- CHS_NA_T1:
- ADD.W (A1)+,D1
- CLR.B D1
- CHS_NA_T1_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NA_T1_1:
- MOVE.W (A1)+,(A2)
- NOP
- MOVE.W D1,(A2)
- DBRA D7,CHS_NA_T1_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NA_T1_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NA_T1_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NA_T1_2
- MOVE.W #1,2(A2)
- CHS_NA_T1_3:
- ADD.W D4,D3
- DBRA D6,CHS_NA_T1_0
- RTS
- CHS_NA_T2:
- MOVE.B 1(A1),(A5)
- MOVE.W (A5),D2
- ADD.W (A1)+,D1
- CLR.B D1
- CHS_NA_T2_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NA_T2_1:
- MOVE.B (A1)+,D2
- MOVE.W D2,(A2)
- NOP
- MOVE.W D1,(A2)
- DBRA D7,CHS_NA_T2_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NA_T2_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NA_T2_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NA_T2_2
- MOVE.W #1,2(A2)
- CHS_NA_T2_3:
- ADD.W D4,D3
- DBRA D6,CHS_NA_T2_0
- RTS
- CHS_NA_T3:
- ADD.W (A1)+,D1
- CLR.B D1
- MOVE.W (A1)+,D2
- CHS_NA_T3_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NA_T3_1:
- MOVE.W D2,(A2)
- ADDQ.W #1,D2
- MOVE.W D1,(A2)
- DBRA D7,CHS_NA_T3_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NA_T3_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NA_T3_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NA_T3_2
- MOVE.W #1,2(A2)
- CHS_NA_T3_3:
- ADD.W D4,D3
- DBRA D6,CHS_NA_T3_0
- RTS
- CHS_NA_T4:
- CLR.W (A5)
- CHS_NA_T4_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NA_T4_1:
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D0
- MOVE.B (A1)+,D0
- MOVE.W D0,(A2)
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D0
- ADD.W D1,D0
- MOVE.W D0,(A2)
- DBRA D7,CHS_NA_T4_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NA_T4_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NA_T4_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NA_T4_2
- MOVE.W #1,2(A2)
- CHS_NA_T4_3:
- ADD.W D4,D3
- DBRA D6,CHS_NA_T4_0
- RTS
- CHS_NA_T5:
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D2
- CLR.W (A5)
- CHS_NA_T5_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NA_T5_1:
- MOVE.B (A1)+,D2
- MOVE.W D2,(A2)
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D0
- ADD.W D1,D0
- MOVE.W D0,(A2)
- DBRA D7,CHS_NA_T5_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NA_T5_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NA_T5_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NA_T5_2
- MOVE.W #1,2(A2)
- CHS_NA_T5_3:
- ADD.W D4,D3
- DBRA D6,CHS_NA_T5_0
- RTS
- CHS_NA_T6:
- MOVE.W (A1)+,D2
- CLR.W (A5)
- CHS_NA_T6_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NA_T6_1:
- MOVE.W D2,(A2)
- ADDQ.W #1,D2
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D0
- ADD.W D1,D0
- MOVE.W D0,(A2)
- DBRA D7,CHS_NA_T6_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NA_T6_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NA_T6_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NA_T6_2
- MOVE.W #1,2(A2)
- CHS_NA_T6_3:
- ADD.W D4,D3
- DBRA D6,CHS_NA_T6_0
- RTS
- CHS_NA_T7:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NA_T7_1:
- MOVE.W (A1)+,(A2)
- MOVE.W (A1)+,D2
- ADD.W D1,D2
- MOVE.W D2,(A2)
- CMP.B #10H,D2
- BHS.S CHS_NA_T7_3
- CHS_NA_T7_2:
- DBRA D7,CHS_NA_T7_1
- BSR CHS_T7_NEXT
- BRA.S CHS_NA_T7_1
- CHS_NA_T7_3:
- DBRA D7,CHS_NA_T7_4
- BSR CHS_T7_NEXT
- CHS_NA_T7_4:
- TST.B D2
- BMI.S CHS_NA_T7_6
- MOVE.W -4(A1),D0
- CHS_NA_T7_5:
- MOVE.W D0,(A2)
- SUB.B #10H,D2
- MOVE.W D2,(A2)
- CMP.B #10H,D2
- BCS CHS_NA_T7_2
- DBRA D7,CHS_NA_T7_5
- BSR CHS_T7_NEXT
- BRA CHS_NA_T7_5
- CHS_NA_T7_6:
- MOVE.W (A1)+,(A2)
- SUB.B #10H,D2
- MOVE.W D2,(A2)
- CMP.B #90H,D2
- BCS CHS_NA_T7_2
- DBRA D7,CHS_NA_T7_6
- BSR CHS_T7_NEXT
- BRA CHS_NA_T7_6
- CHS_NF:
- ; palette fix type
- MOVEQ.L #0,D0
- MOVE.B CONV_TYPE(A5),D0
- JMP CHS_NF_TBL(PC,D0.W)
- CHS_NF_TBL:
- JMP CHS_NF_T0(PC)
- JMP CHS_NF_T1(PC)
- JMP CHS_NF_T2(PC)
- JMP CHS_NF_T3(PC)
- JMP CHS_NF_T4(PC)
- JMP CHS_NF_T5(PC)
- JMP CHS_NF_T6(PC)
- JMP CHS_NF_T7(PC)
- CHS_NF_T0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NF_T0_1:
- MOVE.W (A1),(A2)
- MOVE.B 3(A1),D1
- MOVE.W D1,(A2)
- ADDQ.W #4,A1
- DBRA D7,CHS_NF_T0_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NF_T0_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NF_T0_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NF_T0_2
- MOVE.W #1,2(A2)
- CHS_NF_T0_3:
- ADD.W D4,D3
- DBRA D6,CHS_NF_T0
- RTS
- CHS_NF_T1:
- ADDQ.W #2,A1
- CLR.B D1
- JMP CHS_NA_T1_0(PC)
- CHS_NF_T2:
- MOVE.B 1(A1),(A5)
- MOVE.W (A5),D2
- ADDQ.W #2,A1
- CLR.B D1
- JMP CHS_NA_T2_0(PC)
- CHS_NF_T3:
- CLR.B D1
- MOVE.W 2(A1),D2
- ADDQ.W #4,A1
- JMP CHS_NA_T3_0(PC)
- CHS_NF_T4:
- CLR.B D1
- CHS_NF_T4_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NF_T4_1:
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D0
- MOVE.B (A1),D0
- MOVE.W D0,(A2)
- ADDQ.W #2,A1
- MOVE.W D1,(A2)
- DBRA D7,CHS_NF_T4_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NF_T4_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NF_T4_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NF_T4_2
- MOVE.W #1,2(A2)
- CHS_NF_T4_3:
- ADD.W D4,D3
- DBRA D6,CHS_NF_T4_0
- RTS
- CHS_NF_T5:
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D2
- CLR.B D1
- CHS_NF_T5_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NF_T5_1:
- MOVE.B (A1),D2
- MOVE.W D2,(A2)
- ADDQ.W #2,A1
- MOVE.W D1,(A2)
- DBRA D7,CHS_NF_T5_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NF_T5_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NF_T5_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NF_T5_2
- MOVE.W #1,2(A2)
- CHS_NF_T5_3:
- ADD.W D4,D3
- DBRA D6,CHS_NF_T5_0
- RTS
- CHS_NF_T6:
- MOVE.W (A1),D2
- CLR.B D1
- CHS_NF_T6_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NF_T6_1:
- MOVE.W D2,(A2)
- ADDQ.W #1,D2
- MOVE.W D1,(A2)
- DBRA D7,CHS_NF_T6_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NF_T6_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NF_T6_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NF_T6_2
- MOVE.W #1,2(A2)
- CHS_NF_T6_3:
- ADD.W D4,D3
- DBRA D6,CHS_NF_T6_0
- RTS
- CHS_NF_T7:
- MOVEQ.L #10H,D2
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NF_T7_1:
- MOVE.W (A1),(A2)
- MOVE.B 1(A1),D1
- MOVE.W D1,(A2)
- CMP.B D2,D1
- BHS.S CHS_NF_T7_3
- ADDQ.W #4,A1
- CHS_NF_T7_2:
- DBRA D7,CHS_NF_T7_1
- BSR CHS_T7_NEXT
- BRA.S CHS_NF_T7_1
- CHS_NF_T7_3:
- DBRA D7,CHS_NF_T7_4
- BSR CHS_T7_NEXT
- CHS_NF_T7_4:
- TST.B D1
- BMI.S CHS_NF_T7_6
- MOVE.W (A1),D0
- ADDQ.W #4,A1
- CHS_NF_T7_5:
- MOVE.W D0,(A2)
- SUB.B D2,D1
- MOVE.W D1,(A2)
- CMP.B D2,D1
- BCS CHS_NF_T7_2
- DBRA D7,CHS_NF_T7_5
- BSR CHS_T7_NEXT
- BRA CHS_NF_T7_5
- CHS_NF_T7_6:
- ADDQ.W #4,A1
- CHS_NF_T7_7:
- MOVE.W (A1)+,(A2)
- SUB.B D2,D1
- MOVE.W D1,(A2)
- CMP.B #90H,D1
- BCS CHS_NF_T7_2
- DBRA D7,CHS_NF_T7_7
- BSR CHS_T7_NEXT
- BRA CHS_NF_T7_7
- CHS_NN:
- ; normal type
- MOVEQ.L #0,D0
- MOVE.B CONV_TYPE(A5),D0
- JMP CHS_NN_TBL(PC,D0.W)
- CHS_NN_TBL:
- JMP CHS_NN_T0(PC)
- JMP CHS_NN_T1(PC)
- JMP CHS_NN_T2(PC)
- JMP CHS_NN_T3(PC)
- JMP CHS_NN_T4(PC)
- JMP CHS_NN_T5(PC)
- JMP CHS_NN_T6(PC)
- JMP CHS_NN_T7(PC)
- CHS_NN_T0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NN_T0_1:
- MOVE.W (A1)+,(A2)
- MOVE.W (A1)+,(A2)
- DBRA D7,CHS_NN_T0_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NN_T0_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NN_T0_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NN_T0_2
- MOVE.W #1,2(A2)
- CHS_NN_T0_3:
- ADD.W D4,D3
- DBRA D6,CHS_NN_T0
- RTS
- CHS_NN_T1:
- MOVE.W (A1)+,D1
- CLR.B D1
- JMP CHS_NA_T1_0(PC)
- CHS_NN_T2:
- MOVE.B 1(A1),(A5)
- MOVE.W (A5),D2
- MOVE.W (A1)+,D1
- CLR.B D1
- JMP CHS_NA_T2_0(PC)
- CHS_NN_T3:
- MOVE.W (A1)+,D1
- CLR.B D1
- MOVE.W (A1)+,D2
- JMP CHS_NA_T3_0(PC)
- CHS_NN_T4:
- CLR.W (A5)
- CHS_NN_T4_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NN_T4_1:
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D0
- MOVE.B (A1)+,D0
- MOVE.W D0,(A2)
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),(A2)
- DBRA D7,CHS_NN_T4_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NN_T4_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NN_T4_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NN_T4_2
- MOVE.W #1,2(A2)
- CHS_NN_T4_3:
- ADD.W D4,D3
- DBRA D6,CHS_NN_T4_0
- RTS
- CHS_NN_T5:
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D2
- CLR.W (A5)
- CHS_NN_T5_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NN_T5_1:
- MOVE.B (A1)+,D2
- MOVE.W D2,(A2)
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),(A2)
- DBRA D7,CHS_NN_T5_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NN_T5_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NN_T5_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NN_T5_2
- MOVE.W #1,2(A2)
- CHS_NN_T5_3:
- ADD.W D4,D3
- DBRA D6,CHS_NN_T5_0
- RTS
- CHS_NN_T6:
- MOVE.W (A1)+,D2
- CLR.W (A5)
- CHS_NN_T6_0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NN_T6_1:
- MOVE.W D2,(A2)
- ADDQ.W #1,D2
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),(A2)
- DBRA D7,CHS_NN_T6_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_NN_T6_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_NN_T6_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_NN_T6_2
- MOVE.W #1,2(A2)
- CHS_NN_T6_3:
- ADD.W D4,D3
- DBRA D6,CHS_NN_T6_0
- RTS
- CHS_NN_T7:
- MOVEQ.L #10H,D2
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_NN_T7_1:
- MOVE.W (A1)+,(A2)
- MOVE.W (A1)+,(A2)
- CMP.B -1(A1),D2
- BLS.S CHS_NN_T7_3
- CHS_NN_T7_2:
- DBRA D7,CHS_NN_T7_1
- BSR CHS_T7_NEXT
- BRA.S CHS_NN_T7_1
- CHS_NN_T7_3:
- DBRA D7,CHS_NN_T7_4
- BSR CHS_T7_NEXT
- CHS_NN_T7_4:
- MOVE.W -4(A1),D0
- MOVE.W -2(A1),D1
- TST.B D1
- BMI.S CHS_NN_T7_6
- CHS_NN_T7_5:
- MOVE.W D0,(A2)
- SUB.B D2,D1
- MOVE.W D1,(A2)
- CMP.B D2,D1
- BCS CHS_NN_T7_2
- DBRA D7,CHS_NN_T7_5
- BSR CHS_T7_NEXT
- BRA CHS_NN_T7_5
- CHS_NN_T7_6:
- MOVE.W (A1)+,(A2)
- SUB.B D2,D1
- MOVE.W D1,(A2)
- CMP.B #90H,D1
- BCS CHS_NN_T7_2
- DBRA D7,CHS_NN_T7_6
- BSR CHS_T7_NEXT
- BRA CHS_NN_T7_6
- CHS_FLIP:
- MOVEQ.L #-40H,D4
- ADD.W D6,D3
- LSL.W #6,D3
- MOVE.W TEMP_PAL_COM(A5),D1
- BEQ CHS_HN
- TST.B D1
- BNE CHS_HF
- CHS_HA:
- ; palette addition type
- MOVEQ.L #0,D0
- MOVE.B CONV_TYPE(A5),D0
- JMP CHS_HA_TBL(PC,D0.W)
- CHS_HA_TBL:
- JMP CHS_HA_T0(PC)
- JMP CHS_HA_T1(PC)
- JMP CHS_HA_T2(PC)
- JMP CHS_HA_T3(PC)
- JMP CHS_HA_T4(PC)
- JMP CHS_HA_T5(PC)
- JMP CHS_HA_T6(PC)
- JMP CHS_HA_T7(PC)
- CHS_HA_T0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_HA_T0_1:
- MOVE.W (A1)+,(A2)
- MOVE.W (A1)+,D0
- ADD.W D1,D0
- EOR.W D2,D0
- MOVE.W D0,(A2)
- DBRA D7,CHS_HA_T0_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_HA_T0_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_HA_T0_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_HA_T0_2
- MOVE.W #1,2(A2)
- CHS_HA_T0_3:
- ADD.W D4,D3
- DBRA D6,CHS_HA_T0
- RTS
- CHS_HA_T1:
- ADD.W (A1)+,D1
- MOVE.B D2,D1
- JMP CHS_NA_T1_0(PC)
- CHS_HA_T2:
- ADD.W (A1)+,D1
- MOVE.B D2,D1
- MOVE.B -1(A1),(A5)
- MOVE.W (A5),D2
- JMP CHS_NA_T2_0(PC)
- CHS_HA_T3:
- ADD.W (A1)+,D1
- MOVE.B D2,D1
- MOVE.W (A1)+,D2
- JMP CHS_NA_T3_0(PC)
- CHS_HA_T4:
- MOVE.W D2,(A5)
- JSR CHS_NA_T4_0(PC)
- CLR.W (A5)
- RTS
- CHS_HA_T5:
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D2
- MOVE.W #1,(A5)
- JSR CHS_NA_T5_0(PC)
- CLR.W (A5)
- RTS
- CHS_HA_T6:
- MOVE.W D2,(A5)
- MOVE.W (A1)+,D2
- JSR CHS_NA_T6_0(PC)
- CLR.W (A5)
- RTS
- CHS_HA_T7:
- MOVEQ.L #10H,D2
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_HA_T7_1:
- MOVE.W (A1)+,(A2)
- MOVE.W (A1)+,D2
- ADD.W D1,D2
- EOR.W #1,D2
- MOVE.W D2,(A2)
- CMP.B #10H,D2
- BHS.S CHS_HA_T7_3
- CHS_HA_T7_2:
- DBRA D7,CHS_HA_T7_1
- BSR CHS_T7_NEXT
- BRA.S CHS_HA_T7_1
- CHS_HA_T7_3:
- DBRA D7,CHS_HA_T7_4
- BSR CHS_T7_NEXT
- CHS_HA_T7_4:
- TST.B D2
- BMI.S CHS_HA_T7_6
- MOVE.W -4(A1),D0
- CHS_HA_T7_5:
- MOVE.W D0,(A2)
- SUB.B #10H,D2
- MOVE.W D2,(A2)
- CMP.B #10H,D2
- BCS CHS_HA_T7_2
- DBRA D7,CHS_HA_T7_5
- BSR CHS_T7_NEXT
- BRA CHS_HA_T7_5
- CHS_HA_T7_6:
- MOVE.W (A1)+,(A2)
- SUB.B #10H,D2
- MOVE.W D2,(A2)
- CMP.B #90H,D2
- BCS CHS_HA_T7_2
- DBRA D7,CHS_HA_T7_6
- BSR CHS_T7_NEXT
- BRA CHS_HA_T7_6
- CHS_HF:
- ; palette fix type
- MOVEQ.L #0,D0
- MOVE.B CONV_TYPE(A5),D0
- JMP CHS_HF_TBL(PC,D0.W)
- CHS_HF_TBL:
- JMP CHS_HF_T0(PC)
- JMP CHS_HF_T1(PC)
- JMP CHS_HF_T2(PC)
- JMP CHS_HF_T3(PC)
- JMP CHS_HF_T4(PC)
- JMP CHS_HF_T5(PC)
- JMP CHS_HF_T6(PC)
- JMP CHS_HF_T7(PC)
- CHS_HF_T0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_HF_T0_1:
- MOVE.W (A1),(A2)
- MOVE.B 3(A1),D1
- EOR.W D2,D1
- MOVE.W D1,(A2)
- ADDQ.W #4,A1
- DBRA D7,CHS_HF_T0_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_HF_T0_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_HF_T0_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_HF_T0_2
- MOVE.W #1,2(A2)
- CHS_HF_T0_3:
- ADD.W D4,D3
- DBRA D6,CHS_HF_T0
- RTS
- CHS_HF_T1:
- ADDQ.W #2,A1
- MOVE.B D2,D1
- JMP CHS_NA_T1_0(PC)
- CHS_HF_T2:
- MOVE.B 1(A1),(A5)
- MOVE.B D2,D1
- MOVE.W (A5),D2
- ADDQ.W #2,A1
- JMP CHS_NA_T2_0(PC)
- CHS_HF_T3:
- MOVE.B D2,D1
- MOVE.W 2(A1),D2
- ADDQ.W #4,A1
- JMP CHS_NA_T3_0(PC)
- CHS_HF_T4:
- MOVE.B D2,D1
- JMP CHS_NF_T4_0(PC)
- CHS_HF_T5:
- MOVE.B D2,D1
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D2
- JMP CHS_NF_T5_0(PC)
- CHS_HF_T6:
- MOVE.B D2,D1
- MOVE.W (A1),D2
- JMP CHS_NF_T6_0(PC)
- CHS_HF_T7:
- MOVEQ.L #10H,D2
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_HF_T7_1:
- MOVE.W (A1),(A2)
- MOVE.B 1(A1),D1
- EOR.B #1,D1
- MOVE.W D1,(A2)
- CMP.B D2,D1
- BHS.S CHS_HF_T7_3
- ADDQ.W #4,A1
- CHS_HF_T7_2:
- DBRA D7,CHS_HF_T7_1
- BSR CHS_T7_NEXT
- BRA.S CHS_HF_T7_1
- CHS_HF_T7_3:
- DBRA D7,CHS_HF_T7_4
- BSR CHS_T7_NEXT
- CHS_HF_T7_4:
- TST.B D1
- BMI.S CHS_HF_T7_6
- MOVE.W (A1),D0
- ADDQ.W #4,A1
- CHS_HF_T7_5:
- MOVE.W D0,(A2)
- SUB.B D2,D1
- MOVE.W D1,(A2)
- CMP.B D2,D1
- BCS CHS_HF_T7_2
- DBRA D7,CHS_HF_T7_5
- BSR CHS_T7_NEXT
- BRA CHS_HF_T7_5
- CHS_HF_T7_6:
- ADDQ.W #4,A1
- CHS_HF_T7_7:
- MOVE.W (A1)+,(A2)
- SUB.B D2,D1
- MOVE.W D1,(A2)
- CMP.B #90H,D1
- BCS CHS_HF_T7_2
- DBRA D7,CHS_HF_T7_7
- BSR CHS_T7_NEXT
- BRA CHS_HF_T7_7
- CHS_HN:
- ; normal type
- MOVEQ.L #0,D0
- MOVE.B CONV_TYPE(A5),D0
- JMP CHS_HN_TBL(PC,D0.W)
- CHS_HN_TBL:
- JMP CHS_HN_T0(PC)
- JMP CHS_HN_T1(PC)
- JMP CHS_HN_T2(PC)
- JMP CHS_HN_T3(PC)
- JMP CHS_HN_T4(PC)
- JMP CHS_HN_T5(PC)
- JMP CHS_HN_T6(PC)
- JMP CHS_HN_T7(PC)
- CHS_HN_T0:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_HN_T0_1:
- MOVE.W (A1)+,(A2)
- MOVE.W (A1)+,D0
- EOR.W D2,D0
- MOVE.W D0,(A2)
- DBRA D7,CHS_HN_T0_1
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_HN_T0_3
- MOVE.W #2,2(A2)
- MOVEQ.L #0,D0
- CHS_HN_T0_2:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S CHS_HN_T0_2
- MOVE.W #1,2(A2)
- CHS_HN_T0_3:
- ADD.W D4,D3
- DBRA D6,CHS_HN_T0
- RTS
- CHS_HN_T1:
- MOVE.W (A1)+,D1
- MOVE.B D2,D1
- JMP CHS_NA_T1_0(PC)
- CHS_HN_T2:
- MOVE.B 1(A1),(A5)
- MOVE.W (A5),D2
- MOVE.W (A1)+,D1
- MOVE.B #1,D1
- JMP CHS_NA_T2_0(PC)
- CHS_HN_T3:
- MOVE.W (A1)+,D1
- MOVE.B D2,D1
- MOVE.W (A1)+,D2
- JMP CHS_NA_T3_0(PC)
- CHS_HN_T4:
- MOVE.W D2,(A5)
- JSR CHS_NN_T4_0(PC)
- CLR.W (A5)
- RTS
- CHS_HN_T5:
- MOVE.B (A1)+,(A5)
- MOVE.W (A5),D2
- MOVE.W #1,(A5)
- JSR CHS_NN_T5_0(PC)
- CLR.W (A5)
- RTS
- CHS_HN_T6:
- MOVE.W #1,(A5)
- MOVE.W (A1)+,D2
- JSR CHS_NN_T6_0(PC)
- CLR.W (A5)
- RTS
- CHS_HN_T7:
- MOVEQ.L #10H,D2
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- CHS_HN_T7_1:
- MOVE.W (A1)+,(A2)
- MOVE.W (A1)+,D1
- EOR.W #1,D1
- MOVE.W D1,(A2)
- CMP.B D1,D2
- BLS.S CHS_HN_T7_3
- CHS_HN_T7_2:
- DBRA D7,CHS_HN_T7_1
- BSR CHS_T7_NEXT
- BRA.S CHS_HN_T7_1
- CHS_HN_T7_3:
- DBRA D7,CHS_HN_T7_4
- BSR CHS_T7_NEXT
- CHS_HN_T7_4:
- MOVE.W -4(A1),D0
- TST.B D1
- BMI.S CHS_HN_T7_6
- CHS_HN_T7_5:
- MOVE.W D0,(A2)
- SUB.B D2,D1
- MOVE.W D1,(A2)
- CMP.B D2,D1
- BCS CHS_HN_T7_2
- DBRA D7,CHS_HN_T7_5
- BSR CHS_T7_NEXT
- BRA CHS_HN_T7_5
- CHS_HN_T7_6:
- MOVE.W (A1)+,(A2)
- SUB.B D2,D1
- MOVE.W D1,(A2)
- CMP.B #90H,D1
- BCS CHS_HN_T7_2
- DBRA D7,CHS_HN_T7_6
- BSR CHS_T7_NEXT
- BRA CHS_HN_T7_6
- CHS_T7_NEXT:
- MOVE.W ERACE_CHARA(A5),D7
- BEQ.S CHS_T7_NEXT_2
- MOVE.W #2,2(A2)
- CHS_T7_NEXT_1:
- CLR.W (A2)
- SUBQ.W #1,D7
- BNE.S CHS_T7_NEXT_1
- MOVE.W #1,2(A2)
- CHS_T7_NEXT_2:
- ADD.W D4,D3
- DBRA D6,CHS_T7_NEXT_3
- ADDQ.W #4,SP
- RTS
- CHS_T7_NEXT_3:
- MOVE.W D3,-2(A2)
- MOVE.W D5,D7
- RTS
- NON_ACT:
- BTST.B #ACTAT_KEEP,ACT_ATTR(A6)
- BEQ.S NON_ACT_1
- ; ADDQ.W #2,A0
- MOVEQ.L #0,D0
- JSR FIRST_Y_SET(PC)
- MOVE.W TEMP_SPRITE(A5),D3
- ADD.W D6,TEMP_SPRITE(A5)
- JMP ACT_3(PC)
- NON_ACT_1:
- JSR GET_Y_OFFSET(PC)
- JSR GET_Y_VALUE(PC)
- MOVE.W D1,D0
- JSR FIRST_Y_SET(PC)
- JSR GET_X_OFFSET(PC)
- ADD.W #SP_H-SP_V,D4
- ADD.W REL_X(A6),D1
- BTST.B #ACTAT_CUT,ACT_ATTR(A6)
- BEQ.S NON_ACT_2
- JSR H_OUT_CUT(PC)
- NON_ACT_2:
- MOVE.W D4,-2(A2)
- LSL.W #7,D1
- MOVE.W D1,(A2)
- JSR BIG_SET(PC)
- MOVE.W TEMP_SPRITE(A5),D3
- ADD.W D6,TEMP_SPRITE(A5)
- JMP ACT_3(PC)
- GET_CONV_TYPE:
- MOVE.L OBJT_INFO(A5),A1
- AND.W #0FFFCH,D4
- MOVE.L 0(A1,D4.W),(A5)
- MOVE.W (A5),D0
- AND.W #0FH,(A5)
- MOVE.L (A5),A1
- CLR.L (A5)
- LSR.W #3,D0
- MOVE.W D0,D4
- AND.W #1C00H,D4
- MOVE.W D4,CONV_TYPE(A5)
- AND.W #3FEH,D0
- MOVEQ.L #0,D5
- MOVEQ.L #0,D6
- MOVE.B SIZE_DATA(PC,D0.W),D5 y size
- MOVE.B SIZE_DATA+1(PC,D0.W),D6 x size
- RTS
- SIZE MACRO SIZE_Y
- SIZE_X SET 1
- REPT 32
- DC.B SIZE_Y,SIZE_X
- SIZE_X SET SIZE_X+1
- ENDR
- ENDM
- SIZE_DATA:
- SIZE 1
- SIZE 2
- SIZE 3
- SIZE 4
- SIZE 5
- SIZE 6
- SIZE 7
- SIZE 8
- SIZE 9
- SIZE 10
- SIZE 11
- SIZE 12
- SIZE 13
- SIZE 14
- SIZE 15
- SIZE 16
- H_OUT_CUT:
- CMP.W #-(512-320),D1
- BLE LEFT_OUT
- MOVE.L D6,D0
- LSL.W #4,D0
- MOVE.W TEMP_BIG_X(A5),D2
- BEQ.S HOC_1
- MULS.W D2,D0
- ASR.L #8,D0
- HOC_1:
- ADD.W D1,D0
- SUB.W #512,D0
- BGE.S RIGHT_OUT
- RTS
- RIGHT_OUT:
- MOVEQ.L #1,D2
- ADD.B TEMP_BIG_VALUE(A5),D2
- DIVU D2,D0
- ADDQ.W #1,D0
- CMP.W D0,D6
- BHI.S RIGHT_OUT_1
- ALL_OUT:
- MOVE.W D6,D0
- RIGHT_OUT_1:
- NEG.W D0
- TST.B SPG_MODE(A5)
- BNE.S RIGHT_OUT_DB
- ADD.W START_V_ADRS(A5),D0
- ADD.W D6,D0
- MOVE.W D0,-2(A2)
- MOVE.W #0,(A2)
- RTS
- RIGHT_OUT_DB:
- ADD.W D0,D0
- CLR.W 0(A4,D0.W)
- RTS
- LEFT_OUT:
- MOVE.W #512-320,D0
- ADD.W D1,D0
- NEG.W D0
- MOVEQ.L #1,D2
- ADD.B TEMP_BIG_VALUE(A5),D2
- DIVU D2,D0
- ADDQ.W #1,D0
- CMP.W D0,D6
- BLS ALL_OUT
- ADD.W D0,D4
- TST.B SPG_MODE(A5)
- BNE.S LEFT_OUT_DB
- ADD.W D0,START_V_ADRS(A5)
- LSL.W #4,D0
- LEFT_OUT_01:
- MOVE.W TEMP_BIG_X(A5),D2
- BEQ.S LEFT_OUT_1
- MULS.W D2,D0
- ASR.L #8,D0
- LEFT_OUT_1:
- ADD.W D0,D1
- RTS
- LEFT_OUT_DB:
- SUB.W D6,A4
- SUB.W D6,A4
- ADD.W D0,D0
- MOVE.W (A4),0(A4,D0.W)
- CLR.W (A4)
- ADD.W D6,A4
- ADD.W D6,A4
- ADD.W D0,D0
- ADD.W D0,D0
- ADD.W D0,D0
- BRA LEFT_OUT_01
- FIRST_Y_SET:
- ; chain bit set and active 0
- ; in) D4=start sprite number
- ; D6=x size
- ; D0=y value
- ; out) D4=start v address
- MOVE.W #1,2(A2)
- ADD.W #SP_V,D4
- MOVE.W D4,-2(A2)
- MOVE.W D4,START_V_ADRS(A5)
- MOVE.W D0,(A2)
- MOVE.W D6,D7
- SUBQ.W #1,D7
- BEQ.S FYS_2
- FYS_1:
- MOVE.W #40H,(A2) chain only
- SUBQ.W #1,D7
- BNE.S FYS_1
- FYS_2:
- RTS
- GET_Y_OFFSET:
- MOVEQ.L #0,D1
- MOVE.B CONV_MARK+2(A5),D1
- BTST.B #1,CONV_MARK+1(A5)
- BEQ.S GET_YO_1
- NEG.W D1
- GET_YO_1:
- ADD.W DISP_Y(A6),D1
- MOVE.W TEMP_BIG_Y(A5),D0
- BEQ.S GET_YO_2
- MULS.W D0,D1
- ASR.L #8,D1
- GET_YO_2:
- RTS
- GET_X_OFFSET:
- MOVEQ.L #0,D1
- MOVE.B CONV_MARK+3(A5),D1
- BTST.B #0,CONV_MARK+1(A5)
- BEQ.S GET_XO_1
- NEG.W D1
- GET_XO_1:
- ADD.W DISP_X(A6),D1
- TST.W H_FLIP_FLAG(A5)
- BEQ.S GET_XO_2
- MOVE.W D6,D0 x size
- LSL.W #4,D0
- ADD.W D0,D1
- NEG.W D1
- GET_XO_2:
- MOVE.W TEMP_BIG_X(A5),D0
- BEQ.S GET_XO_3
- MULS.W D0,D1
- ASR.L #8,D1
- GET_XO_3:
- RTS
- GET_PWORK_VALUE:
- MOVE.L A6,MASTER_PWORK(A5)
- MOVEQ.L #0,D0
- MOVE.B BIG_Y(A6),D0
- MOVE.B D0,TEMP_BIG_VALUE+1(A5)
- ADDQ.B #1,D0
- MOVE.W D0,TEMP_BIG_Y(A5)
- MOVE.B BIG_X(A6),D0
- ADDQ.B #1,D0
- MOVE.W D0,TEMP_BIG_X(A5)
- ADD.W D0,D0
- MOVE.W #200H,D1
- MOVE.B BIG_X_DATA(PC,D0.W),TEMP_BIG_VALUE(A5)
- MOVE.B BIG_X_DATA+1(PC,D0.W),D1
- MOVE.L BIG_X_DATA(PC,D1.W),TEMP_BIG_BIT(A5)
- BCLR.B #ACTAT_ERACE,ACT_ATTR(A6)
- SNE.B ERACE_16(A5)
- MOVEQ.L #1,D0
- AND.B ACT_ATTR(A6),D0
- MOVE.W D0,H_FLIP_FLAG(A5)
- BCLR.B #ACTAT_FLASH,ACT_ATTR(A6)
- BNE.S FLASH_ATTR_SET
- CLR.W TEMP_PAL_COM(A5)
- MOVE.B PALETTE_ADD(A6),TEMP_PAL_COM(A5)
- RTS
- FLASH_ATTR_SET:
- MOVE.B FLASH_PALETTE(A5),TEMP_PAL_COM(A5)
- MOVE.B #1,TEMP_PAL_COM+1(A5)
- RTS
- BIG_X_DATA:
- DC.W 0F00H,0000H,0000H,0000H,0000H,0000H,0000H,0000H
- DC.W 0000H,0000H,0000H,0000H,0000H,0000H,0000H,0000H
- DC.W 0000H,0104H,0108H,010CH,0110H,0114H,0118H,011CH
- DC.W 0120H,0124H,0128H,012CH,0130H,0134H,0138H,013CH
- DC.W 0100H,0204H,0208H,020CH,0210H,0214H,0218H,021CH
- DC.W 0220H,0224H,0228H,022CH,0230H,0234H,0238H,023CH
- DC.W 0200H,0304H,0308H,030CH,0310H,0314H,0318H,031CH
- DC.W 0320H,0324H,0328H,032CH,0330H,0334H,0338H,033CH
- DC.W 0300H,0404H,0408H,040CH,0410H,0414H,0418H,041CH
- DC.W 0420H,0424H,0428H,042CH,0430H,0434H,0438H,043CH
- DC.W 0400H,0504H,0508H,050CH,0510H,0514H,0518H,051CH
- DC.W 0520H,0524H,0528H,052CH,0530H,0534H,0538H,053CH
- DC.W 0500H,0604H,0608H,060CH,0610H,0614H,0618H,061CH
- DC.W 0620H,0624H,0628H,062CH,0630H,0634H,0638H,063CH
- DC.W 0600H,0704H,0708H,070CH,0710H,0714H,0718H,071CH
- DC.W 0720H,0724H,0728H,072CH,0730H,0734H,0738H,073CH
- DC.W 0700H,0804H,0808H,080CH,0810H,0814H,0818H,081CH
- DC.W 0820H,0824H,0828H,082CH,0830H,0834H,0838H,083CH
- DC.W 0800H,0904H,0908H,090CH,0910H,0914H,0918H,091CH
- DC.W 0920H,0924H,0928H,092CH,0930H,0934H,0938H,093CH
- DC.W 0900H,0A04H,0A08H,0A0CH,0A10H,0A14H,0A18H,0A1CH
- DC.W 0A20H,0A24H,0A28H,0A2CH,0A30H,0A34H,0A38H,0A3CH
- DC.W 0A00H,0B04H,0B08H,0B0CH,0B10H,0B14H,0B18H,0B1CH
- DC.W 0B20H,0B24H,0B28H,0B2CH,0B30H,0B34H,0B38H,0B3CH
- DC.W 0B00H,0C04H,0C08H,0C0CH,0C10H,0C14H,0C18H,0C1CH
- DC.W 0C20H,0C24H,0C28H,0C2CH,0C30H,0C34H,0C38H,0C3CH
- DC.W 0C00H,0D04H,0D08H,0D0CH,0D10H,0D14H,0D18H,0D1CH
- DC.W 0D20H,0D24H,0D28H,0D2CH,0D30H,0D34H,0D38H,0D3CH
- DC.W 0D00H,0E04H,0E08H,0E0CH,0E10H,0E14H,0E18H,0E1CH
- DC.W 0E20H,0E24H,0E28H,0E2CH,0E30H,0E34H,0E38H,0E3CH
- DC.W 0E00H,0F04H,0F08H,0F0CH,0F10H,0F14H,0F18H,0F1CH
- DC.W 0F20H,0F24H,0F28H,0F2CH,0F30H,0F34H,0F38H,0F3CH
- ; 0123456789ABCDEF0123456789ABCDEF
- DC.L 00000000000000000000000000000000B 0
- DC.L 11111111011111111111111101111111B 1
- DC.L 01111111011111110111111101111111B 2
- DC.L 01111111011101110111111101110111B 3
- DC.L 01110111011101110111011101110111B 4
- DC.L 01110111010101110111011101010111B 5
- DC.L 01010111010101110101011101010111B 6
- DC.L 01010111010101010101011101010101B 7
- DC.L 01010101010101010101010101010101B 8
- DC.L 00010101010101010001010101010101B 9
- DC.L 00010101000101010001010100010101B A
- DC.L 00010101000100010001010100010001B B
- DC.L 00010001000100010001000100010001B C
- DC.L 00010001000000010001000100000001B D
- DC.L 00000001000000010000000100000001B E
- DC.L 00000001000000000000000100000000B F
- BIG_SET:
- ADD.W #SP_BIG-SP_H,D4
- MOVE.W D4,-2(A2)
- MOVE.W D6,D7
- MOVE.W TEMP_BIG_VALUE(A5),D2
- MOVE.L TEMP_BIG_BIT(A5),D1
- BNE.S BIG_SET_2
- BIG_SET_1:
- MOVE.W D2,(A2)
- SUBQ.W #1,D7
- BNE.S BIG_SET_1
- RTS
- BIG_SET_2:
- MOVE.W D2,D0
- ADD.L D1,D1
- BCC.S BIG_SET_3
- SUB.W #100H,D0
- BIG_SET_3:
- MOVE.W D0,(A2)
- SUBQ.W #1,D7
- BNE.S BIG_SET_2
- RTS
- GET_Y_VALUE:
- CLR.W ERACE_CHARA(A5)
- MOVE.W REL_Y(A6),D0
- ADD.W #100H,D0
- ADD.W D0,D1
- LSL.W #7,D1
- MOVE.W TEMP_BIG_Y(A5),D0
- BNE.S GET_Y_VALUE_1
- ADD.W D5,D1
- RTS
- GET_Y_VALUE_1:
- AND.W #0FCH,D0
- ADD.W D0,D0
- ADD.W D0,D0
- SUBQ.W #1,D0
- ADD.W D5,D0
- ADD.W D0,D0
- ADD.B ERACE_DATA(PC,D0.W),D1
- MOVE.B ERACE_DATA+1(PC,D0.W),ERACE_CHARA+1(A5)
- RTS
- ERACE_DATA:
- ;BIG_Y=00
- DC.W 0010FH,0010EH,0010DH,0010CH,0010BH,0010AH,00109H,00108H
- DC.W 00107H,00106H,00105H,00104H,00103H,00102H,00101H,00100H
- DC.W 0010FH,0010EH,0010DH,0010CH,0010BH,0010AH,00109H,00108H
- DC.W 00107H,00106H,00105H,00104H,00103H,00102H,00101H,00100H
- DC.W 0010FH,0010EH,0010DH,0010CH,0010BH,0010AH,00109H,00108H
- DC.W 00107H,00106H,00105H,00104H,00103H,00102H,00101H,00100H
- DC.W 0010FH,0010EH,0010DH,0010CH,0010BH,0010AH,00109H,00108H
- DC.W 00107H,00106H,00105H,00104H,00103H,00102H,00101H,00100H
- ;BIG_Y=10
- DC.W 0010FH,0010EH,0010DH,0010CH,0010BH,0010AH,00109H,00108H
- DC.W 00107H,00106H,00105H,00104H,00103H,00202H,00201H,00200H
- DC.W 0010CH,0010BH,0010AH,00109H,00108H,00107H,00106H,00105H
- DC.W 00104H,00103H,00102H,00204H,00203H,00202H,00201H,00200H
- DC.W 0010AH,00109H,00108H,00107H,00106H,00105H,00104H,00103H
- DC.W 00102H,00206H,00205H,00204H,00203H,00202H,00201H,00200H
- DC.W 00109H,00108H,00107H,00106H,00105H,00104H,00103H,00102H
- DC.W 00207H,00206H,00205H,00204H,00203H,00202H,00201H,00200H
- ;BIG_Y=20
- DC.W 00107H,00106H,00105H,00104H,00103H,00102H,00101H,00208H
- DC.W 00207H,00206H,00205H,00204H,00203H,00202H,00301H,00300H
- DC.W 00107H,00106H,00105H,00104H,00103H,00102H,00208H,00207H
- DC.W 00206H,00205H,00204H,00203H,00202H,00302H,00301H,00300H
- DC.W 00106H,00105H,00104H,00103H,00102H,00207H,00206H,00205H
- DC.W 00204H,00203H,00202H,00304H,00303H,00302H,00301H,00300H
- DC.W 00105H,00104H,00103H,00102H,00101H,00206H,00205H,00204H
- DC.W 00203H,00202H,00305H,00304H,00303H,00302H,00301H,00300H
- ;BIG_Y=30
- DC.W 00105H,00104H,00103H,00102H,00101H,00205H,00204H,00203H
- DC.W 00202H,00201H,00305H,00304H,00303H,00302H,00301H,00400H
- DC.W 00104H,00103H,00102H,00101H,00205H,00204H,00203H,00202H
- DC.W 00201H,00305H,00304H,00303H,00302H,00402H,00401H,00400H
- DC.W 00104H,00103H,00102H,00101H,00205H,00204H,00203H,00202H
- DC.W 00305H,00304H,00303H,00302H,00301H,00402H,00401H,00400H
- DC.W 00104H,00103H,00102H,00101H,00204H,00203H,00202H,00201H
- DC.W 00304H,00303H,00302H,00301H,00403H,00402H,00401H,00400H
- ;BIG_Y=40
- DC.W 00103H,00102H,00101H,00204H,00203H,00202H,00201H,00304H
- DC.W 00303H,00302H,00301H,00404H,00403H,00402H,00401H,00500H
- DC.W 00103H,00102H,00101H,00204H,00203H,00202H,00201H,00304H
- DC.W 00303H,00302H,00405H,00404H,00403H,00402H,00501H,00500H
- DC.W 00103H,00102H,00101H,00204H,00203H,00202H,00304H,00303H
- DC.W 00302H,00301H,00404H,00403H,00402H,00502H,00501H,00500H
- DC.W 00103H,00102H,00101H,00203H,00202H,00201H,00304H,00303H
- DC.W 00302H,00404H,00403H,00402H,00503H,00502H,00501H,00500H
- ;BIG_Y=50
- DC.W 00103H,00102H,00101H,00203H,00202H,00201H,00303H,00302H
- DC.W 00301H,00403H,00402H,00401H,00503H,00502H,00501H,00600H
- DC.W 00103H,00102H,00204H,00203H,00202H,00304H,00303H,00302H
- DC.W 00404H,00403H,00402H,00504H,00503H,00502H,00601H,00600H
- DC.W 00102H,00101H,00203H,00202H,00201H,00303H,00302H,00301H
- DC.W 00403H,00402H,00401H,00503H,00502H,00501H,00601H,00600H
- DC.W 00102H,00101H,00203H,00202H,00201H,00303H,00302H,00301H
- DC.W 00403H,00402H,00503H,00502H,00501H,00602H,00601H,00600H
- ;BIG_Y=60
- DC.W 00102H,00101H,00203H,00202H,00201H,00302H,00301H,00403H
- DC.W 00402H,00401H,00503H,00502H,00603H,00602H,00601H,00700H
- DC.W 00102H,00101H,00203H,00202H,00303H,00302H,00301H,00403H
- DC.W 00402H,00503H,00502H,00501H,00603H,00602H,00701H,00700H
- DC.W 00102H,00101H,00202H,00201H,00303H,00302H,00301H,00402H
- DC.W 00401H,00503H,00502H,00603H,00602H,00601H,00701H,00700H
- DC.W 00102H,00101H,00202H,00201H,00303H,00302H,00403H,00402H
- DC.W 00401H,00502H,00501H,00603H,00602H,00702H,00701H,00700H
- ;BIG_Y=70
- DC.W 00102H,00101H,00202H,00201H,00302H,00301H,00403H,00402H
- DC.W 00503H,00502H,00501H,00602H,00601H,00702H,00701H,00800H
- DC.W 00102H,00101H,00202H,00201H,00302H,00301H,00402H,00401H
- DC.W 00503H,00502H,00603H,00602H,00703H,00702H,00701H,00800H
- DC.W 00102H,00101H,00202H,00201H,00302H,00301H,00402H,00401H
- DC.W 00502H,00501H,00602H,00601H,00702H,00701H,00801H,00800H
- DC.W 00102H,00101H,00202H,00201H,00302H,00301H,00402H,00401H
- DC.W 00502H,00501H,00602H,00601H,00702H,00701H,00801H,00800H
- ;BIG_Y=80
- DC.W 00101H,00202H,00201H,00302H,00301H,00402H,00401H,00502H
- DC.W 00501H,00602H,00601H,00702H,00701H,00802H,00801H,00900H
- DC.W 00101H,00202H,00201H,00302H,00301H,00402H,00401H,00502H
- DC.W 00501H,00602H,00601H,00702H,00701H,00802H,00801H,00900H
- DC.W 00101H,00202H,00201H,00302H,00301H,00402H,00401H,00502H
- DC.W 00501H,00602H,00601H,00702H,00803H,00802H,00901H,00900H
- DC.W 00101H,00202H,00201H,00302H,00301H,00402H,00401H,00502H
- DC.W 00602H,00601H,00702H,00701H,00802H,00801H,00901H,00900H
- ;BIG_Y=90
- DC.W 00101H,00202H,00201H,00302H,00301H,00402H,00502H,00501H
- DC.W 00602H,00601H,00702H,00701H,00802H,00902H,00901H,00A00H
- DC.W 00101H,00202H,00201H,00302H,00301H,00401H,00502H,00501H
- DC.W 00602H,00601H,00702H,00802H,00801H,00902H,00901H,00A00H
- DC.W 00101H,00202H,00201H,00302H,00402H,00401H,00502H,00501H
- DC.W 00602H,00702H,00701H,00802H,00801H,00902H,00A01H,00A00H
- DC.W 00101H,00202H,00201H,00301H,00402H,00401H,00502H,00501H
- DC.W 00601H,00702H,00701H,00802H,00902H,00901H,00A01H,00A00H
- ;BIG_Y=A0
- DC.W 00101H,00202H,00201H,00301H,00402H,00401H,00501H,00602H
- DC.W 00601H,00702H,00802H,00801H,00902H,00901H,00A01H,00B00H
- DC.W 00101H,00202H,00201H,00301H,00402H,00401H,00501H,00602H
- DC.W 00601H,00701H,00802H,00801H,00902H,00A02H,00A01H,00B00H
- DC.W 00101H,00202H,00302H,00301H,00402H,00502H,00501H,00602H
- DC.W 00702H,00701H,00802H,00902H,00901H,00A02H,00B01H,00B00H
- DC.W 00101H,00201H,00302H,00301H,00401H,00502H,00501H,00601H
- DC.W 00702H,00701H,00801H,00902H,00901H,00A01H,00B01H,00B00H
- ;BIG_Y=B0
- DC.W 00101H,00201H,00302H,00301H,00401H,00502H,00501H,00601H
- DC.W 00702H,00701H,00801H,00902H,00A02H,00A01H,00B01H,00C00H
- DC.W 00101H,00201H,00302H,00301H,00401H,00502H,00602H,00601H
- DC.W 00701H,00802H,00801H,00901H,00A02H,00B02H,00B01H,00C00H
- DC.W 00101H,00201H,00302H,00301H,00401H,00501H,00602H,00601H
- DC.W 00701H,00802H,00902H,00901H,00A01H,00B02H,00B01H,00C00H
- DC.W 00101H,00201H,00302H,00301H,00401H,00501H,00602H,00601H
- DC.W 00701H,00801H,00902H,00901H,00A01H,00B01H,00C01H,00C00H
- ;BIG_Y=C0
- DC.W 00101H,00201H,00301H,00402H,00401H,00501H,00601H,00702H
- DC.W 00701H,00801H,00901H,00A02H,00A01H,00B01H,00C01H,00D00H
- DC.W 00101H,00201H,00301H,00402H,00401H,00501H,00601H,00702H
- DC.W 00701H,00801H,00901H,00A02H,00B02H,00B01H,00C01H,00D00H
- DC.W 00101H,00201H,00301H,00402H,00401H,00501H,00601H,00701H
- DC.W 00802H,00801H,00901H,00A01H,00B02H,00C02H,00C01H,00D00H
- DC.W 00101H,00201H,00301H,00402H,00502H,00501H,00601H,00701H
- DC.W 00802H,00902H,00901H,00A01H,00B01H,00C02H,00D01H,00D00H
- ;BIG_Y=D0
- DC.W 00101H,00201H,00301H,00401H,00502H,00501H,00601H,00701H
- DC.W 00801H,00902H,00A02H,00A01H,00B01H,00C01H,00D01H,00E00H
- DC.W 00101H,00201H,00301H,00401H,00502H,00602H,00601H,00701H
- DC.W 00801H,00901H,00A02H,00B02H,00B01H,00C01H,00D01H,00E00H
- DC.W 00101H,00201H,00301H,00401H,00501H,00602H,00601H,00701H
- DC.W 00801H,00901H,00A01H,00B02H,00C02H,00C01H,00D01H,00E00H
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00702H,00701H
- DC.W 00801H,00901H,00A01H,00B01H,00C01H,00D02H,00E01H,00E00H
- ;BIG_Y=E0
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00701H,00802H
- DC.W 00801H,00901H,00A01H,00B01H,00C01H,00D01H,00E01H,00F00H
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00701H,00801H
- DC.W 00902H,00A02H,00A01H,00B01H,00C01H,00D01H,00E01H,00F00H
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00701H,00801H
- DC.W 00901H,00A02H,00B02H,00C02H,00C01H,00D01H,00E01H,00F00H
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00701H,00801H
- DC.W 00901H,00A01H,00B01H,00C02H,00D02H,00E02H,00F01H,00F00H
- ;BIG_Y=F0
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00701H,00801H
- DC.W 00901H,00A01H,00B01H,00C01H,00D01H,00E01H,00F01H,01000H
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00701H,00801H
- DC.W 00901H,00A01H,00B01H,00C01H,00D01H,00E01H,00F01H,01000H
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00701H,00801H
- DC.W 00901H,00A01H,00B01H,00C01H,00D01H,00E01H,00F01H,01000H
- DC.W 00101H,00201H,00301H,00401H,00501H,00601H,00701H,00801H
- DC.W 00901H,00A01H,00B01H,00C01H,00D01H,00E01H,00F01H,01000H
- ORDER_COMMAND:
- MOVEQ.L #7CH,D0
- AND.B (A5),D0
- JMP ORDER_COM_VECT(PC,D0.W)
- ORDER_COM_VECT:
- JMP ORDER_END(PC) 0
- JMP CHANGE_OBJ2(PC) 1
- JMP CHANGE_OBJ3(PC) 2
- JMP CHANGE_OBJ4(PC) 3
- JMP SET_OBJ1_DB(PC) 4
- JMP CHANGE_OBJ2_DB(PC) 5
- JMP CHANGE_OBJ3_DB(PC) 6
- JMP CHANGE_OBJ4_DB(PC) 7
- ORDER_END:
- JSR OBJ_END_CLEAR(PC)
- RTS
- SET_OBJ1:
- LEA.L OBJ1_MAP(A5),A0
- MOVE.L A0,OBJ_MAP_POINT(A5)
- MOVE.L (A0),TEMP_SPRITE(A5)
- CLR.B SPG_MODE(A5)
- RTS
- CHANGE_OBJ2:
- JSR OBJ_END_CLEAR(PC)
- LEA.L OBJ2_MAP(A5),A0
- MOVE.L A0,OBJ_MAP_POINT(A5)
- MOVE.L (A0),TEMP_SPRITE(A5)
- CLR.B SPG_MODE(A5)
- JMP ACT_2(PC)
- CHANGE_OBJ3:
- JSR OBJ_END_CLEAR(PC)
- LEA.L OBJ3_MAP(A5),A0
- MOVE.L A0,OBJ_MAP_POINT(A5)
- MOVE.L (A0),TEMP_SPRITE(A5)
- CLR.B SPG_MODE(A5)
- JMP ACT_2(PC)
- CHANGE_OBJ4:
- JSR OBJ_END_CLEAR(PC)
- LEA.L OBJ4_MAP(A5),A0
- MOVE.L A0,OBJ_MAP_POINT(A5)
- MOVE.L (A0),TEMP_SPRITE(A5)
- CLR.B SPG_MODE(A5)
- JMP ACT_2(PC)
- SET_OBJ1_DB:
- LEA.L OBJ1_MAP(A5),A0
- SET_OBJ_DB:
- MOVE.L A0,OBJ_MAP_POINT(A5)
- MOVE.B #1,SPG_MODE(A5)
- JSR DB_START(PC)
- JMP ACTDB_1(PC)
- CHANGE_OBJ2_DB:
- JSR OBJ_END_CLEAR(PC)
- LEA.L OBJ2_MAP(A5),A0
- JMP SET_OBJ_DB(PC)
- CHANGE_OBJ3_DB:
- JSR OBJ_END_CLEAR(PC)
- LEA.L OBJ3_MAP(A5),A0
- JMP SET_OBJ_DB(PC)
- CHANGE_OBJ4_DB:
- JSR OBJ_END_CLEAR(PC)
- LEA.L OBJ4_MAP(A5),A0
- JMP SET_OBJ_DB(PC)
- DB_START:
- LEA.L VPOS_BUFFER(A5),A4
- MOVE.W OBJ_START(A0),D0
- ADD.W D0,D0
- LEA.L 0(A4,D0.W),A4
- MOVE.W OBJ_SIZE(A0),D7
- MOVE.L #40404040H,D0
- DB_START_1:
- MOVE.L D0,(A4)+
- SUBQ.W #1,D7
- BNE.S DB_START_1
- LEA.L VPOS_BUFFER(A5),A4
- MOVE.L OBJ_START(A0),D7
- MOVE.L D7,TEMP_SPRITE(A5)
- MOVE.W D7,D0
- ADD.L D7,D7
- SWAP D7
- LEA.L 0(A4,D7.W),A4
- SWAP D7
- BTST.B #0,TEMP_SPG(A5)
- BNE.S DB_START_2
- CLR.W 0(A4,D7.W)
- RTS
- DB_START_2:
- CLR.W (A4)
- LEA.L 0(A4,D7.W),A4
- ADD.W D0,TEMP_SPRITE(A5)
- RTS
- OBJ_END_CLEAR
- MOVE.W #1,2(A2)
- MOVE.L OBJ_MAP_POINT(A5),A0
- MOVEQ.L #0,D2
- TST.B SPG_MODE(A5)
- BNE DB_END
- MOVE.W TEMP_SPRITE(A5),D1
- MOVE.W D1,D0
- ADD.W #SP_V,D1
- MOVE.W D1,-2(A2)
- SUB.W OBJ_START(A0),D0
- MOVE.W OBJ_USE(A0),D7
- MOVE.W D0,OBJ_USE(A0)
- SUB.W D0,D7
- BRA.S OBJ_END_CL_2
- OBJ_END_CL_1:
- MOVE.W D2,(A2)
- SUBQ.W #1,D7
- OBJ_END_CL_2:
- BHI.S OBJ_END_CL_1
- RTS
- DB_END:
- CLR.W (A4)
- RTS
- DB_SEND:
- MOVE.W #1,2(A2)
- MOVEQ.L #0,D2
- LEA.L OBJ1_MAP(A5),A0
- BSR DB_SEND_1
- LEA.L OBJ2_MAP(A5),A0
- BSR DB_SEND_1
- LEA.L OBJ3_MAP(A5),A0
- BSR DB_SEND_1
- LEA.L OBJ4_MAP(A5),A0
- DB_SEND_1:
- TST.W DB_TYPE(A0)
- BEQ DB_SEND_4
- BMI NON_USE_CLEAR
- DB_SEND_2:
- LEA.L VPOS_BUFFER(A5),A4
- MOVE.W OBJ_START(A0),D0
- MOVE.W D0,D1
- ADD.W #SP_V,D1
- MOVE.W D1,-2(A2)
- ADD.W D0,D0
- LEA.L 0(A4,D0.W),A4
- MOVE.W OBJ_SIZE(A0),D7
- DB_SEND_3:
- MOVE.W (A4)+,(A2)
- MOVE.W (A4)+,(A2)
- SUBQ.W #1,D7
- BNE.S DB_SEND_3
- DB_SEND_4:
- RTS
- NON_USE_CLEAR:
- MOVE.W OBJ_START(A0),D0
- ADD.W #SP_V,D0
- MOVE.W D0,-2(A2)
- MOVE.W OBJ_SIZE(A0),D7
- BRA.S NUC_2
- NUC_1:
- MOVE.W D2,(A2)
- SUBQ.W #1,D7
- NUC_2:
- BNE.S NUC_1
- CLR.W DB_TYPE(A0)
- RTS
- OFFSET_COMMAND:
- AND.W #0FCH,D4
- JMP OFFSET_COM_VECT(PC,D4.W)
- OFFSET_COM_VECT:
- JMP DATA_END(PC) 0 data end,next work
- JMP CHGSUB(PC) 1 change subwork
- JMP RET_MASTER(PC) 2 return master work
- JMP BLINK(PC) 3 blink
- JMP SUB0(PC) 4 subwork0 table
- JMP SUB1(PC) 5 subwork1 table
- JMP SUB2(PC) 6 subwork2 table
- JMP SUB3(PC) 7 subwork3 table
- JMP GOSUB(PC) 8 gosub
- JMP SUBSUB(PC) 9 gosub with subwork
- JMP RET(PC) A sub return
- JMP SUBRET(PC) B sub return with subwork
- JMP SKIP_W(PC) C skip data for main prog
- JMP SKIP_L(PC) D skip data for main prog
- JMP SUB_OFF(PC) E on/off by subwork
- JMP PAL_COM_OFF(PC) F palette command off
- JMP SUBP0(PC) 10 subwork0 parts table
- JMP SUBP1(PC) 10 subwork1 parts table
- JMP SUBP2(PC) 10 subwork2 parts table
- JMP SUBP3(PC) 10 subwork3 parts table
- DATA_END:
- MOVE.L MASTER_PWORK(A5),A6
- BCLR.B #ACTAT_SET,ACT_ATTR(A6)
- MOVEQ.L #1,D0
- RTS
- CHGSUB:
- MOVEQ.L #00000011B,D0
- AND.W CONV_MARK(A5),D0
- MOVE.B WORK_N0(A6,D0.W),(A5)
- MOVE.W (A5),D0
- LEA.L 0(A5,D0.W),A6
- SUBQ.W #2,A0
- MOVEQ.L #0,D0
- RTS
- RET_MASTER:
- MOVE.L MASTER_PWORK(A5),A6
- SUBQ.W #2,A0
- MOVEQ.L #0,D0
- RTS
- SUB_OFF:
- SUBQ.W #2,A0
- MOVEQ.L #00000011B,D0
- AND.W CONV_MARK(A5),D0
- MOVE.B WORK_N0(A6,D0.W),(A5)
- MOVE.W (A5),D0
- TST.B ACT_TYPE(A5,D0.W)
- BNE.S SUB_OFF_ON
- ADDQ.W #4,A0
- SUB_OFF_ON:
- MOVEQ.L #0,D0
- RTS
- BLINK:
- MOVE.B ACT_TYPE(A6),D0
- BMI.S BLINK_OFF
- ADD.B INT1_COUNT+3(A5),D0
- BTST.L #0,D0
- BEQ.S BLINK_OFF
- SUBQ.W #2,A0
- BLINK_ON:
- MOVEQ.L #0,D0
- RTS
- BLINK_OFF:
- TST.B SPG_MODE(A5)
- BEQ.S SINGLE_BLINK
- ADDQ.W #2,A0
- MOVEQ.L #0,D0
- RTS
- SINGLE_BLINK:
- SUBQ.W #2,A0
- TST.B ACT_ATTR(A6)
- BMI.S BLINK_ON
- MOVE.L (A0)+,CONV_MARK(A5)
- MOVE.W CONV_MARK(A5),D4
- JSR GET_CONV_TYPE(PC) conversion parameter set
- SUB.W D6,MAX_SPRITE(A5)
- MOVE.W TEMP_SPRITE(A5),D4
- ADD.W #SP_V,D4
- MOVE.W D4,-2(A2)
- ADD.W D6,TEMP_SPRITE(A5)
- MOVEQ.L #0,D0
- MOVE.W D0,(A2)
- RTS
- SUBP0:
- MOVEP.W WORK_N0(A6),D1
- JMP SUBP_TBL(PC)
- SUBP1:
- MOVEP.W WORK_N1(A6),D1
- JMP SUBP_TBL(PC)
- SUBP2:
- MOVEP.W WORK_N2(A6),D1
- JMP SUBP_TBL(PC)
- SUBP3:
- MOVEP.W WORK_N3(A6),D1
- SUBP_TBL:
- CLR.B D1
- LEA.L (A0),A1
- MOVEQ.L #00111111B,D0
- AND.B CONV_MARK(A5),D0
- CMP.B ACT_No(A5,D1.W),D0
- BHI.S SUBP_TBL_1
- CLR.B ACT_No(A5,D1.W)
- SUBP_TBL_1:
- ADD.W D0,D0
- ADD.W D0,D0
- LEA.L 0(A0,D0.W),A0
- MOVE.B ACT_No(A5,D1.W),D0
- MOVE.W CONV_MARK+2(A5),D2
- ADD.W D2,ACT_No(A5,D1.W)
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.L 0(A1,D0.W),CONV_MARK(A5)
- MOVE.W CONV_MARK(A5),D4
- MOVEQ.L #-1,D0
- RTS
- SUB0:
- MOVE.B WORK_N0(A6),(A5)
- JMP SUB_TBL(PC)
- SUB1:
- MOVE.B WORK_N1(A6),(A5)
- JMP SUB_TBL(PC)
- SUB2:
- MOVE.B WORK_N2(A6),(A5)
- JMP SUB_TBL(PC)
- SUB3:
- MOVE.B WORK_N3(A6),(A5)
- SUB_TBL:
- SUBQ.W #2,A0
- LEA.L (A0),A1
- MOVEQ.L #00000011B,D0
- AND.W CONV_MARK(A5),D0
- ADD.W D0,D0
- ADD.W D0,D0
- LEA.L 4(A0,D0.W),A0
- MOVE.W (A5),D0
- MOVE.W ACT_No(A5,D0.W),D0
- BMI.S SUB_TBL_OFF
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.L 0(A1,D0.W),CONV_MARK(A5)
- MOVE.W CONV_MARK(A5),D4
- MOVEQ.L #-1,D0
- RTS
- SUB_TBL_OFF:
- MOVEQ.L #0,D0
- RTS
- SUBSUB:
- MOVEQ.L #00000011B,D0
- AND.W CONV_MARK(A5),D0
- MOVE.B WORK_N0(A6,D0.W),(A5)
- MOVE.W (A5),D0
- LEA.L 0(A5,D0.W),A6
- GOSUB:
- MOVE.L A0,ACTION_STACK(A5)
- ADD.W CONV_MARK+2(A5),A0
- MOVEQ.L #0,D0
- RTS
- SUBRET:
- MOVE.L MASTER_PWORK(A5),A6
- RET:
- MOVE.L ACTION_STACK(A5),A0
- MOVEQ.L #0,D0
- RTS
- SKIP_L:
- ADDQ.W #2,A0
- SKIP_W:
- MOVEQ.L #0,D0
- RTS
- PAL_COM_OFF:
- SUBQ.W #2,A0
- MOVEQ.L #0,D0
- MOVE.W D0,TEMP_PAL_COM(A5)
- RTS
- ;
- ;
- ; *** ACTION PROGRAM IN MAIN ROUTINE ***
- ;
- ;
- MAIN_ACTION:
- ; logical action
- ; in) A6=phygical work address
- JSR NEXT_ACTION(PC)
- JSR HIT_AREA_SET(PC)
- JSR SORT_SET(PC)
- RTS
- NEXT_ACTION:
- ; action time count
- MOVEQ.L #0,D0
- MOVE.W ACT_No(A6),D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.L CH_TABLE,A0
- MOVE.L 0(A0,D0.L),(A5)
- MOVE.B ACT_DEC(A6),D0
- BMI NEXT_ACTION_9 action stop
- SUB.B D0,ACT_TIMER(A6)
- BGT NEXT_ACTION_9
- ADDQ.B #1,ACT_COUNT(A6)
- BSET.B #ACTAT_SET,ACT_ATTR(A6)
- NEXT_ACTION_1:
- MOVEQ.L #0,D0
- MOVE.B ACT_COUNT(A6),D0
- CMP.B (A5),D0
- BLO.S NEXT_ACTION_2
- MOVEQ.L #0,D0
- MOVE.B D0,ACT_COUNT(A6)
- NEXT_ACTION_2:
- CLR.B (A5)
- MOVE.L (A5),A0
- ADD.W D0,D0
- ADD.W D0,D0
- LEA.L 0(A0,D0.W),A0
- MOVE.B (A0)+,ACT_TIMER(A6)
- BNE.S NEXT_ACTION_3
- BSET.B #7,ACT_DEC(A6)
- NEXT_ACTION_3:
- CLR.L (A5)
- MOVE.B (A0)+,ACT_FLAG(A6)
- MOVE.W (A0),D0
- MOVE.W D0,D1
- AND.W #7FFH,D0
- ADD.W D0,A0
- ADD.W D1,D1
- BCC.S NEXT_ACTION_4
- MOVE.L (A0)+,HIT_OFS_X(A6)
- NEXT_ACTION_4:
- ADD.W D1,D1
- BCC.S NEXT_ACTION_5
- MOVEP.W WORK_N0(A6),D0
- CLR.B D0
- MOVE.L (A0)+,HIT_OFS_X(A5,D0.W)
- NEXT_ACTION_5:
- ADD.W D1,D1
- BCC.S NEXT_ACTION_6
- MOVEP.W WORK_N1(A6),D0
- CLR.B D0
- MOVE.L (A0)+,HIT_OFS_X(A5,D0.W)
- NEXT_ACTION_6:
- ADD.W D1,D1
- BCC.S NEXT_ACTION_7
- MOVEP.W WORK_N2(A6),D0
- CLR.B D0
- MOVE.L (A0)+,HIT_OFS_X(A5,D0.W)
- NEXT_ACTION_7:
- ADD.W D1,D1
- BCC.S NEXT_ACTION_8
- MOVEP.W WORK_N3(A6),D0
- CLR.B D0
- MOVE.L (A0)+,HIT_OFS_X(A5,D0.W)
- NEXT_ACTION_8:
- CMP.B #11000000B,(A0)
- BLO.S NEXT_ACTION_10
- MOVE.W (A0)+,D0
- AND.W #0FCH,D0
- JSR MCOMMAND_TBL(PC,D0.W)
- BRA.S NEXT_ACTION_8
- NEXT_ACTION_10:
- MOVE.L A0,ACT_ADRS(A6)
- BSET.B #ACTAT_SET,ACT_ATTR(A6)
- NEXT_ACTION_9:
- CLR.L (A5)
- RTS
- MCOMMAND_TBL:
- JMP SOUND_CALL(PC)
- JMP SPHERO_CALL(PC)
- JMP H_REV_CHG(PC)
- JMP ACTAT_CHG(PC)
- JMP BIG_CHG(PC)
- JMP USER_PROG(PC)
- JMP INNER_LOOP(PC)
- SOUND_CALL:
- MOVE.W (A0)+,D0
- JMP SET_SOUND(PC)
- SPHERO_CALL:
- MOVE.W (A0)+,D0
- MOVE.L A0,-(SP)
- LEA.L (A6),A0
- JSR SET_SPHERO(PC)
- MOVE.L (SP)+,A0
- RTS
- H_REV_CHG:
- BCHG.B #ACTAT_FLIP,ACT_ATTR(A6)
- RTS
- ACTAT_CHG:
- MOVE.B (A0)+,D0
- AND.B D0,ACT_ATTR(A6)
- MOVE.B (A0)+,D0
- OR.B D0,ACT_ATTR(A6)
- RTS
- BIG_CHG:
- MOVE.W (A0)+,BIG_X(A6)
- RTS
- USER_PROG:
- LEA.L USER_ACT,A1
- MOVEQ.L #03FH,D0
- AND.B -2(A0),D0
- ADD.W D0,D0
- ADD.W D0,D0
- MOVE.L 0(A1,D0.W),A1
- JMP (A1)
- INNER_LOOP:
- MOVEQ.L #00111111B,D0
- AND.B -2(A0),D0
- SUBQ.B #1,D0
- MOVE.B D0,ACT_COUNT(A6)
- RTS
- HIT_AREA_SET:
- ; hit area calucurate
- JSR GET_HIT_X(PC)
- JSR GET_HIT_Y(PC)
- ADD.W Y_POSITION(A6),D3
- MOVE.W D3,HIT_UPPER(A6)
- SUB.W D4,D3
- MOVE.W D3,HIT_LOWER(A6)
- BTST.B #ACTAT_FLIP,ACT_ATTR(A6)
- BNE.S HIT_AREA_SET_2
- ADD.W X_POSITION(A6),D1
- MOVE.W D1,HIT_LEFT(A6)
- ADD.W D2,D1
- MOVE.W D1,HIT_RIGHT(A6)
- RTS
- HIT_AREA_SET_2:
- NEG.W D1
- ADD.W X_POSITION(A6),D1
- MOVE.W D1,HIT_RIGHT(A6)
- SUB.W D2,D1
- MOVE.W D1,HIT_LEFT(A6)
- RTS
- GET_HIT_X:
- MOVE.B HIT_OFS_X(A6),D1
- MOVE.B HIT_SIZE_X(A6),D2
- EXT.W D1
- EXT.W D2
- ADD.W D1,D1
- ADD.W D2,D2
- MOVEQ.L #1,D0
- ADD.B BIG_X(A6),D0
- BEQ.S GET_HIT_X_1
- MULS.W D0,D1
- ASR.L #8,D1
- MULS.W D0,D2
- ASR.L #8,D2
- GET_HIT_X_1:
- RTS
- GET_HIT_Y:
- MOVE.B HIT_OFS_Y(A6),D3
- MOVE.B HIT_SIZE_Y(A6),D4
- EXT.W D3
- EXT.W D4
- ADD.W D3,D3
- ADD.W D4,D4
- MOVEQ.L #1,D0
- ADD.B BIG_Y(A6),D0
- BEQ.S GET_HIT_Y_1
- MULS.W D0,D3
- ASR.L #8,D3
- MULS.W D0,D4
- ASR.L #8,D4
- GET_HIT_Y_1:
- RTS
- ACTION_SET:
- ; new action set
- ; in) D0=action No
- MOVE.W D0,ACT_No(A6)
- MOVE.B #-1,ACT_TIMER(A6)
- MOVE.B #-1,ACT_COUNT(A6)
- BCLR.B #7,ACT_DEC(A6)
- RTS
- ACT_COUNT_SET:
- ; action count direct set
- ; in) D0=act count
- SUBQ.B #1,D0
- MOVE.B D0,ACT_COUNT(A6)
- MOVE.B #-1,ACT_TIMER(A6)
- MOVE.B #1,ACT_DEC(A6)
- RTS
- GET_REL_POS:
- ; relocate position calucurate
- MOVE.W X_POSITION(A6),D0
- SUB.W WINDOW_X(A5),D0
- MOVE.W D0,REL_X(A6)
- MOVE.W Y_POSITION(A6),D0
- ADD.W Z_POSITION(A6),D0
- SUB.W WINDOW_Y(A5),D0
- MOVE.W D0,REL_Y(A6)
- RTS
- INIT_SORT:
- ; SORT_WORK all clear (FF)
- ; use) D0-D7(.l)=0FFFFFFFFH
- ; A0
- LEA.L SORT_WORK+100H(A5),A0
- MOVEQ.L #-1,D0
- MOVE.L D0,D1
- MOVE.L D0,D2
- MOVE.L D0,D3
- MOVE.L D0,D4
- MOVE.L D0,D5
- MOVE.L D0,D6
- MOVE.L D0,D7
- REPT 8
- MOVEM.L D0-D7,-(A0)
- ENDR
- RTS
- SORT_SET:
- ; sorting by priority
- LEA.L SORT_WORK(A5),A1
- MOVEQ.L #0,D0
- MOVE.B PRIORITY(A6),D0
- MOVE.B 0(A1,D0.W),SORT_CHILD(A6)
- MOVE.B WORK_No(A6),0(A1,D0.W)
- RTS
- ORDER_SET:
- MOVE.L OBJ_DIV_POINT(A5),A2
- LEA.L ORDER_BUFFER(A5),A3
- MOVEQ.L #96,D7
- MOVEQ.L #0,D6
- MOVEQ.L #0,D5
- LEA.L SORT_WORK(A5),A1
- MOVE.W D5,(A5)
- TST.B TEMP_ORDER(A5)
- BNE.S ORDER_SET_1
- LEA.L 128(A3),A3
- ORDER_SET_1:
- CMP.W (A2),D6
- BNE.S ORDER_SET_2
- MOVE.B 3(A2),(A3)+
- ADDQ.W #4,A2
- ORDER_SET_2:
- MOVE.B (A1)+,D0
- BMI ORDER_SET_4
- ORDER_SET_3:
- MOVE.B D0,(A3)+
- MOVE.B D0,(A5)
- MOVE.W (A5),D0
- BCLR.B #ACTAT_OFF,ACT_ATTR(A5,D0.W)
- SUBQ.W #1,D7
- BEQ.S ORDER_SET_5
- MOVE.B SORT_CHILD(A5,D0.W),D0
- BPL.S ORDER_SET_3
- ORDER_SET_4:
- ADDQ.B #1,D6
- BNE ORDER_SET_1
- ORDER_SET_5:
- MOVE.B #80H,(A3)
- EOR.B #1,TEMP_ORDER(A5)
- RTS
- INCLUDE WORK.INC
|