[V9990] Q&A Official Thread

Page 12/23
5 | 6 | 7 | 8 | 9 | 10 | 11 | | 13 | 14 | 15 | 16 | 17

Par hit9918

Prophet (2932)

Portrait de hit9918

12-03-2016, 14:33

The machine code showed only the part of

11015 defusr1 = sx
11020 out &h63,peek(&hf39c) 'r32
11030 out &h63,peek(&hf39d) 'r33

I did not try to make an USR, I kept a pure BASIC demo because it is fast enough.
when I saw the compilers style, I understand why there is whining of running out of code space.
that would need discussion about game engine coding.

Par spacemoai1973

Ambassador (0)

Portrait de spacemoai1973

12-03-2016, 22:29

Why not use inline asm in basickun?

Par tvalenca

Paladin (747)

Portrait de tvalenca

13-03-2016, 04:13

hit9918 wrote:

The machine code showed only the part of

11015 defusr1 = sx
11020 out &h63,peek(&hf39c) 'r32
11030 out &h63,peek(&hf39d) 'r33

I did not try to make an USR, I kept a pure BASIC demo because it is fast enough.
when I saw the compilers style, I understand why there is whining of running out of code space.
that would need discussion about game engine coding.

or, we need a better compiler. one that could compile the BASIC source code.

Par Kai Magazine

Paragon (1428)

Portrait de Kai Magazine

02-04-2016, 18:01

Hello, I just compilated everything I have been gathering for the last copule of months related to gfx9000
This includes the powerbasic demos, many other demos, gbasic, a lot of utilities, libraries, documentation, x-tasy, battle bomber...

Here is a "mega" link to download the rar file:

gfx9000 compilation

I hope this is of any help to anyone.

PS: Sorry if there are some things repeated in the compilation, I did not do a very extensive check in order to avoid repeated contents.

Par tvalenca

Paladin (747)

Portrait de tvalenca

11-10-2016, 18:08

Hello V9990 enthusiasts!

I am having some trouble figuring out how color palletes are used on P1 and P2 video modes. According to the Application Manual, there are 4 palletes of 16 colors available for both P1 and P2 modes. But I could not figure how I select a pallete to use, neither if I can use more than one on the same screen. I suspect that I could use at least one pallete for each Layer. I already know that I can select either pallete for either sprite (bits SC4 and SC5 from sprite attribute table), and there are some info about bits "PLT2" and "PLT3", that suggests that I could use two palletes on each P1 mode layer (and all four of them on P2 layer depending on something that I could not understand at all). But HOW?

Par hit9918

Prophet (2932)

Portrait de hit9918

12-10-2016, 01:33

the low 4 bits in R#13. maybe 2 selector bits per layer.

Par tvalenca

Paladin (747)

Portrait de tvalenca

13-10-2016, 17:48

hit9918 wrote:

the low 4 bits in R#13. maybe 2 selector bits per layer.

And what do I expect as result of messing with these?

Par hit9918

Prophet (2932)

Portrait de hit9918

13-10-2016, 23:32

I made a quick test in emulator. changing those bits made the layers flip to different colors.
things got white coz I didnt bother to init all palette registers.
so. it smells like there are the layer palette selector bits that you wanted.

Par assembler

Champion (417)

Portrait de assembler

14-10-2016, 08:40

There is 4 palettes of 16 colors each.
R#13, bits 0 and 1 selects which palette is used for plane A
R#13, bits 2 and 3 selects which palette is used for plane B
Each sprite has 4 attributes: Y,pattern,X and additional information. Bits 6 and 7 in the last byte (additional information) selects the palette used in sprite.
So, you can use, i.e., the same palette for planes A and B and all sprites (only 16 colors in screen), or at the other end, one palette for plane A, other for plane B and the four pallettes for sprites. (64 colors)

Par assembler

Champion (417)

Portrait de assembler

14-10-2016, 08:46

The only difference with P2 is the distribution of colors in plane A (the only one available)
Each tile has 8 points in horizontal.
The palette of pixels 0,1,4 and 5 are controlled by bits 0 and 1 in R#13
The palette of pixels 2,3,6 and 7 are controlled by bits 2 and 3 in R#13

I guess the most comfortable to work with P2 mode is to use the same palette for the whole tile, because I don't know how you might take advantage of that feature.

Sprites behavior is the same as P1 mode

Page 12/23
5 | 6 | 7 | 8 | 9 | 10 | 11 | | 13 | 14 | 15 | 16 | 17