Jump to content
IGNORED

Two Bruce Lee sequels


Philsan

Recommended Posts

Thanks Ute.

 

Back to the playfield. So why go wide then ? If he's just padding the edges with black characters to hide the wide aspect, I mean, why bother ? Why not just go with a normal playfield width ? Just for the aesthetic of having a larger, black screen ?

  • Like 1
Link to comment
Share on other sites

 

 

You're right, I missed that hidden code when I decoded data.

 

L3E3E ldx #$05
L3E40 lda $CFFA,X
cmp $FFFA,X
bne L3E62
dex
L3E49 bpl L3E40
ldx #$14
L3E4D lda MapDataLo,X
sta $13
lda MapDataHi,X
L3E55 sta $14
dec $14
ldy #$FF
lda #$7F
sta ($13),Y
dex
bne L3E4D
L3E62 rts
Like you, I thing that this is some king of protection that corrupts the maps in certain circumstances , eg a special cartridge connected?
DecodeMap : The lines of the maps are 40 bytes long, but the display is in antic mode 'Wide playfield' (48 bytes per lines), so eight $86 (4 left, 4 right) are inserted for each line during the decoding. Why $86? I don't know...
Lamp table: Look at L2AC2:
L2AC2: dey
dey
dey
lda #$00
sta (DSKFMS+1),Y ;And store 0, for a removed lamp
rts

 

 

How do you get pasted in code to stay in alignment like that ? When I Ctrl-V it gets all skewed.

Link to comment
Share on other sites

Thanks Ute.

 

Back to the playfield. So why go wide then ? If he's just padding the edges with black characters to hide the wide aspect, I mean, why bother ? Why not just go with a normal playfield width ? Just for the aesthetic of having a larger, black screen ?

He couldn't go for 40Bytes wide because then he wouldn't have the sides in black but in other colour.

I'm not on the computer now but think that BAK register 712 (00) for example on the outside screens is sky blue/DLIs/grays across the screen and would be what you'll see on the sides.

He had to use black as PF3 (11) because he need to use it for the ninja (the 4Missiles in 5th Player mode takes PF3 colour).

  • Like 1
Link to comment
Share on other sites

He couldn't go for 40Bytes wide because then he wouldn't have the sides in black but in other colour.

I'm not on the computer now but think that BAK register 712 (00) for example on the outside screens is sky blue/DLIs/grays across the screen and would be what you'll see on the sides.

He had to use black as PF3 (11) because he need to use it for the ninja (the 4Missiles in 5th Player mode takes PF3 colour).

 

Ok, so that makes sense then. He wants a nice display, so he forces wide mode so he can black the border. It's $86 because he needs a solid PF3 coloured char because he's blacking PF3 for the ninja. Good stuff, thanks.

  • Like 1
Link to comment
Share on other sites

 

How do you get pasted in code to stay in alignment like that ? When I Ctrl-V it gets all skewed.

 

I use the Courier New font.

 

 

Ok, so that makes sense then. He wants a nice display, so he forces wide mode so he can black the border. It's $86 because he needs a solid PF3 coloured char because he's blacking PF3 for the ninja. Good stuff, thanks.

 

If you look in the tables of colors, you'll see that COLPF3 is 0, that is black...

 

MapColor0:
; COLBK COLPF3 COLPF2 COLPF1 COLPF0
.byte $04 ,$00 ,$06 ,$88 ,$0E
.byte $04 ,$00 ,$0A ,$0E ,$34
.byte $06 ,$00 ,$0A ,$0E ,$34
.byte $04 ,$00 ,$0A ,$0E ,$34
MapColor1:
; COLBK COLPF3 COLPF2 COLPF1 COLPF0
.byte $84 ,$00 ,$70 ,$0E ,$60
MapColor2:
; COLBK COLPF3 COLPF2 COLPF1 COLPF0
.byte $34 ,$00 ,$32 ,$0E ,$40
MapColor3:
; COLBK COLPF3 COLPF2 COLPF1 COLPF0
.byte $74 ,$00 ,$0E ,$04 ,$88
.byte $08 ,$00 ,$0E ,$04 ,$88
.byte $08 ,$00 ,$2C ,$04 ,$88
  • Like 1
Link to comment
Share on other sites

$86 is for sure a full black (PF3) char. That's the reason why 4 at each side so that playing area is 40Bytes wide.

It 'fools' people with black on the sides and the only way he got that aren't BAK but indeed PF3 colour register.

 

Thanks José, I learned something!

  • Like 1
Link to comment
Share on other sites

Ok, back to the stupid lamps. There's some trickery going on that I haven't quite got yet. CopyPlayersLamps swaps the lamps table with the player copy at $036A. Grabbing the lamp puts the zero in the lamps table, but swapping with the original player copy would put the $01 back in. So there must be a specific sequence to calling CopyPlayersLamps. Assuming zero page starts as zero, calling CPL before InitLamps would swap the player $00 for the table $01. Then calling InitLamps would correctly insert the lamp characters for the map. So there's some rules around calling order for dealing with the lamps looks like.

 

Edit: not zero page, low memory like at $036A.

Edited by Alfred
Link to comment
Share on other sites

Some days I'm just slow. It just dawned on me why the maps lamp code is backwards. I bet, and fantomas or somebody can check: The room maps are drawn with the lamps -ALREADY- in place. That's why we don't draw them when we draw the map, they are already there. Although that just leaves, why does it draw the lamps at all, if the lamp table is zero.

 

Edit: Just had the thought. If it's zero means it's gone from the map, so something about redrawing the map and having to put the lamps back. Death maybe ? dunno.

 

Edit2: Initlamps isn't drawing the lamps, it's removing them. if the lamps table is zero we need to blank it from the base map. Whew, solved, finally.

Edited by Alfred
Link to comment
Share on other sites

Here you go guys..The Return of Fury Maps from Dmx...

 

Have fun...

 

 

Anyway, I've attached the ROF maps, they should be good to open in Tiled.

I usually just used the same set of colours, then tweaked the final colours in the source. All the map "modding" as lamps are collected is done in code, so that's something for the coders.
Best regards,
dmx

Return of Fury Maps.zip

Edited by Mclaneinc
  • Like 5
Link to comment
Share on other sites

I would be nice to create few levels.

Must we edit directly in the source code ?

or eventually there will be an editor ?

 

I expect we'd need a map editor, no way anyone is doing it in code. I wouldn't have any idea how to go about it with these double height characters. Draw the maps as a GTIA double line screen, and then scan it into tiles, and the make a character set from that ? I wonder how Kelly Day did it back then.

 

 

Here you go guys..The Return of Fury Maps from Dmx...

 

Have fun...

 

 

Well that should help a lot, thanks. I was thinking maybe we should ask dmx but I wasn't sure if his maps were too different for the C64.

Link to comment
Share on other sites

Here you go guys..The Return of Fury Maps from Dmx...

 

Have fun...

 

 

Thanks to Dmx!

 

A few hints for map makers:

1/ Graphics
Antic mode 5
Up to 3 DLI per map, changing COLBK COLPF2 COLPF1 COLPF0
COLPF3 stays black because of the Ninja.

2/ How actors interact with map

A/ By colors
Thanks to collision detection registers, Bruce Lee can not cross the walls. The black PF3 color stops the actors.
I suppose this is the same for the floor? Have to verify.
B/ By contents
If actor hits certain tiles, things happen.
For example, characters 0x82,0x83,0x84 and 0x85 allow actor to exit the map.
post-40786-0-82364600-1552933484_thumb.png
post-40786-0-73153900-1552934513_thumb.png
  • Like 6
Link to comment
Share on other sites

Well the maps look nice, but I guess I'm not clear on how you get the tiles out of the png file and into something like an Atascii character set. Need a graphics guy here I guess.

I download the named blue (outside game screens) into Paint and resized it to 50% y coordinates then because now is single scanline I could sucessfully drop it to G2F. It has 126chars 1charset that is good for us.

What you must care is that black should be (11) PF3 and the other (11) PF2 is the purple (stairs) but these two are already this way on C64 from the very begining original game that makes sense because it was ported from A8.

So it's own colour per char/C64 colourmap purple and black should be ours PF2 & PF3.

The blues and white matches ours colbak, colpf0 and colpf1 (00), (01) and (10).

Single or double scanline is the same data because the computer knows and displays 1 or 2scanlines when you choose Antic4 or 5.

I'll try to post and get you chars tomorrow though in half single scanline mode.

:thumbsup:

Edited by José Pereira
  • Like 1
Link to comment
Share on other sites

Ok, back to the stupid lamps. There's some trickery going on that I haven't quite got yet. CopyPlayersLamps swaps the lamps table with the player copy at $036A. Grabbing the lamp puts the zero in the lamps table, but swapping with the original player copy would put the $01 back in. So there must be a specific sequence to calling CopyPlayersLamps. Assuming zero page starts as zero, calling CPL before InitLamps would swap the player $00 for the table $01. Then calling InitLamps would correctly insert the lamp characters for the map. So there's some rules around calling order for dealing with the lamps looks like.

 

Edit: not zero page, low memory like at $036A.

The maps are stored with the lamps already drawn. First attachment - Code on the left is uncompressed level, code on right is screen dump from altirra with no lamps gather. Screens are identical.

 

Second attachment - Code on left is still the uncompressed level, screen on the right is after collecting 5 of 6 lamps.

 

So I think you're exactly right, RLE screens are stored with lamps already drawn.

 

Edit: Forgot to attach files.

post-40949-0-89402500-1552939772_thumb.png

post-40949-0-39139000-1552939780_thumb.png

Edited by Ute
  • Like 2
Link to comment
Share on other sites

Thanks to Dmx!

 

A few hints for map makers:

 

1/ Graphics

 

Antic mode 5

Up to 3 DLI per map, changing COLBK COLPF2 COLPF1 COLPF0

COLPF3 stays black because of the Ninja.

 

2/ How actors interact with map

 

 

A/ By colors

 

Thanks to collision detection registers, Bruce Lee can not cross the walls. The black PF3 color stops the actors.

I suppose this is the same for the floor? Have to verify.

 

 

B/ By contents

 

If actor hits certain tiles, things happen.

 

For example, characters 0x82,0x83,0x84 and 0x85 allow actor to exit the map.

 

attachicon.gifmap8.png

 

attachicon.gifmap0.png

That’s pretty slick superimposing the character values over the picture.

Link to comment
Share on other sites

I would be nice to create few levels.

Must we edit directly in the source code ?

or eventually there will be an editor ?

 

I'm working on a level editor right now. I'm about 2/3 done. I can decompress files just fine, my re-encoder is off a few bytes - just need to tweak it to get it running.

 

My ideas for the editor: Load in our version of the game. Un-compress all levels. Have a drop down to select a level. Once the level has been selected load DLI lines, DLI color changes, and tile set associated with that room. Be able to select tiles with the mouse. Once a tile is selected draw it on the screen where ever needed. Re-compress file and save it back to the game file.

 

Screen shots attached. The first was an attempt to display the first character set. The second is my new work in progress.

post-40949-0-29515900-1552944017.png

post-40949-0-66237200-1552944023_thumb.png

Edited by Ute
  • Like 4
Link to comment
Share on other sites

About my previous post: the floor detection is also done by collision detection.

 

In Altirra change:

 

1558: 85 B6 STA $B6 ; /* copy (P0PF|P1PF)&F to $B6 */

 

by

 

1558: EA NOP
1559: EA NOP
then set $B6 to 1 and then Bruce Lee flies

 

post-40786-0-12794500-1552944416.png

 

Moreover in the game if we look precisely, we see that Bruce Lee is a pixel in the ground

 

post-40786-0-62973500-1552944870.png

 

So Floor=[((P0PF|P1PF)&1)==1]

 

Conclusion: use COLPF0 for the floor.... And COLPF2 for the ladders and COLPF3 for the walls and COLPF1 for ....

Edited by fantômas
  • Like 1
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...