Jump to content

Photo

Two Bruce Lee sequels


199 replies to this topic

#126 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 4,251 posts
  • Location:Lisbon - Portugal

Posted Sun Mar 17, 2019 2:16 PM

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

#127 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Sun Mar 17, 2019 2:17 PM

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 ?



#128 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Sun Mar 17, 2019 2:19 PM

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.



#129 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Sun Mar 17, 2019 2:21 PM

 

 

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.



#130 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 4,251 posts
  • Location:Lisbon - Portugal

Posted Sun Mar 17, 2019 2:38 PM

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

#131 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Sun Mar 17, 2019 2:48 PM

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.



#132 fantômas OFFLINE  

fantômas

    Space Invader

  • 18 posts
  • Location:Orléans, France

Posted Sun Mar 17, 2019 3:02 PM

 

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


#133 fantômas OFFLINE  

fantômas

    Space Invader

  • 18 posts
  • Location:Orléans, France

Posted Sun Mar 17, 2019 3:06 PM

$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!



#134 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Sun Mar 17, 2019 3:27 PM

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, Sun Mar 17, 2019 3:30 PM.


#135 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,649 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Sun Mar 17, 2019 4:47 PM

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



#136 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Sun Mar 17, 2019 5:06 PM

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, Sun Mar 17, 2019 5:35 PM.


#137 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Sun Mar 17, 2019 11:46 PM

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.

#138 devwebcl OFFLINE  

devwebcl

    Stargunner

  • 1,264 posts
  • Location:Chile

Posted Mon Mar 18, 2019 4:51 AM

I would be nice to create few levels. 

Must we edit directly in the source code ?

or eventually there will be an editor ?



#139 Mclaneinc OFFLINE  

Mclaneinc

    Retro Madman

  • 6,689 posts
  • Location:Northolt, UK

Posted Mon Mar 18, 2019 9:14 AM

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

Attached Files


Edited by Mclaneinc, Mon Mar 18, 2019 9:15 AM.


#140 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Mon Mar 18, 2019 11:54 AM

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.



#141 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Mon Mar 18, 2019 12:21 PM

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.



#142 Philsan OFFLINE  

Philsan

    River Patroller

  • Topic Starter
  • 3,888 posts
  • New Orleans Saints Super Bowl XLIV Champions
  • Location:Switzerland

Posted Mon Mar 18, 2019 12:23 PM

Another image, 28 colors, from another source.

 

Philsan_BruceLee_4.png

Attached File  Philsan_BruceLee_4.xex   22.17KB   24 downloads



#143 fantômas OFFLINE  

fantômas

    Space Invader

  • 18 posts
  • Location:Orléans, France

Posted Mon Mar 18, 2019 12:48 PM

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.
 
map8.png
 
map0.png


#144 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 4,251 posts
  • Location:Lisbon - Portugal

Posted Mon Mar 18, 2019 1:07 PM

Deleted.

Edited by José Pereira, Mon Mar 18, 2019 1:27 PM.


#145 José Pereira OFFLINE  

José Pereira

    River Patroller

  • 4,251 posts
  • Location:Lisbon - Portugal

Posted Mon Mar 18, 2019 1:07 PM

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, Mon Mar 18, 2019 1:34 PM.


#146 Ute OFFLINE  

Ute

    Star Raider

  • 84 posts
  • Location:Utah

Posted Mon Mar 18, 2019 2:09 PM

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.

Attached Thumbnails

  • NoLampsCollected.png
  • 5LampsCollected.png

Edited by Ute, Mon Mar 18, 2019 2:09 PM.


#147 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Mon Mar 18, 2019 2:54 PM

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.

#148 Ute OFFLINE  

Ute

    Star Raider

  • 84 posts
  • Location:Utah

Posted Mon Mar 18, 2019 3:20 PM

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.

Attached Thumbnails

  • ScreenEditor.PNG
  • Capture.PNG

Edited by Ute, Mon Mar 18, 2019 3:21 PM.


#149 fantômas OFFLINE  

fantômas

    Space Invader

  • 18 posts
  • Location:Orléans, France

Posted Mon Mar 18, 2019 3:54 PM

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

 

BLFlies.png

 

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

 

P0PF.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, Mon Mar 18, 2019 4:24 PM.


#150 Alfred OFFLINE  

Alfred

    Dragonstomper

  • 557 posts
  • Location:Elmwood, Ontario

Posted Mon Mar 18, 2019 4:15 PM

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?




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users