VOOZH about

URL: https://qiita.com/Stosstruppe/items/a6c1b3a532bc89718903

⇱ MSX screen8サンプル #Z80 - Qiita


👁 Image
2

Go to list of users who liked

0

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@Stosstruppe

MSX screen8サンプル

2
Last updated at Posted at 2018-07-18

参考
3章 MSX2の画面モード - テクハンwiki
Appendix A.1 BIOS 一覧 - テクハンwiki

pset.c
/*
z88dk / WebMSX
zcc +msx -lndos -create-app -bnpset pset.c
*/

int gttrig(char num)
{
# asm
	ld	a, l		; num
	call	$00d8		; GTTRIG
	ld	l, a
	ld	h, 0
# endasm
}

void nwrvrm(int addr, char data)
{
# asm
	ld	ix, 0
	add	ix, sp
	ld	a, (ix+2)	; data
	ld	l, (ix+4)	; addr
	ld	h, (ix+5)
	call	$0177		; NWRVRM
# endasm
}

void chgmdp(char mode)
{
# asm
	ld	a, l		; mode
	ld	ix, $01b5	; CHGMDP
	call	$015f		; EXTROM
# endasm
}

void main()
{
	chgmdp(8);

	int addr = 0;
	for (int y = 0; y < 212; y++) {
		for (int x = 0; x < 256; x++) {
			nwrvrm(addr++, x);
		}
	}
	while (! gttrig(0)) ;
}

👁 WMSX Screen.png

2

Go to list of users who liked

0
0

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2

Go to list of users who liked

0