Plotting a single dot on screen

Page 4/4
1 | 2 | 3 |

By Chilly Willy

Expert (65)

Chilly Willy's picture

09-02-2021, 18:07

Never offended.

I am used to redundant answer from old yahoo message boards.

Hey, what is the best treatment for cancer.
WELL WHY DO YOU WANT TO BE CURED....
That kind of thing.

I appreciate all the help I can get.

By Chilly Willy

Expert (65)

Chilly Willy's picture

09-02-2021, 18:10

Grauw wrote:

Btw, I could swear I saw another thread with this same question last month, but I can’t find it.

Edit: Ah, it was here: https://www.msx.org/forum/msx-talk/development/software-spri...

Grauw wrote:

The 256×192 pixels of screen 2 are organised as 8×8 patterns in a grid of 32×24. Each 8×8 pattern is made of 8 bytes. By default the name table is set up so that the patterns patterns follow each other in sequence from left to right top to bottom.

You need to first calculate the address of the byte in the pattern table: base address | ((y & 248) << 5) | (x & 248) | (y & 7). Then you read that byte from VRAM, set bit x & 7, and write it back.

Hopefully that provides enough of a starting point to get the grasp of it.

| = or
& = and
<< = left shift

Note that add a,a and add hl,hl are quick alternatives to sla r.

Seriously...
That was one of the other questions and I never connected the two.
Way too much on my mind....

Thanks

By thegeps

Paladin (860)

thegeps's picture

09-02-2021, 18:27

the example routine I've posted use two bios routine to read from vram/write to vram but they are easy to rewrite:

write_vram:
 push af
 ld a,l
 di
 out (99h),a
 ld a,h
 or 64
 ei
 out (99h),a
 pop af
 out (98h),a
 ret

read_vram:
 ld a,l
 di
 out (99h),a
 ld a,h
 ei
 out (99h),a
 in a,(98h)
 ret

By Chilly Willy

Expert (65)

Chilly Willy's picture

12-02-2021, 05:18

thegeps wrote:
I have a ready routine in the book I read to learn msx asm coding. Never tried ot but it should work:

BTW...
What is the name of the book.
I am up for any reading that will help me create beautiful MSX games

By thegeps

Paladin (860)

thegeps's picture

12-02-2021, 08:04

My book is in italian language but I think you could find the english version.

MSX linguaggio macchina
C.I. Burkinshaw
R. Goodley

And... found english version (and a lot of msx coding books) here:

https://technology-with-fadi.blogspot.com/2018/12/biggest-co...

By Chilly Willy

Expert (65)

Chilly Willy's picture

12-02-2021, 17:40

thegeps wrote:

My book is in italian language but I think you could find the english version.

MSX linguaggio macchina
C.I. Burkinshaw
R. Goodley

And... found english version (and a lot of msx coding books) here:

https://technology-with-fadi.blogspot.com/2018/12/biggest-collection-of-msx-books.html?m=1

THANK YOU!!!!
From the bottom of my heart.
Everything I ever wanted to know is in the first two books that I looked at.

If this information was not widely know then it should be.

By thegeps

Paladin (860)

thegeps's picture

13-02-2021, 01:06

Wink

Page 4/4
1 | 2 | 3 |