6Fermer8
VasiliyFamiliyaLe 09/02/2024 à 05:45
blastar (./6):I don't know which compiler you are using, but BLT shouldn't really work like this!?

I mean the 6dxxh opcode. MAME debugger decyphering it as BLT, and its behaviour is according (by the way, in my case it's turned out to be, that offset must be 4, not 2). Assembler I use is Bruce Tomlin's ASMX (the part of BasiEgaXorz responsible for final stage of program build). In a result, the new code looks that:
move.w #$888, D0 ; D0 contains the whole colour code move.w D0, D1 move.w D0, D2 andi.w #$f, D0 ; getting R component andi.w #$f0, D1 asr.w #4, D1 ; G andi.w #$f00, D2 asr.w #8, D2 ; B asl.b #1, D0 asl.b #1, D1 asl.b #1, D2 cmpi.b #$10, D0 dc.w $6d04 addi.b #1, D0 cmpi.b #$10, D1 dc.w $6d04 addi.b #1, D1 cmpi.b #$10, D2 dc.w $6d04 addi.b #1, D2
I doubt it's able to overload the M68k - the conversion operation are planning to be applied only once, during the palette data loading from rom. The original game all the same uses a work RAM as intermediary storage for palettes, and exactly from there the data gets send to palette ram in the screen refresh subroutine after interrupts.