Writing / Reading VRAM - noob questions

Página 8/9
1 | 2 | 3 | 4 | 5 | 6 | 7 | | 9

Por siudym

Resident (39)

Imagen del siudym

31-12-2021, 11:53

Another demo, a very simple game - we collect hearts, avoid opponents (who also steal our hearts) - the game mechanics have some bugs:

https://dl.dropboxusercontent.com/s/0q7s8otiv2txlzt/msxjalgd...

All the best to msx community in the coming new year 2022! :)

Por ARTRAG

Enlighted (6844)

Imagen del ARTRAG

31-12-2021, 13:18

You are using the sole channel A of the PSG.
It may be a problem in the setting of register 7 (mixer) where you have by accident disable the sound in channels B and C
You can see the problem in MEISEI under Advanced/PSG Toy
It will show visually the PSG data of the active channels

EDIT
it is not the MIXER, you are writing a single channel

Por siudym

Resident (39)

Imagen del siudym

01-01-2022, 12:21

I honestly have no idea what this is about. : /
I use the default WYZTracker and AsmPlayer settings.
Can you explain exactly where the problem is? I probably don't know something important.

Por ARTRAG

Enlighted (6844)

Imagen del ARTRAG

01-01-2022, 12:37

Try first to see if your songs in the test program that come with the player sound correctly
WYZTracker/AsmPlayer/Prueba_MSX.asm

If they work there with 3 channels the problem is in your code.
In this case only a debugger can help. I would look at the part of code where you mix music and sfx.
It could be a problem there. Maybe the wrong sequence of actions.

I would set a break point where you copy the psg data to the psg register
Look at that first

Por siudym

Resident (39)

Imagen del siudym

01-01-2022, 15:42

That's exactly what I did, the music works identically to Prueba_MSX.asm and in WYZTracker itself. Additionally, I am using exactly the same code, my Init code:


;asmplayer ram:

	ORG $E000, $F380					; 8KB de RAM

	include "music/WYZProplay47c_RAM.tniasm.asm"


;init code:

	db "AB"							; ID for auto-executable ROM
	dw INIT							; Main program execution address.
	dw 0							; STATEMENT
	dw 0							; DEVICE
	dw 0							; TEXT
	dw 0,0,0						; Reserved

INIT:								; Program code entry point label

	ld	a,32
	ld	(LINL32),a					; 32 columns / to zostaje bo oznacza 32x24
	call	INIT32						; SCREEN 1 / mode 0 / graphic 1
;	call	0072h						; SCREEN 2 / mode 2 / graphic 2

	LD A,1							; screen mode (0,1,2,3), tu nie wiem czy ustawiac te mode raz jeszcze, czy wyzej wystarczy 0072 ?
	CALL 005FH						; CALL CHGMOD, bo musze zmieniac tez tu jak wyzej ustawie mode

;-------

	ld   c,$01						; Register in C / Ustawiamy Sprite na 16x16
	ld   a,(REG1SAV)
	or   %00000010
	ld   b,a						; Data in B
	call 0047h

;-------

	ld a,4							; kolor ramki, 12 dark green, for example
	ld (BDRCLR), a
	call 0062h						; CHGCLR

;-------

	call	RSLREG
	rrca
	rrca
	and	3						; Keep bits corresponding to the page 4000h-7FFFh
	ld	c,a
	ld	b,0
	ld	hl,EXPTBL
	add	hl,bc
	ld	a,(hl)
	and	80h
	or	c
	ld	c,a
	inc	hl
	inc	hl
	inc	hl
	inc	hl
	ld	a,(hl)
	and	0Ch
	or	c
	ld	h,080h
	call	ENASLT						; Select the ROM on page 8000h-BFFFh

XOR A								; wylacz klikanie klawiatury (click bios sound)
LD ($F3DB),A

;-------							; DODANE - PLAYER MUZYKI

AJUSTES:
		DI
		CALL	PLAYER_INIT

		LD	A,1					; REPRODUCIR LA CANCION Nş 0 (uruchom muzyke nr 0)
		CALL	CARGA_CANCION

		LD	HL,INICIO
		LD	[HOOK+1],HL
		LD	A,$C3
		LD	[HOOK],A
		EI
		LD	A,$0E
		LD	[PSG_REG+13],A

;(...) end of init



; subroutines: (4000 or 8000)

	include "music/external.mus.asm"
	include "music/WYZProplay47cMSX.asm"

SONG_0:		incbin "music/external.mus"
SONG_1:		incbin "music/2ndsong.mus"
SONG_2:		incbin "music/3rdsoung.mus"
SONG_3:		incbin "music/4thsong.mus"

TABLA_SONG:	DW	SONG_0,SONG_1,SONG_2,SONG_3

Por siudym

Resident (39)

Imagen del siudym

01-01-2022, 18:57

Por ARTRAG

Enlighted (6844)

Imagen del ARTRAG

01-01-2022, 19:16

Maybe if the musics are playing bad on Prueba_msx.asm you should ask WYZ himself what is going wrong

Por ARTRAG

Enlighted (6844)

Imagen del ARTRAG

01-01-2022, 19:20

BTW you need something like
Org 04000h
Before AB signature

Por siudym

Resident (39)

Imagen del siudym

01-01-2022, 20:01

I have an ORG 4000h - when copying the code I did not select. Anyway, Music only uses one channel + FX.

Por ARTRAG

Enlighted (6844)

Imagen del ARTRAG

01-01-2022, 20:12

siudym wrote:

I have an ORG 4000h - when copying the code I did not select. Anyway, Music only uses one channel + FX.

Do you mean that you have composed music on one single channel?

Página 8/9
1 | 2 | 3 | 4 | 5 | 6 | 7 | | 9