Memory Full

Forum / Development

Shrinkler

trixter * 10 Dec 2019 18:55:00 * Modified at 18:56:47

Roudoudou's article on Shrinkler was incredibly helpful! I'm porting Shrinkler from 68000, and this info is going to help me optimize the port.

(forum mods: This was meant to be a comment on the article, but I seem to have created a forum post instead (!) so please remove if inappropriate.)

roudoudou * 08 Jan 2020 09:07:58

which CPU is your target? 6502?

Hicks * 09 Feb 2020 21:17:40 * Modified at 21:18:43

Roudoudou's tips to save 1 byte on Gonzague decrunching routine!

Replace:

          XOR  A        ; start by LSB
init
          DEC  H
iniloop   LD   (HL),A
	  INC  L
	  JR   NZ,iniloop ; fill #100 row
          XOR  #80
          DJNZ init
          EX   AF,AF'    ; A'= either 0 or #80, nevermind
          LD   DE,#01   ; d3


By:

          XOR  A        ; start by LSB
          LD D,A
init
          DEC  H
iniloop   LD   (HL),A
	  INC  L
	  JR   NZ,iniloop ; fill #100 row
          XOR  #80
          LD E,B
          DJNZ init
          EX   AF,AF'    ; A'= either 0 or #80, nevermind
; supprimé          LD   DE,#01   ; d3

toms * 09 Feb 2020 21:43:50

Thank you for the tip, it will be very useful!