show 8 sprites on the same line for MSX1

페이지 1/2
| 2

By gasparrini

Champion (329)

gasparrini의 아바타

11-08-2009, 12:40

Hi Guys,

I have a little routine than it work for do show 8 sprites on the same line for MSX1, in mode 4 sprite 16x16 and others 4 sprite 32x32: total 8 sprites
But unfortunately this routine doesn't work!!

I ask your help, Ok?? ^_^

Bye
Andrea

	.org $C000 - 7

	.db $fe
	.dw startProgram,endProgram,startProgram

startProgram:
VAL1A .EQU $E2
VAL1B .EQU $E3
VAL5A .EQU $36
VAL5B .EQU $7F
CTR:
   .DB 0
SPATSW:
   LD A,(CTR)
   INC A
   LD (CTR),A
   AND 1
   JR NZ,UNMAG
   LD B,VAL1B
   LD C,1
   CALL $47
   LD B,VAL5B
   LD C,5
   CALL $47
   RET
UNMAG:
   LD B,VAL1A
   LD C,1
   CALL $47
   LD B,VAL5A
   LD C,5
   CALL $47
   RET   
endProgram:

.end
Login or 등록 to post comments

By LeandroCorreia

Paladin (957)

LeandroCorreia의 아바타

11-08-2009, 13:33

I don´t know Assembly, but something I know for sure: MSX1 can only show four sprites per row (it´s a VDP speed limitation). If you want to display more sprites per row, you´ll have to alternate them quickly. This way they´ll flicker, but at least it´ll work. Play "Golvellius" or "Flicky" and you´ll know what I mean... Wink

By cax

Prophet (3740)

cax의 아바타

11-08-2009, 14:13

There exist MSX1 with MSX2 VDP inside, like Yamaha YIS503IIR, are we talking about such a machine ?

By gasparrini

Champion (329)

gasparrini의 아바타

11-08-2009, 14:33

Hi Cax,

No, no I talking the VDP of MSX1 !!
Because it is possible do this thing

By PingPong

Prophet (4093)

PingPong의 아바타

11-08-2009, 15:07

@Gasparini:
As said, it's not possible to show in the same time more than 4 sprites on a single scan line, that's because there is also a internal VDP limit. While the VDP is able to parse the sat for a 5th sprite, it only have 4 buffers to hold sprite data. So, without flickering, there is no way to do this.

Come detto, non e' possibile mostrare contemporaneamente piu' di 4 sprites su una singola scanline, dal momento che c'e' anche una limitazione interna al VDP. Anche se il VDP e' in grado di scandire la sat per un 5th sprite, esso ha solo 4 buffers per mantenere i dati degli sprite. Senza sfarfallio non c'e' modo di fare cio' che dici.

By ARTRAG

Enlighted (6923)

ARTRAG의 아바타

11-08-2009, 15:23

The code you posted enables alternatively two SATs on odd and even frames,
one at 1B00h, another at 3F80h.
One with magnified sprites, another with normal size sprites.

The code has to be called on the interrupt: you need a loader that links that code to the hook at FD9Fh
Anyway it is all explained in the book...

it is the very same thing you already have been told here
http://www.msx.org/forumtopic10054.html

By gasparrini

Champion (329)

gasparrini의 아바타

11-08-2009, 15:47

Ciao Arturo,

Me lo potresti fare tu, il hook all'indirizzo FD9F, per questi sprite??
Io da solo non ci riesco!

Spero che tu lo possa fare??
Andrea

By wolf_

Ambassador_ (10088)

wolf_의 아바타

11-08-2009, 15:56

English please!

By PingPong

Prophet (4093)

PingPong의 아바타

11-08-2009, 16:09

@Gasparrini:
It's estremely easy: assuming that your routine is placed at address "X" you need to poke the FD9a, fd9b,fd9c with the values:
(also in basic, if the routine is already loaded in RAM)
FD9b with "x" AND 255
fd9c with "x" \ 256
fd9a with &hc3

to disable the routine simply poke 201 into fd9a

BE SURE that fd9a is the *LAST* address you poke otherwise system may hang. The order of instruction above IS important.

By tonigalvez

Champion (311)

tonigalvez의 아바타

11-08-2009, 22:58

There is one way to show more than 4 sprites on the same line on MSX1. Simply rotate the monitor and voila!!! you can show 32 sprites on the same line ;-)

By LeandroCorreia

Paladin (957)

LeandroCorreia의 아바타

12-08-2009, 02:47

Toni Galvez, you're a genious... Big smile

BTW, Since "Flicky" tries to put about 10 sprites in a row, I guess it's an aptly named game. Wink

페이지 1/2
| 2