MSX (1) System Variables in Work Area

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

Por erwinmusik

Master (140)

Imagen del erwinmusik

09-06-2014, 17:35

Thanks a lot.
Now I have a good Workaround. Use my lovely OshonSoft Assembler, check& assemble and then a batch file with tniasm to generate the final binary only with content I need. Perfect.

By the way, Notepad works fine with binary files. Context Looks very nice too, try it later.

I´m not really happy about my Textmode expieriences.
If I start BlueMSX it is in 39x24 Mode. I can do width40 in Basic and everything is fine. If I start my bloaded code, 40 columns are ready as well.
I will find a code in Assembler to do that.....

Por flyguille

Prophet (3028)

Imagen del flyguille

09-06-2014, 20:04

normally, outputing text such as PUTCHR, is more used for DOS-command-line applications.

On basic, PRINT & LOCATE it quite slow, if you are using already machine language, why you don't output directly doing VPOKEs

the formula is for screen0

VPOKE y*40+x, char

or

VPOKE y*80+x, char

respectively for width 40 or 80.

it is a looooooooot faster, but it will not respond to control characters it will draw control characters.

Scroll can be done fast with a tiny assembler routine, and the CLS is just sweeping with 32 or zeroes if you like to work in ASCIIZ on the screen, so then you don't needs to figure out the end of an input.

Por erwinmusik

Master (140)

Imagen del erwinmusik

10-06-2014, 15:44

Ok, thanks.
What will I do?
I will put a lot of Information on a fix Position on the Screen. No Scrolling.
And the whole code in plain assembler
There are two ways I realize:
- use POSIT and CHPUT, as i currently use
- direct load into VDP VRAM via ld (xxh),a where (xxh) a calculated poition y*40+x

By the way: POSIT accepts 0,0 exactly like 1,1 for the first row and line Smile and Ends up with 40,24

Por erwinmusik

Master (140)

Imagen del erwinmusik

10-06-2014, 19:00

Got it!
I studied the BIOS ROM listing at 050Eh INITTXT and found the system variable LINL40. These variable is set to 39 decimal!
Thats the reason why my CX5M and the BlueMSX starts with 39 lines.
Now I can set the screenwidth to 40 lines in my assembler code.

INITTXT: 	EQU 006ch	; init Textmode 40(39)x24
LINL40:		EQU 0F3AEh	; system variable for text init - (preset 27h) 
START:	ld a,28h
	ld (LINL40),a	; change the preset screenwidth of decimal 39 to 40 
	call INITTXT

it clears the Screen and the width is set to 40

perfect!

Por flyguille

Prophet (3028)

Imagen del flyguille

10-06-2014, 21:48

there is some system variable that store the *virtual screen width*. Remember that VDP got the screen always in 40 or 80 columns, anything else is virtualy done by BASIC, there is one variable that if set to 40 or 80 will make POSIT/CHPUT to work properly.

Por erwinmusik

Master (140)

Imagen del erwinmusik

10-06-2014, 23:28

ok, thanks.
After days (maybe only hours) of searching I found my work with Assembler and MSX from two years ago Smile
I´ve done all that work but it´s forgotten, I´ve done some Atmel work in bitween.....and I´m old....

Thats my experience from the past, I´ve done it with direct write to VRAM
have to calculate HL Offset from (TXTNAM)

copied from the BIOS routine

VDAT:      EQU       98h                 ; VDP Register
VOUT:      EQU       99h
.........
VIOUT:     PUSH      AF                  ; save A
          LD        a,l
          OUT       (VOUT),A
          LD        a,h
          AND       63                  ; corrected: 00111111  zeroe bit  7 8, leave 1-5 as they are
          OR        64                  ; set the 6th BIT

          OUT       (VOUT),A
          POP       AF                  ; get A
          OUT       (VDAT),A
          RET

and this works great as well!

Por flyguille

Prophet (3028)

Imagen del flyguille

10-06-2014, 23:24

AND 63 ; 00011111 zeroe bit 6 7 8, leave 1-5 as they are

that is not quite correct. If you want 000xxxxx the value is 31.

or the comment is wrong, it must be ; 0011111 ....

Por erwinmusik

Master (140)

Imagen del erwinmusik

10-06-2014, 23:27

Oh Yes!
The value is right, my description was wrong

now corrected:

          AND       63                  ; 00111111  zeroe bit 7 8, leave 1-5 as they are
          OR        64                  ; set the 6th BIT

MSX Bioslisting Part 1 page 26-1 (62)

Por erwinmusik

Master (140)

Imagen del erwinmusik

14-06-2014, 22:21

AAAHHH! tniasm is good, but it dont accept DEFB! and DEFW as well. It uses DB and DW instead. What a great shit is that? I´ve found a very good Editor Aside (only in german) and bought it. And now this!
I can´t believe, my entire work for the cat......
Does TASm and the other command line Assembler accept DEFB?

Por syn

Paragon (2040)

Imagen del syn

14-06-2014, 23:07

Cant you just use find+ replace? Wink

Anyway, if you dont want to replace the code and want those 2 in your assembler, tniASM v1.0 (in beta, requires donation to join the program) allow custom instructions/macros etc (it is compatible with synthax/instructions of Sjasm and asMSX because of this), so I think maybe you can add those 2 yourself (I dont have experience with this, so I dont know how hard it is to add). Best is contact the author I think Wink

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