Define the sprites for SCREEN5 in Assembly for MSX2

Pagina 1/4
| 2 | 3 | 4

Door gasparrini

Champion (301)

afbeelding van gasparrini

08-06-2012, 00:12

Hello guys,

Define the sprites for SCREEN5 in Assembly for MSX2.

Here downstairs, there is already a my source example for
define the sprites, but unfortunately something that does not work,
because when I PUT SPRITE by BASIC not seen the sprites!

So kindly ask your help if anyone is willing
to correct my source in assembly.

sorry if the comments are in Italian.....

Regards
;-)
AG.

; [YOUR GROUP] MSX Z80 source file.
;
; Prog: 
; Code: [YOUR HANDLE]
; Date:
;
; cmnt:
;
; Coded in TeddyWareZ' Chaos Assembler 3
;
; (C) 2001 [YOUR GROUP]!


        .org	$D000 - 7

	.db	$fe
	.dw	startProgram,endProgram,startProgram

startProgram:


SPRTBL  	.equ $7600		; indirizzi tabelle definizione sprites
SPRCLR	.equ $7400		; indirizzi tabelle colore per sprites multicolore
CHGMOD	.equ $005f		; routine del BIOS usata per inizializzare lo  schermo (V9938)

   

  ld     a,5                 ; SET SCREEN 5
  call   $005f               ; SCREEN5 mode

; VDP(1)=98                  = SCREEN ,2 = SPRITE 16 X 16
  xor    %11100010           ; %01100010 -- ld     a,98
  out    ($99),a
  xor    %11100011           ; %10000001 -- ld     a,1+128
  out    ($99),a

; Alloca la forma degli sprite
	ld	hl,SPRDEF
	ld	de,SPRTBL
	ld	bc,19*32
	call	setup_write_vram

; Alloca il colore degli sprite
	ld	hl,SPRCOLOR
	ld	de,SPRCLR 
	ld	bc,19*16
	call  setup_write_vram




SPRDEF:
; Space Manbow-1
  .DB 27,61,30,231,7,0,0,60,112,96,192,0,0,0,0,0
  .DB 160,200,224,56,207,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 36,66,33,0,0,0,0,0,0,0,0,0,0,0,0,0
  .DB 80,52,30,0,0,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 0,0,0,24,8,31,63,0,0,0,0,0,0,0,0,0
  .DB 0,0,0,199,48,248,0,0,0,0,0,0,0,0,0,0
; Space Manbow-2 "Ala superiore"
  .DB 0,0,0,0,0,0,0,192,96,48,56,28,30,11,12,0
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 0,0,0,0,0,0,0,0,128,64,64,32,32,20,19,14
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
; BULLET FIRE! MANBOW 1UP
  .DB 0,0,0,0,0,0,127,255,127,0,0,0,0,0,0,0
  .DB 0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0   
; FX ESPLOSIONE
;mini esplosione
  .DB 64,112,59,31,29,11,14,124,60,54,27,63,121,97,193,0
  .DB 0,131,134,158,252,216,108,60,62,112,208,184,248,220,14,2
  
  .DB 8,138,239,126,38,121,57,246,23,63,53,97,0,0,0,0
  .DB 96,192,192,128,240,192,224,64,192,112,16,0,0,0,0,0
  
  .DB 142,100,121,63,151,157,56,117,61,152,221,182,63,115,97,140
  .DB 49,134,206,252,109,187,25,188,174,28,185,233,252,158,38,113
; Super Esplosione
  .DB 48,48,18,9,4,24,3,7,3,7,141,109,45,102,47,13
  .DB 0,0,32,71,31,62,95,28,255,251,159,206,236,245,243,199

  .DB 4,40,120,0,220,254,97,223,255,251,115,103,31,181,207,231
  .DB 0,0,3,39,40,144,196,200,0,72,36,240,240,248,120,88

  .DB 26,30,31,15,15,36,18,0,19,35,9,20,228,192,0,0
  .DB 231,243,237,248,230,206,223,255,251,198,127,59,0,30,20,32

  .DB 227,207,175,55,83,249,223,255,56,250,124,248,226,4,0,0
  .DB 176,244,102,180,246,177,224,192,224,192,24,32,144,72,12,12

; Super Esplosione FX B
  .DB 128,194,97,48,25,19,3,15,15,6,25,63,61,27,27,93
  .DB 0,0,15,30,68,255,255,255,127,253,188,141,167,218,195,7
  
  .DB 0,128,24,252,253,155,107,253,126,99,23,39,47,159,241,219
  .DB 3,6,12,56,144,130,228,240,224,240,224,232,236,252,236,228
  
  .DB 39,55,63,55,23,7,15,7,15,39,65,9,28,48,96,192
  .DB 219,143,249,244,228,232,198,126,191,214,217,191,63,24,1,0
  
  .DB 224,195,91,229,177,61,191,254,255,255,255,34,120,240,0,0
  .DB 186,216,216,188,252,152,96,240,240,192,200,156,12,70,35,1  

; Missile MANBOW air-air
  .DB 0,0,0,0,248,62,31,31,31,62,248,0,0,0,0,0
  .DB 0,0,0,0,0,0,254,255,254,0,0,0,0,0,0,0
; Fuoco Missile MANBOW air-air
  .DB 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
  .DB 0,0,0,0,12,62,255,255,255,62,12,0,0,0,0,0
  
SPRCOLOR:
; colors Space Manbow-1 
    .db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 ; bianco
    .db 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; blu
    .db 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10 ; Light Blue	

; colors Space Manbow-2 "Ala superiore"
    .db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 ; bianco
    .db 10,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ; Light Blue
; colors BULLET FIRE! MANBOW 1UP
    .DB 0,0,0,0,0,0,4,15,4,0,0,0,0,0,0,0 ; bullet FIRE! colors    
; colors ESPLOSIONE FX
;  mini esplosione FX giallo color    
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
;  Super Explosione FX parte A
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro       
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
; Super Explosione FX parte B
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso  

; colors Missile MANBOW air-air
    .DB 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 ; grigio scuro
; colors Fuoco Missile MANBOW air-air
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso  
; Versione del programma (visibile attraverso un editor esadecimale)
VERSION .text "SCRAMBLE MANBOW v1.6"


setup_write_vram:
	di
	ld c,099h
	set 6,h
	out (c),l
	out (c),h 
	ei
        ret
setup_read_vram:
	di
	ld c,099h
	out (c),l
	out (c),h 
	ei
        ret

endProgram:


.end
Aangemeld of registreer om reacties te plaatsen

Van MsxKun

Paladin (901)

afbeelding van MsxKun

08-06-2012, 11:27

Seems there is some code missing. There is no data dump to VRAM. Change the "call setup_write_vram" by usual call LDIRVM routine.

Van gasparrini

Champion (301)

afbeelding van gasparrini

08-06-2012, 14:00

I have change with CALL LDIRVM and .equ $005c

Unfortunately it doesn't work well,
you see some sprites, but not in the right order
and definitions and then on screen sprites appear dirty.

I for do see the sprites from basic I use PUT SPRITE.

      .org	$D000 - 7

	.db	$fe
	.dw	startProgram,endProgram,startProgram

startProgram:

LDIRVM	.equ $005c		; routine del BIOS usata per riempire la VRAM
SPRTBL  	.equ $7600		; indirizzi tabelle definizione sprites
SPRCLR	.equ $7400		; indirizzi tabelle colore per sprites multicolore
CHGMOD	.equ $005f		; routine del BIOS usata per inizializzare lo  schermo (V9938)

   

  ld     a,5                 ; SET SCREEN 5
  call   $005f               ; SCREEN5 mode

; VDP(1)=98                  = SCREEN ,2 = SPRITE 16 X 16
  xor    %11100010           ; %01100010 -- ld     a,98
  out    ($99),a
  xor    %11100011           ; %10000001 -- ld     a,1+128
  out    ($99),a

; Alloca la forma degli sprite
	ld	hl,SPRDEF
	ld	de,SPRTBL
	ld	bc,19*32
	call	LDIRVM

; Alloca il colore degli sprite
	ld	hl,SPRCOLOR
	ld	de,SPRCLR 
	ld	bc,19*16
	call  LDIRVM




SPRDEF:
; Space Manbow-1
  .DB 27,61,30,231,7,0,0,60,112,96,192,0,0,0,0,0
  .DB 160,200,224,56,207,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 36,66,33,0,0,0,0,0,0,0,0,0,0,0,0,0
  .DB 80,52,30,0,0,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 0,0,0,24,8,31,63,0,0,0,0,0,0,0,0,0
  .DB 0,0,0,199,48,248,0,0,0,0,0,0,0,0,0,0
; Space Manbow-2 "Ala superiore"
  .DB 0,0,0,0,0,0,0,192,96,48,56,28,30,11,12,0
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 0,0,0,0,0,0,0,0,128,64,64,32,32,20,19,14
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
; BULLET FIRE! MANBOW 1UP
  .DB 0,0,0,0,0,0,127,255,127,0,0,0,0,0,0,0
  .DB 0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0   
; FX ESPLOSIONE
;mini esplosione
  .DB 64,112,59,31,29,11,14,124,60,54,27,63,121,97,193,0
  .DB 0,131,134,158,252,216,108,60,62,112,208,184,248,220,14,2
  
  .DB 8,138,239,126,38,121,57,246,23,63,53,97,0,0,0,0
  .DB 96,192,192,128,240,192,224,64,192,112,16,0,0,0,0,0
  
  .DB 142,100,121,63,151,157,56,117,61,152,221,182,63,115,97,140
  .DB 49,134,206,252,109,187,25,188,174,28,185,233,252,158,38,113
; Super Esplosione
  .DB 48,48,18,9,4,24,3,7,3,7,141,109,45,102,47,13
  .DB 0,0,32,71,31,62,95,28,255,251,159,206,236,245,243,199

  .DB 4,40,120,0,220,254,97,223,255,251,115,103,31,181,207,231
  .DB 0,0,3,39,40,144,196,200,0,72,36,240,240,248,120,88

  .DB 26,30,31,15,15,36,18,0,19,35,9,20,228,192,0,0
  .DB 231,243,237,248,230,206,223,255,251,198,127,59,0,30,20,32

  .DB 227,207,175,55,83,249,223,255,56,250,124,248,226,4,0,0
  .DB 176,244,102,180,246,177,224,192,224,192,24,32,144,72,12,12

; Super Esplosione FX B
  .DB 128,194,97,48,25,19,3,15,15,6,25,63,61,27,27,93
  .DB 0,0,15,30,68,255,255,255,127,253,188,141,167,218,195,7
  
  .DB 0,128,24,252,253,155,107,253,126,99,23,39,47,159,241,219
  .DB 3,6,12,56,144,130,228,240,224,240,224,232,236,252,236,228
  
  .DB 39,55,63,55,23,7,15,7,15,39,65,9,28,48,96,192
  .DB 219,143,249,244,228,232,198,126,191,214,217,191,63,24,1,0
  
  .DB 224,195,91,229,177,61,191,254,255,255,255,34,120,240,0,0
  .DB 186,216,216,188,252,152,96,240,240,192,200,156,12,70,35,1  

; Missile MANBOW air-air
  .DB 0,0,0,0,248,62,31,31,31,62,248,0,0,0,0,0
  .DB 0,0,0,0,0,0,254,255,254,0,0,0,0,0,0,0
; Fuoco Missile MANBOW air-air
  .DB 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
  .DB 0,0,0,0,12,62,255,255,255,62,12,0,0,0,0,0
  
SPRCOLOR:
; colors Space Manbow-1 
    .db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 ; bianco
    .db 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; blu
    .db 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10 ; Light Blue	

; colors Space Manbow-2 "Ala superiore"
    .db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 ; bianco
    .db 10,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ; Light Blue
; colors BULLET FIRE! MANBOW 1UP
    .DB 0,0,0,0,0,0,4,15,4,0,0,0,0,0,0,0 ; bullet FIRE! colors    
; colors ESPLOSIONE FX
;  mini esplosione FX giallo color    
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
;  Super Explosione FX parte A
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro       
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
; Super Explosione FX parte B
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso  

; colors Missile MANBOW air-air
    .DB 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 ; grigio scuro
; colors Fuoco Missile MANBOW air-air
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso  
; Versione del programma (visibile attraverso un editor esadecimale)
VERSION .text "SCRAMBLE MANBOW v1.6"

endProgram:


.end

Van hit9918

Prophet (2855)

afbeelding van hit9918

09-06-2012, 10:43

Try $7800 instead $7600.
You wrote the wrong table.

Try out more things.
Watch the BASE() values of BASIC and put it to asm.

Note setup_write_vram: was for MSX1 16k vram.

Van AuroraMSX

Paragon (1901)

afbeelding van AuroraMSX

09-06-2012, 15:37

gasparrini wrote:

I have change with CALL LDIRVM and .equ $005c

Unfortunately it doesn't work well,
you see some sprites, but not in the right order
and definitions and then on screen sprites appear dirty.

I for do see the sprites from basic I use PUT SPRITE.

  ...
; Alloca il colore degli sprite
	ld	hl,SPRCOLOR
	ld	de,SPRCLR 
	ld	bc,19*16
	call  LDIRVM

SPRDEF:
; Space Manbow-1
  .DB 27,61,30,231,7,0,0,60,112,96,192,0,0,0,0,0
...

You do have some more code between the call LDIRVM and SPRDEF: label, do you? You need at least a RET (return to BASIC) or JR -2 (endless loop)there, otherwise the z80 will happily start executing your space manbow sprite as code and I can't imagine that that is what you want Nishi

Van ARTRAG

Enlighted (6188)

afbeelding van ARTRAG

09-06-2012, 16:04

why not, executing data at random could lead to good results in certain cases...
and for sure, if it works, you save a lot of room in ram as the same bytes once are executed once are used as data
oO

Van PingPong

Prophet (3334)

afbeelding van PingPong

09-06-2012, 16:09

ARTRAG wrote:

why not, executing data at random could lead to good results in certain cases...
and for sure, if it works, you save a lot of room in ram as the same bytes once are executed once are used as data
oO

The darwin law of programming. "try to code randomly, the environment reject bad results, only selecting the correct ones"

LOL!

Van gasparrini

Champion (301)

afbeelding van gasparrini

09-06-2012, 22:42

Hello Dears Guys,

I have correct here! And now work very well, but there is not the function
SCREEN5,2

therefore from basic, put SCREEN5,2 then.... BLOAD"routine.bin",R

Example:

10 SCREEN5,2
20 BLOAD"ROUTINE.BIN",R
30 DEFUSR=&HD000:A=USR(0)
40 PUT SPRITE 0,(100,100),,0
50 GOTO 50

New routine that it is work very well.

      .org	$D000 - 7

	.db	$fe
	.dw	startProgram,endProgram,startProgram

startProgram:

LDIRVM	.equ $005c		; routine del BIOS usata per riempire la VRAM
SPRTBL  	.equ $7800		; indirizzi tabelle definizione sprites
SPRCLR	.equ $7400		; indirizzi tabelle colore per sprites multicolore
CHGMOD	.equ $005f		; routine del BIOS usata per inizializzare lo  schermo (V9938)

   

  
; Alloca la forma degli sprite
	ld	hl,SPRDEF
	ld	de,SPRTBL
	ld	bc,19*32
	call	LDIRVM

; Alloca il colore degli sprite
	ld	hl,SPRCOLOR
	ld	de,SPRCLR 
	ld	bc,19*16
	call  LDIRVM


       ret     ; Return BASIC

SPRDEF:
; Space Manbow-1
  .DB 27,61,30,231,7,0,0,60,112,96,192,0,0,0,0,0
  .DB 160,200,224,56,207,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 36,66,33,0,0,0,0,0,0,0,0,0,0,0,0,0
  .DB 80,52,30,0,0,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 0,0,0,24,8,31,63,0,0,0,0,0,0,0,0,0
  .DB 0,0,0,199,48,248,0,0,0,0,0,0,0,0,0,0
; Space Manbow-2 "Ala superiore"
  .DB 0,0,0,0,0,0,0,192,96,48,56,28,30,11,12,0
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 0,0,0,0,0,0,0,0,128,64,64,32,32,20,19,14
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
; BULLET FIRE! MANBOW 1UP
  .DB 0,0,0,0,0,0,127,255,127,0,0,0,0,0,0,0
  .DB 0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0   
; FX ESPLOSIONE
;mini esplosione
  .DB 64,112,59,31,29,11,14,124,60,54,27,63,121,97,193,0
  .DB 0,131,134,158,252,216,108,60,62,112,208,184,248,220,14,2
  
  .DB 8,138,239,126,38,121,57,246,23,63,53,97,0,0,0,0
  .DB 96,192,192,128,240,192,224,64,192,112,16,0,0,0,0,0
  
  .DB 142,100,121,63,151,157,56,117,61,152,221,182,63,115,97,140
  .DB 49,134,206,252,109,187,25,188,174,28,185,233,252,158,38,113
; Super Esplosione
  .DB 48,48,18,9,4,24,3,7,3,7,141,109,45,102,47,13
  .DB 0,0,32,71,31,62,95,28,255,251,159,206,236,245,243,199

  .DB 4,40,120,0,220,254,97,223,255,251,115,103,31,181,207,231
  .DB 0,0,3,39,40,144,196,200,0,72,36,240,240,248,120,88

  .DB 26,30,31,15,15,36,18,0,19,35,9,20,228,192,0,0
  .DB 231,243,237,248,230,206,223,255,251,198,127,59,0,30,20,32

  .DB 227,207,175,55,83,249,223,255,56,250,124,248,226,4,0,0
  .DB 176,244,102,180,246,177,224,192,224,192,24,32,144,72,12,12

; Super Esplosione FX B
  .DB 128,194,97,48,25,19,3,15,15,6,25,63,61,27,27,93
  .DB 0,0,15,30,68,255,255,255,127,253,188,141,167,218,195,7
  
  .DB 0,128,24,252,253,155,107,253,126,99,23,39,47,159,241,219
  .DB 3,6,12,56,144,130,228,240,224,240,224,232,236,252,236,228
  
  .DB 39,55,63,55,23,7,15,7,15,39,65,9,28,48,96,192
  .DB 219,143,249,244,228,232,198,126,191,214,217,191,63,24,1,0
  
  .DB 224,195,91,229,177,61,191,254,255,255,255,34,120,240,0,0
  .DB 186,216,216,188,252,152,96,240,240,192,200,156,12,70,35,1  

; Missile MANBOW air-air
  .DB 0,0,0,0,248,62,31,31,31,62,248,0,0,0,0,0
  .DB 0,0,0,0,0,0,254,255,254,0,0,0,0,0,0,0
; Fuoco Missile MANBOW air-air
  .DB 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
  .DB 0,0,0,0,12,62,255,255,255,62,12,0,0,0,0,0
  
SPRCOLOR:
; colors Space Manbow-1 
    .db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 ; bianco
    .db 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; blu
    .db 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10 ; Light Blue	

; colors Space Manbow-2 "Ala superiore"
    .db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 ; bianco
    .db 10,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ; Light Blue
; colors BULLET FIRE! MANBOW 1UP
    .DB 0,0,0,0,0,0,4,15,4,0,0,0,0,0,0,0 ; bullet FIRE! colors    
; colors ESPLOSIONE FX
;  mini esplosione FX giallo color    
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
;  Super Explosione FX parte A
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro       
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
; Super Explosione FX parte B
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso  

; colors Missile MANBOW air-air
    .DB 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 ; grigio scuro
; colors Fuoco Missile MANBOW air-air
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso  
; Versione del programma (visibile attraverso un editor esadecimale)
VERSION .text "SCRAMBLE MANBOW v1.6"

endProgram:


.end

Instead the error is here downstairs !!
Because doesn't work SCREEN,2 for set
sprite 16x16 pixel

ld     a,5                 ; SET SCREEN 5
  call   $005f               ; SCREEN5 mode

; VDP(1)=98                  = SCREEN ,2 = SPRITE 16 X 16
  xor    %11100010           ; %01100010 -- ld     a,98
  out    ($99),a
  xor    %11100011           ; %10000001 -- ld     a,1+128
  out    ($99),a

But also this code source for SCREEN,2 for set sprite 16x16
doesn't work!!

; SCREEN,2 = VDP(1)=98 = SPRITE16X16
	ld	a,98
	out	($99),a
	ld	a,1+128
	out	($99),a

Therefore: I ask still your nice help for me, please??
In mode that is work for function SCREEN,2
for set sprite 16x16 pixel. ^_^

I wait your good news...
Regards...
AG.

Van MsxKun

Paladin (901)

afbeelding van MsxKun

10-06-2012, 01:03

VDP1:		equ	$f3e0

; Sprites 16x16

Sprites16:	ld	a,(VDP1)			; vdp reg 1 en ram
		or	2
		ld	(VDP1),a
		ld	c,1
		
; WriteVDP:	Escribe valor en un registro
; Entrada:	A - Valor, C - Registro

WriteVDP:	di
		out	($99),a
		ld	a,c
		or	128
		out	($99),a
		ei
		ret

Van gasparrini

Champion (301)

afbeelding van gasparrini

10-06-2012, 01:57

Hi MsxKun,

Now work very well, but there is a little problem:
doesn't work the multicolor routine!!!

For me, unfortunately there is still a little problem
that is must to be correct!! ;-)

I wait others your good news
Regards
^_^
AG.

.org	$D000 - 7

	.db	$fe
	.dw	startProgram,endProgram,startProgram

startProgram:

LDIRVM	.equ $005c		; routine del BIOS usata per riempire la VRAM
SPRTBL  	.equ $7800		; indirizzi tabelle definizione sprites
SPRCLR	.equ $7400		; indirizzi tabelle colore per sprites multicolore
CHGMOD	.equ $005f		; routine del BIOS usata per inizializzare lo  schermo (V9938)
VDP1:	.equ $f3e0        ; 
   

  ld     a,5                  ; SET SCREEN 5
  call   $005f               ; SCREEN5 mode

; SCREEN,2
; Sprites 16x16

Sprites16:	ld	a,(VDP1)			; vdp reg 1 en ram
		or	2
		ld	(VDP1),a
		ld	c,1
		
; WriteVDP:	Escribe valor en un registro
; Entrada:	A - Valor, C - Registro

WriteVDP:	di
		out	($99),a
		ld	a,c
		or	128
		out	($99),a
		ei

; Alloca la forma degli sprite
	ld	hl,SPRDEF
	ld	de,SPRTBL
	ld	bc,19*32
	call	LDIRVM

; Alloca il colore degli sprite
	ld	hl,SPRCOLOR
	ld	de,SPRCLR 
	ld	bc,19*16
	call  LDIRVM


      ret ; RETURN in BASIC

SPRDEF:
; Space Manbow-1
  .DB 27,61,30,231,7,0,0,60,112,96,192,0,0,0,0,0
  .DB 160,200,224,56,207,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 36,66,33,0,0,0,0,0,0,0,0,0,0,0,0,0
  .DB 80,52,30,0,0,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 0,0,0,24,8,31,63,0,0,0,0,0,0,0,0,0
  .DB 0,0,0,199,48,248,0,0,0,0,0,0,0,0,0,0
; Space Manbow-2 "Ala superiore"
  .DB 0,0,0,0,0,0,0,192,96,48,56,28,30,11,12,0
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  
  .DB 0,0,0,0,0,0,0,0,128,64,64,32,32,20,19,14
  .DB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
; BULLET FIRE! MANBOW 1UP
  .DB 0,0,0,0,0,0,127,255,127,0,0,0,0,0,0,0
  .DB 0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0   
; FX ESPLOSIONE
;mini esplosione
  .DB 64,112,59,31,29,11,14,124,60,54,27,63,121,97,193,0
  .DB 0,131,134,158,252,216,108,60,62,112,208,184,248,220,14,2
  
  .DB 8,138,239,126,38,121,57,246,23,63,53,97,0,0,0,0
  .DB 96,192,192,128,240,192,224,64,192,112,16,0,0,0,0,0
  
  .DB 142,100,121,63,151,157,56,117,61,152,221,182,63,115,97,140
  .DB 49,134,206,252,109,187,25,188,174,28,185,233,252,158,38,113
; Super Esplosione
  .DB 48,48,18,9,4,24,3,7,3,7,141,109,45,102,47,13
  .DB 0,0,32,71,31,62,95,28,255,251,159,206,236,245,243,199

  .DB 4,40,120,0,220,254,97,223,255,251,115,103,31,181,207,231
  .DB 0,0,3,39,40,144,196,200,0,72,36,240,240,248,120,88

  .DB 26,30,31,15,15,36,18,0,19,35,9,20,228,192,0,0
  .DB 231,243,237,248,230,206,223,255,251,198,127,59,0,30,20,32

  .DB 227,207,175,55,83,249,223,255,56,250,124,248,226,4,0,0
  .DB 176,244,102,180,246,177,224,192,224,192,24,32,144,72,12,12

; Super Esplosione FX B
  .DB 128,194,97,48,25,19,3,15,15,6,25,63,61,27,27,93
  .DB 0,0,15,30,68,255,255,255,127,253,188,141,167,218,195,7
  
  .DB 0,128,24,252,253,155,107,253,126,99,23,39,47,159,241,219
  .DB 3,6,12,56,144,130,228,240,224,240,224,232,236,252,236,228
  
  .DB 39,55,63,55,23,7,15,7,15,39,65,9,28,48,96,192
  .DB 219,143,249,244,228,232,198,126,191,214,217,191,63,24,1,0
  
  .DB 224,195,91,229,177,61,191,254,255,255,255,34,120,240,0,0
  .DB 186,216,216,188,252,152,96,240,240,192,200,156,12,70,35,1  

; Missile MANBOW air-air
  .DB 0,0,0,0,248,62,31,31,31,62,248,0,0,0,0,0
  .DB 0,0,0,0,0,0,254,255,254,0,0,0,0,0,0,0
; Fuoco Missile MANBOW air-air
  .DB 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
  .DB 0,0,0,0,12,62,255,255,255,62,12,0,0,0,0,0
  
SPRCOLOR:
; colors Space Manbow-1 
    .db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 ; bianco
    .db 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4 ; blu
    .db 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10 ; Light Blue	

; colors Space Manbow-2 "Ala superiore"
    .db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15 ; bianco
    .db 10,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 ; Light Blue
; colors BULLET FIRE! MANBOW 1UP
    .DB 0,0,0,0,0,0,4,15,4,0,0,0,0,0,0,0 ; bullet FIRE! colors    
; colors ESPLOSIONE FX
;  mini esplosione FX giallo color    
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
    .DB 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 ; giallo
;  Super Explosione FX parte A
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro       
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
    .DB 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6  ; rosso scuro
; Super Explosione FX parte B
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso  

; colors Missile MANBOW air-air
    .DB 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14 ; grigio scuro
; colors Fuoco Missile MANBOW air-air
    .DB 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8  ; rosso  
; Versione del programma (visibile attraverso un editor esadecimale)
VERSION .text "SCRAMBLE MANBOW v1.6"

endProgram:


.end

Van AuroraMSX

Paragon (1901)

afbeelding van AuroraMSX

10-06-2012, 11:24

gasparrini wrote:
10 SCREEN5,2
20 BLOAD"ROUTINE.BIN",R
30 DEFUSR=&HD000:A=USR(0)
40 PUT SPRITE 0,(100,100),,0
50 GOTO 50

Your code now gets run twice. Once as a result of the ,R in line 20, and then again in line 30.
So, you can either leave out the ,R in line 20, or remove line 30.

Pagina 1/4
| 2 | 3 | 4