Flagon Bird

Use this forum to submit new files for the download section of the archive. I will check each submission and upload it to the archive on a regular basis.
User avatar
CaptainNemo
Posts: 27
Joined: Tue Apr 22, 2014 9:23 pm

Re: Flagon Bird

Post by CaptainNemo »

I'm back to report!

Played Flagon Bird for almost an hour on a real Dragon 64 and it's even more addictive...
Animation is smooth and the game is very responsive.
Rank names are awesome -- nice thinking! How many are there? ;)

My new high score is 15!!!
User avatar
Bosco
Posts: 334
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: Flagon Bird

Post by Bosco »

Great to hear you're enjoying the game.

Ranking players with dragon names was my wife's idea so I can't take all the credit. :)

There are 96 ranks in all, if you include `faffy' for zero points. Initially each point earns you a new rank, then increases to two points, five points and ten points.

To reach the top rank you'd need a score of 250 or higher, although I'm not sure how achievable this is. :lol:

15 is a promising score!
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Flagon Bird

Post by zephyr »

robcfg wrote:I tried creating a rom file with a small loader to copy the game code to the right location and jumping to it, but it seems I need to initialize tha machine first.

Code: Select all

	org 49152
	ldd #3766
	ldx #49178
	ldy #16384
loop
	pshs d
	ldd ,x+
	std ,y+
	puls d
	subd #1
	bne loop
	jmp 16384
	INCLUDEBIN ./flagon.bin
Maybe @Zephyr could help us a bit here.
You need to enable the 50Hz IRQ before jumping to the game start address.

Code: Select all

LOOP
       LDU   ,X++
       STU   ,Y++
       SUBD  #1
       BNE    LOOP
       LDA    $FF03
       ORA    #$01
       STA    $FF03
       ANDCC  #$EF
       JMP    $4000
       INCLUDEBIN ./flagon.bin
User avatar
robcfg
Posts: 1532
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden
Contact:

Re: Flagon Bird

Post by robcfg »

Awesome! Thanks!

Here you have the Rom version for your favorite multi-cartridge ;)
Attachments
flagon.rom
Flagon Bird v1.0 (Rom version)
(8 KiB) Downloaded 270 times
User avatar
Bosco
Posts: 334
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: Flagon Bird

Post by Bosco »

Nice work! :D

BTW. I decided to post a video on YouTube.

https://www.youtube.com/watch?v=HiTOYig ... e=youtu.be

Not sure if it was a good idea? YouTube trolls can be harsh!
User avatar
Rolo
Posts: 228
Joined: Sun Feb 10, 2013 7:36 pm

Re: Flagon Bird

Post by Rolo »

Hi Rob,

you were faster than me :) (which is not very hard, I have to admit :oops: )
Since I’m always interested in new roms (smaller 16K), I was investigating the same thing yesterday and saw the endless loop:

Code: Select all

4120| 7d4762      TST     $4762               cc=40 a=00 b=02 dp=00 x=1d20 y=5555 u=ffff s=7f30
4123| 26fb        BNE     $4120               cc=40 a=00 b=02 dp=00 x=1d20 y=5555 u=ffff s=7f30

And the diverted IRQ-vector pointing to:

   pshs	a
	lda	>$ff03
	tst	>$4762
	beq	L_C097
	lbsr	L_C3D9
	clr	>$4762
L_C097	lda	>$ff02
	puls	a
	rti	
but the Xroar-trace showed no IRQ or FIRQ was happening.

I wanted to fix that today. Thanks!

@Bosco: Congratulations, great work! More to come?

-Rolo
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Flagon Bird

Post by zephyr »

Code: Select all

406A 3402     PSHS  A
406C B6FF03   LDA   $FF03
406F 7D4762   TST   $4762
4072 2706     BEQ   $407A
4074 170345   LBSR  $43BC
4077 7F4762   CLR   $4762
407A B6FF02   LDA   $FF02
407D 3502     PULS  A
407F 3B       RTI

Code: Select all

43BC 3450     PSHS  X,U
43BE BE4753   LDX   $4753
43C1 FE4755   LDU   $4755
43C4 1E13     EXG   X,U
43C6 BF4753   STX   $4753
43C9 FF4755   STU   $4755
43CC 8C0600   CMPX  #$0600
43CF 270E     BEQ   $43DF
43D1 B7FFC7   STA   $FFC7
43D4 B7FFC8   STA   $FFC8
43D7 B7FFCA   STA   $FFCA
43DA B7FFCD   STA   $FFCD
43DD 200C     BRA   $43EB
43DF B7FFC7   STA   $FFC7
43E2 B7FFC9   STA   $FFC9
43E5 B7FFCA   STA   $FFCA
43E8 B7FFCC   STA   $FFCC
43EB 35D0     PULS  X,U,PC
@Bosco: You don't need the PUSH/PUL code in your IRQ handler routine. The entire machine state is always saved on the hardware stack during processing of an IRQ input.

You can also remove the LDA $FF03 and replace the TST $4762 with LDA $4762.

Also, I suggest using the following code rather than have the extra EXG slowing things down.

Code: Select all

LDU   $4753
LDX   $4755
STX   $4753
STU   $4755
CMPX  #$0600
User avatar
Bosco
Posts: 334
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: Flagon Bird

Post by Bosco »

@Rolo: Yeah, definitely more new stuff to come.

@zephyr: Thanks for the code tips. :)

At the end of my IRQ service routine I read address $FF02. Does this clear the interrupt mask?
zephyr
Posts: 1474
Joined: Mon Jul 21, 2008 1:18 am

Re: Flagon Bird

Post by zephyr »

Bosco wrote:Does this clear the interrupt mask?
No. The interrupt mask (I) is cleared by the RTI instruction. Inside the Dragon describes the reading of $FF02 as "Clearing the interrupt condition".
User avatar
Bosco
Posts: 334
Joined: Tue Mar 04, 2014 11:49 pm
Location: Nottingham, UK

Re: Flagon Bird

Post by Bosco »

Thanks for clearing that up. Lots still to learn. :)
Post Reply