Jump to content
Mike Harris

working out the bugs

Recommended Posts

My current project is in the final stages of part one.

Getting the bugs out, testing on real equipment.

 

I just added 30 new rooms and am still under 14k.

 

Can someone with expertise share some code that explain how someone like MR. Do can walk between patterns without going through them.

 

If he digs a hole then how does coleco know because one is a sprite and one is a background.

 

Currently I have a sprite defined as a 4x4 cube to be updated later and this is the code Tony from Electric Adventures was kind enough to shar with me.

 

 

MAP_TO_SPRITE:
LD HL, VRAM_NAME
LD A,(SPRTBL)
CP 0
JP Z, SKIP ; if we are zero
SRL A ; divide by 2 three times i.e. divide by 8 will give us our row
SRL A
SRL A
LD B,A ; save it to a loop count
LD DE,32
XOR A
LOOP:
ADC HL,DE
DJNZ LOOP
SKIP:
LD A,(SPRTBL+1)
CP 0
JP Z,SKIP2
SRL A ; divide by 2 three times i.e. divide by 8 will give us our column
SRL A
SRL A
LD E,A
LD D,0
XOR A
ADC HL,DE

SKIP2:

 

CALL SETRD
IN A,(DATA_PORT)
RET

 

It does the job well but there are a couple of areas were it just does not catch the code like at the very edge and it allows the sprite to move through at certain corners.

 

I did not want to keep bugging him especially when he has a video series he's working on.

Edited by Mike Harris

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...