Jump to content
Philsan

Two Bruce Lee sequels

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

Share this post


Link to post
Share on other sites

Forgot to say but you probably already saw it that char $86 data sure is (11111111)x8scanlines, right?

 

No, I hadn't. I just saw that $86 was special somehow. I haven't looked at all at the fonts.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Fun watching this from the outside guys. Thanks for the work, and thanks for sharing the details!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

So while we’re all puzzling over the code, who can make 20 new maps ? For sure not me, I can’t draw for crap.

Share this post


Link to post
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 ?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

So, what about the maps ? Just use all of dmx’s maps and clone Fury, use some of them and make a few different ones, or use all new maps?

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