Resource centre for ZX Spectrum games
      using Manic Miner and Jet Set Willy game engines

 

Archive of the

Manic Miner & Jet Set Willy Yahoo! Group

messages

 

 

 

Message: 7061

Author: J.G.Harston

Date: 18/02/2017

Subject: Graphics blocks bug

 

I don't know if anybody has posted a fix for the graphics blocks bug
before, but while doing some editing the other day I ended up typing up
the following. (See also http://mdfs.net/Software/JSW/JGH/Docs/Blocks)

Original code: Change to:
L8D4B: LD C,&00 L8D4B: 1E 00 LD E,&00 ;
Start at screen address 0
L8D4D: LD E,C L8D4D: DD 7E 00 LD A,(IX+0) ;
Get current attribute
LD A,(IX+&00) 21 97 80 LD HL,BACKGROUND-9 ;
Start at the background attribute
LD HL,BACKGROUND 01 09 00 LD BC,9 ;
Nine bytes per block
LD BC,&0036 L8D56: 09 ADD HL,BC ;
Step to next block
CPIR BE CP (HL) ;
Does attribute byte match?
LD C,E 20 FB JR NZ,L8D56 ;
Check next block
LD B,&08 ;
Eight pixel-lines
L8D5C: LD D,&00 ;
High byte of screen bitmap address
L8D5E: LD A,(HL) ;
Get a character byte
LD (DE),A ;
Store into screen buffer
INC HL ;
Move to next byte
INC D ;
Move to next pixel-line
DJNZ L8D5E ;
Loop for eight pixel-lines
INC IX ;
Move to next attribute
INC C L8D66: 1C INC E ;
Move to next screen address
JP NZ,L8D4D ;
Loop for 256 attributes
RET

The following hex patchfile will apply this fix:

:0F8D4B001E00DD7E0021978001090009BE20FB7C
:018D66001CF0
:0000000000


--
J.G.Harston - jgh@... - mdfs.net/jgh

 

 

arrowleft
arrowright