how to set up Screen 10,11 and 12.

Page 1/2
| 2

By mfrissen

Rookie (19)

mfrissen's picture

18-01-2005, 01:04

Hi, i'm working om a little program for msx-dos that have to work in msx2+ screen modes.

I olready figured out how to call the msx2 subrom from dos, but can somebody please give me a hand how to set screen 10,11 and 12 ?

i use the folowing routine to call the sub rom (recomended way by ASCII)

CallSRom: exx
ex af,af'
ld hl,015fh
push hl
ld hl,0C300h
push hl
push ix
ld hl,021DDh
push hl
ld hl,03333h
push hl
ld hl,00h
add hl,sp
ld a,0C3h
ld (0fdd6h),a
ld (0fdd7h),hl
ex af,af'
exx
ld ix,0066h
ld iy,(0fcc0h)
call 001ch
exx
ex af,af'
ld hl,10
add hl,sp
ld sp,hl
ex af,af'
exx
ret

This little routine sets mode 0 - 8.

SetScreen: ld ix,00d1h
Call CallSRom
ret

Thanks !

Login or register to post comments

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

18-01-2005, 01:21

For screen 11 and 12 (screen 10 only exists in BASIC, it's not really a mode) just set the appropriate bits of VDP register 25. Use the BIOS to switch to SCREEN 8 if you want, and then set bit 3 of register 25 to turn YJK mode on. This would be what BASIC calls SCREEN12. If you also set bit 4 (YAE) you set it to YJK Attribute Enable mode, ie YJK+Palette mode. This BIOS keeps a mirror of register 25 at $FFFA, in case you want to update this neatly...

Good luck Wink

By mfrissen

Rookie (19)

mfrissen's picture

18-01-2005, 01:24

I already found one document (at the website of Hans O) but what i'm looking for is a bios method , so that the normal bioscalls for drawing on the screen are useful too.

By mfrissen

Rookie (19)

mfrissen's picture

18-01-2005, 01:30

ow hehe , i posted at the same time as you Sonic Wink

So , if i adjust 0fffh to i should be able to use the bios routines for drawing too ..

Wel thats something to figure out...

Thanks!

By NYYRIKKI

Enlighted (5426)

NYYRIKKI's picture

19-01-2005, 08:16

Just a guess, but you might need to update also screen mode (#FCAF) to use BIOS drawing routines.

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

19-01-2005, 08:46

ow hehe , i posted at the same time as you Sonic Wink

So , if i adjust 0fffh to i should be able to use the bios routines for drawing too ..

Wel thats something to figure out...

Thanks!Erm.... the address is FFFA (dec 65530) not 0FFFh.... I preceed my hex numbers with a $, some other ppl do too... I've been told this is a horrible horrible thing tho... Tongue

By AuroraMSX

Paragon (1901)

AuroraMSX's picture

19-01-2005, 10:10

I preceed my hex numbers with a $, some other ppl do too... I've been told this is a horrible horrible thing tho... Tongue
Depends on the assembler you're using. IIRC, gen80 uses $DEAD whereas other assemblers use #DEAD, 0DEADh or even 0xDEAD. A lot of assemblers use $ as a placeholder for the Location Counter, which would make $DEAD a bit of a confusing notation...

By NYYRIKKI

Enlighted (5426)

NYYRIKKI's picture

19-01-2005, 12:39

IIRC gen80 accepts at least $****, #**** and 0****h syntax. I have not tested 0x**** format.

By mfrissen

Rookie (19)

mfrissen's picture

19-01-2005, 12:42

I got the screen 10/11 and 12 modes nice working in a routine called with in A the mode number --same as in basic to keep it simple--.

Right now i'm coding to conversion routines for yck -> rgb and rgb->yck, formula's arn't that difficult... but i want them to be abl to load/save bmp/pcx files and to convert to screen 8->12 and 12->8 afcourse.

only thing tha remaines after that is to utilize the HBI-V1 rom-subroutines to digitize too Wink --this is discussed in HBI-V! topic--.

By the way, ik use tniASM cross-assembler for msx-dos and wbass for bloadeble code .
I use BleuMSX tot test my code written with tniASM but it seems to put the directory i insert in a drive in to an internal diskimage like format, so eachtime i want to test the newly written code i have to reset BlueMSX ... thats the only disadvantage.

By sjoerd

Hero (593)

sjoerd's picture

19-01-2005, 12:46

Why don't you use tniASM for bloadable code?

By Sonic_aka_T

Enlighted (4130)

Sonic_aka_T's picture

19-01-2005, 13:08

'cause WB is really great for quickly testing something. ASM, GO $C000. When you're reading BMPs btw, keep in mind they're stored upside down... -for your convenience- I could've sworn I did something wrong the first time I tried to rip some RAW data from a BMP! Tongue

Page 1/2
| 2