Page 2 of 2

Re: Creating shoot them up

Posted: Mon Oct 05, 2015 9:40 am
by tonma
Hi.
Your .pce works fine but i can't compil the .s

I don't have the the HUC part. I try with the original HUC kit of magicengine and after with the last version of HUC on the zerograd web site (Download HuC 3.21 (denki) (433975 bytes), OS : win added on 2005-04-09). I've verified the path and make some test without success.

With the last kit (huc 3.21), when I try bg.s, I always have this error in huc_gfx.asm with all line with " __plb" if I test the line number.

The message is :
"lda __arg,Y
undefined symbol in operand field !

And I try with samples in mkit, I have now error when I use them with HUC 3.21 (in startup.asm, Library.asm and sound.asm)

Re: Creating shoot them up

Posted: Mon Oct 05, 2015 10:09 am
by tonma
I finally make it without HUC and some minor change.

One thing I change to make my version working is .org :

Code: Select all

.data
	.bank MAIN_BANK
	.org $C000
Can you tell me why I need to write at these address ? I don't find information in your last link.

And after if I want to go to BG1 and/or scroll, I need to look into the register "$09 - Memory Width Register (MWR)" ?

Re: Creating shoot them up

Posted: Mon Oct 05, 2015 11:54 am
by MooZ
That's mainly because of how mkit implements the irq_reset.
I don't have the code at hand right now but I guess that it maps the MAIN_BANK to mpr 4 (hence the .org $C000, as 0xC000=(6<<0x0D))

About the vdc registers... yes!
I think there's a routine for this.

Re: Creating shoot them up

Posted: Mon Oct 05, 2015 4:57 pm
by tonma
Thanks, I look Inside mkit/debug and find some value. I think I put now my data in the good way but ...

I doesn't understand why you mul by 0x0D but I find the bank map adress and 6 is for the bank 6(#C000) !

I begin to use the BG0 but line by line with a mini function of my own. Not terrible but working.
Image

I wish to use more dynamic value. I use st1 and st2 but I can't put variable Inside, only hard number. The base of my minimal function (not a real function but a boucle, I don't know if we use boucle in English)

Code: Select all

	stw #-1, hori	
	stw #01, vert2 
.back1		
		
	inc  hori	
	stw vert2, vert
		
	vreg    #$02 
	ldx     hori
	lda     vert 
	jsr     calc_vram_addr
	jsr     set_write
		
        st1     #$00	; here I want to put my variable "vert". I don't know if it's possible. Or use a word array ($0100, $0100, ...) and use #low(array value) / high(array value)
	st2	#$01		
		
	lda 	hori
	cmp  #31		
	beq   .back2
        bra   .back1
	
.back2
	inc		vert2
	lda 		vert2
	cmp  	#4		
	beq   	.satb
	bra 		.back1
I have another problem : I can't put my tile in BG1, I try with vreg #$05 without success. The same for my sprite. i want to change his priority to go on Sprite1 plane.
I use the macro : spr_pri #1

Code: Select all

	spr_set #0,satb
	spr_x sx
	spr_y sy
	spr_pattern #TONMA
	spr_ctrl  #SIZE_MASK,#SIZE_16x16
	spr_ctrl  #FLIP_MASK,#NO_FLIP
        spr_pri   #1
	spr_pal   #0
I try to change value #1 or #0 but the asm always put it on Sprite0 plane. I can't test with a background tile in foreground but the psrite disapear when I hide the Sprite0 plane with Mednafen.

Re: Creating shoot them up

Posted: Mon Oct 05, 2015 6:38 pm
by MooZ
st0, st1 and st2 are "shortcuts" for:

Code: Select all

 ; st0
lda something
sta $0000
; st1
lda foo
sta $0002
; st2
lda foo
sta $0003
mkit has aliases for vdc registers. Namely, $0000 is video_reg, $0002 video_data_l and $0003 video_data_h.
They can be found include/pce/equ.inc

Do you call "update_satb satb" in your main loop?

Re: Creating shoot them up

Posted: Mon Oct 05, 2015 6:58 pm
by tonma
Thanks a lot for the shurtcut.

I make it works right now. I just look now for array value to make my tilemap.

I found the aliases you talk : video_reg ... I will look tomorrow how I can use them (with the debugger). i juste want to choose my plan for drawing sprite/tile now.

And oh yes, I update my satb

Code: Select all

.update:
           
		vsync

		
.satb:
           update_satb satb    ; update the SATB

           jmp   .update         ; and loop forever
           

Re: Creating shoot them up

Posted: Sat Dec 26, 2015 7:35 pm
by RegalSin
http://shmups.system11.org/


Not the best place for programming but many shooter fans in one area.

Re: Creating shoot them up

Posted: Mon Jan 04, 2016 9:38 am
by tonma
RegalSin wrote:http://shmups.system11.org/


Not the best place for programming but many shooter fans in one area.

Thanks, I'll look in the dev section, maybe to find some informations on good shoot sharing.

Re: Creating shoot them up

Posted: Mon Jan 25, 2016 10:14 am
by tonma
Two videos from my dev on PCE.

https://youtu.be/Ky7fHuG37pc
https://youtu.be/5xWYfWPLvTw

Platform game with PyschoFox assets and the vertical with Banshee CD32 and ansimuz ship.

All in asm. 8-)

Re: Creating shoot them up

Posted: Thu Jan 28, 2016 9:21 am
by MooZ
Keep it up!