Unused Citadel bits

reminisce about bbc micro & electron games like chuckie egg, repton, elite & exileRelated forum: adventures


User avatar
streaks
Posts: 212
Joined: Thu Oct 13, 2005 2:08 pm
Contact:

Re: Unused Citadel bits

Post by streaks » Sat Dec 30, 2017 11:48 pm

Tile size: Damn, just checked my tilesets and yeh some of them were wrong. I'd assumed 20x16, but in my old rips some of them are like 32x16 (the grass/sand/ground tile) but looking closer it can be reduced to 20x8. Better start over on my wall tile rips. You mentioned it before but it didn't click. I think there are only 6 wall variations used with various palette assignments so it's not a big job to re-source them. I imagine the top-left corner of the screenspace aligns with the top-left corner of the tile image..

Rope monster: Thanks, this is one big Citadel thread completed for me.
streaksy (at) gmail (dot) com

User avatar
streaks
Posts: 212
Joined: Thu Oct 13, 2005 2:08 pm
Contact:

Re: Unused Citadel bits

Post by streaks » Sat Dec 30, 2017 11:49 pm

(Those tile dimensions account for the mode 2 pixel doubling, so 32x is really 16x)
streaksy (at) gmail (dot) com

Diminished
Posts: 88
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Unused Citadel bits

Post by Diminished » Sun Dec 31, 2017 10:01 am

streaks wrote:Better start over on my wall tile rips.
Woke up, read this, stuffed PNG export into my script.

Here's the entire tileset according to my reimplementation. I wasn't going to publish this, because a) technically it's copyrighted and b) as I mentioned, a minute fraction of the layers don't render correctly and I'd hoped to wait until they did, but it sounds like it might save you some work.
citadel-bbc-retail-tiles.zip
(49.21 KiB) Downloaded 31 times
Last edited by Diminished on Sun Dec 31, 2017 10:09 am, edited 1 time in total.

Diminished
Posts: 88
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Unused Citadel bits

Post by Diminished » Sun Dec 31, 2017 10:09 am

For comparison, here's the set from citadel-early, which exhibits some differences as I mentioned.
citadel-bbc-early-tiles.zip
(50.28 KiB) Downloaded 21 times

User avatar
streaks
Posts: 212
Joined: Thu Oct 13, 2005 2:08 pm
Contact:

Re: Unused Citadel bits

Post by streaks » Sun Dec 31, 2017 12:43 pm

Haaa, this is mint. Thank you. I'm going to get busy on this.
streaksy (at) gmail (dot) com

User avatar
streaks
Posts: 212
Joined: Thu Oct 13, 2005 2:08 pm
Contact:

Re: Unused Citadel bits

Post by streaks » Sun Dec 31, 2017 1:19 pm

Not seeing torches among the tiles. Tile 063 in the early version looks like it might be a garbled torch, and in the retail version it's even more messed up.
streaksy (at) gmail (dot) com

Diminished
Posts: 88
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Unused Citadel bits

Post by Diminished » Sun Dec 31, 2017 1:41 pm

Sorry, that's a bug. The torch is actually the final tile, 117, which isn't in the ZIP file. Tile 116 (ceiling spikes) has a messed-up final layer, so what I think is happening is that it's trying to read the data for tile 117 as part of tile 116. (EDIT: nope, see five posts down.) Something similar may be happening with the mummies.

Here are the torches.
117.png
117.png (368 Bytes) Viewed 481 times
EDIT: also, the player characters aren't in the tileset either -- as you might expect, these are special-cased and don't reside in the main tile data. The game pulls that data from a dedicated table at (IIRC) 0x600 (which I assume is replaced depending on whether you picked a male or female character), and I haven't attempted to decode that yet, although it probably uses the same format as the main tiles.

EDIT2: One other thing: There is one tile that's loaded in every room that has water, although it never seems to be displayed, and I think this is the tile you refer to as the "garbled torch" EDIT: nope, this is tile 114. There are to my mind two possibilities, but I haven't had the chance to investigate. This is either an unused water animation that Jakobsen originally implemented, decided he didn't like (or consumed too much runtime), and forgot to remove the graphics for; or (more likely) it's used for the "splash" when you jump into water. Not sure which.
Last edited by Diminished on Mon Jan 01, 2018 9:52 pm, edited 3 times in total.

User avatar
streaks
Posts: 212
Joined: Thu Oct 13, 2005 2:08 pm
Contact:

Re: Unused Citadel bits

Post by streaks » Sun Dec 31, 2017 2:07 pm

Oh, right. Gotcha.

If you're interested I found another little weird detail. You know the roof of the witch's house on the micro version.. there's a magenta pixel offset on the bottom-left corner of the triangle. It looks like it's just a star but it's actually solid for some reason.
streaksy (at) gmail (dot) com

User avatar
Rich Talbot-Watkins
Posts: 1281
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Unused Citadel bits

Post by Rich Talbot-Watkins » Sun Dec 31, 2017 2:58 pm

Yeah, the screenshots I added upthread show that. The reason for it is that, for some reason, the triangle coordinates which make the roof are slightly off (the two bottom y coordinates are not equal). OS 1.20 has a small bug where triangles aren't plotted correctly in this case (it just plots the first pixel and then gives up), while the Master OS renders them properly (as can be seen from the Master screenshot above). Weird that the triangle data was a bit off there!

User avatar
streaks
Posts: 212
Joined: Thu Oct 13, 2005 2:08 pm
Contact:

Re: Unused Citadel bits

Post by streaks » Sun Dec 31, 2017 4:04 pm

Aye, I assumed it was triangle dodginess
streaksy (at) gmail (dot) com

User avatar
streaks
Posts: 212
Joined: Thu Oct 13, 2005 2:08 pm
Contact:

Re: Unused Citadel bits

Post by streaks » Mon Jan 01, 2018 4:18 pm

Just realised... there's a pit of those rope monsters in the lab thing down the well without the rope xor'd over them. Sheesh.

Since I'm here, I'm noticing a few other things missing from that gfx rip collection, like ground thorns, ladders, rope.. Easy for me to get, but thought you might not have noticed (you probably did).

Edit:
Found four flavours of ground thorn: magenta and yellow that point right, red and cyan that point left.

Found four flavours of ladders and noticed the ladders are weird. There appears to be three variations of each colour. Full ladders, ladders with the top rung missing (for tops of ladders), and a half-height ladders with the top rung missing for tops of ladders that rise slightly above floor level.

Also noticed while screenshot-ripping sprites: the female's feet and hands are yellow except when climbing a rope, when they're cyan, and she suddenly has a cyan belt while climbing. Also she has pigtails, but you can only tell from behind when there's no rope xor'd over her back.
Last edited by streaks on Mon Jan 01, 2018 5:30 pm, edited 1 time in total.
streaksy (at) gmail (dot) com

Diminished
Posts: 88
Joined: Fri Dec 08, 2017 9:47 pm
Contact:

Re: Unused Citadel bits

Post by Diminished » Mon Jan 01, 2018 5:02 pm

Sorry, I've been peddling misinformation again.

*consults notes*

Tile 114 is the one that I said might be an unused water animation, or the splash graphics.
Tile 115 is the ceiling spikes, which my script partially renders.
Tile 116 is the ground spikes, which my script doesn't render for some reason, and is missing from the ZIP.
Tile 117 is the torches, which my script will render if prodded correctly.

118 - 127 are undefined.

The ladders and ropes don't have tiles -- the game draws those procedurally, using loops.

EDIT: Pretty compact routines, too.

Ropes:

Code: Select all

                          ; blit ropes
3794: P_next_rope         jsr rdata_xy_alt_vptr
3797:                     adc #$04
3799:                     tax
379a:                     tya
379b:                     cmp #$f0
379d:                     bcs L37a2
379f:                     ora #$08
37a1:                     tay
37a2: L37a2               jsr coords_to_VRAM_ptr
37a5:                     ldx #$6c
37a7: P_rope_outer        ldy #$07
37a9: P_rope_inner        lda (vram_ptr),y
37ab:                     and #$3f
37ad:                     bne L37cb
37af:                     txa
                          ; blit first line
37b0:                     sta (vram_ptr),y
37b2:                     dey
37b3:                     lda #$5c
                          ; blit second line
37b5:                     sta (vram_ptr),y
37b7:                     dey
37b8:                     bpl P_rope_inner
37ba:                     sec
                          ; vram_ptr -= 0x280
37bb:                     lda vram_ptr
37bd:                     sbc #$80
37bf:                     sta vram_ptr
37c1:                     lda vram_ptr + 1
37c3:                     sbc #$02
37c5:                     sta vram_ptr + 1
37c7:                     cmp #$49
37c9:                     bcs P_rope_outer
37cb: L37cb               dec decor_bar
37cd:                     bne P_next_rope
                          
37cf: Lropes_done         lda room_N_plus_2
37d1:                     lsr a
37d2:                     lsr a
37d3:                     lsr a
37d4:                     lsr a
37d5:                     bne L37da
37d7: Ljump_to_stars      jmp Ldo_stars
Ladders:

Code: Select all

                          ; ladders
37da: L37da               sta decor_bar
                          ; first byte contains coordinates
37dc: P_next_ladder       jsr rdata_xy_alt_vptr
37df:                     tya
37e0:                     adc #$08
37e2:                     tay
37e3:                     jsr coords_to_VRAM_ptr
                          ; second byte contains pointer to tile?
37e6:                     jsr get_next_room_byte
37e9:                     and #$7c
37eb:                     lsr a
37ec:                     lsr a
37ed:                     sta tileptr_L
37ef:                     tya
37f0:                     and #$03
37f2:                     asl a
37f3:                     tax
                          ; load alt_vram_ptr low and high using two consecutive values from T_40C1
37f4:                     ldy #$01
37f6: P_ladder_get_avptr  lda T_40C1 + 8,x
                          ; alt_vram_ptr is just used to hold some colour bytes
37f9:                     sta alt_vram_ptr,y
37fc:                     inx
37fd:                     dey
37fe:                     bpl P_ladder_get_avptr
3800:                     bmi L380e
3802: P_ladder_outer      lda vram_ptr
3804:                     sbc #$7f
3806:                     sta vram_ptr
3808:                     lda vram_ptr + 1
380a:                     sbc #$02
380c:                     sta vram_ptr + 1
380e: L380e               lda #$40
3810:                     ldy #$1f
                          ; erase anything under the ladder
3812: P_ladder_blit_3     sta (vram_ptr),y
3814:                     dey
3815:                     bpl P_ladder_blit_3
3817:                     ldx alt_vram_ptr
                          ; CONSTANT: ladder rung colours
3819:                     ldy #$1c
381b:                     jsr draw_ladder_rung
381e:                     lda tileptr_L
3820:                     beq L3827
                          ; CONSTANT: ladder rung colours
3822:                     ldy #$18
3824:                     jsr draw_ladder_rung
3827: L3827               lda alt_vram_ptr + 1
3829:                     ldx #$07
382b:                     ldy #$27
                          ; blit right-hand ladder rail
382d: P_ladder_blit_1     sta (vram_ptr),y
382f:                     dey
3830:                     dex
3831:                     bpl P_ladder_blit_1
3833:                     ldy #$07
                          ; blit left-hand ladder rail
3835: P_ladder_blit_2     sta (vram_ptr),y
3837:                     dey
3838:                     bpl P_ladder_blit_2
383a:                     dec tileptr_L
383c:                     bpl P_ladder_outer
383e:                     dec decor_bar
3840:                     bne P_next_ladder
Ladder rung subroutine:

Code: Select all

                          ; draw horizontal line? only used by one piece of code at 37da
4074: draw_ladder_rung    sec
4075: P_draw_ladder_rung  txa
4076:                     sta (vram_ptr),y
4078:                     tya
4079:                     sbc #$08
407b:                     tay
407c:                     bpl P_draw_ladder_rung
407e:                     rts
Last edited by Diminished on Mon Jan 01, 2018 9:34 pm, edited 1 time in total.

User avatar
streaks
Posts: 212
Joined: Thu Oct 13, 2005 2:08 pm
Contact:

Re: Unused Citadel bits

Post by streaks » Mon Jan 01, 2018 5:35 pm

My missing tile screenshot-rips if you want 'em for comparison:
https://www.dropbox.com/s/0352ca1j3d880 ... y.rar?dl=0

Not "missing", but, yer know.

And if it's any use, the whole Citadel map with reference grid for tiles and rooms:
https://www.dropbox.com/s/bj9cd0qwg1ymv ... d.png?dl=0
streaksy (at) gmail (dot) com

Post Reply