Writing / Reading VRAM - noob questions

Страница 5/9
1 | 2 | 3 | 4 | | 6 | 7 | 8 | 9

By gdx

Enlighted (5690)

Аватар пользователя gdx

15-12-2021, 01:06

Pay attention to keyboard matrices if using SNSMAT.

https://www.msx.org/wiki/Keyboard_Matrices

Use common keys as much as possible.

By siudym

Resident (39)

Аватар пользователя siudym

15-12-2021, 15:22

I am having trouble copying 1024 binary nametable to WRAM. Unfortunately, I do not have a WRAM preview in the emulator and I do not know if it is working properly. From what I can see it is copying incorrectly.

Binary is 1024 bytes, but only 768 will be used - the end of the load is marked with the FF pointer (tile FF as the indicator of when the loop is to end).

CopyNT:

	LD HL,NameTable						; src
	LD DE,$C000						; dst

CopyNT_Loop:

	LD A,(HL)
	CP $FF
	JR Z,CopyNT_End
	LDI
;;;;	INC DE                           ;problem here....
	JR CopyNT_Loop

CopyNT_End:

NameTable:	incbin "demo.nam" 	; 1024 byte binary nametable map (

Does writing to WRAM in MSX require anything else? Because the function should work.

EDIT:....
Ehh.., everything is fine, I can't delete the post - I didn't notice the additional INC DE (used before when I copied nametable every other byte). Now everything is ok. LOL!

By thegeps

Paragon (1062)

Аватар пользователя thegeps

15-12-2021, 21:57

Well, instead searching for a value you can simply copy 768 bytes:

Ld hl,nametable
Ld de,$c000
Ld bc,768
Ldir

By ARTRAG

Enlighted (6862)

Аватар пользователя ARTRAG

15-12-2021, 22:05

It is not completely clear what you are trying to do.
If want to copy ram to ram, it can be done more efficiently using LDIR, refer to z80 docs about its working.

[Edit]
As thegeps said. Your solution is not only slower but also buggy as an FFh in the data would be interpreted as delimiter

By Grauw

Ascended (10618)

Аватар пользователя Grauw

15-12-2021, 22:02

OpenMSX has a debugger where you can inspect all memory.

By siudym

Resident (39)

Аватар пользователя siudym

16-12-2021, 10:46

I have no idea how to run Debugger in OpenMSX ...

My first test demo on MSX:
https://dl.dropboxusercontent.com/s/cyompte6mj3j1xm/msxdemo.rom
(Cartridge 32KB, SCREEN 1 mode)

It may not be anything spectacular at the beginning, but I am satisfied with it. Maybe I will come back to MSX in a while and write a simple game.

By Grauw

Ascended (10618)

Аватар пользователя Grauw

16-12-2021, 10:50

siudym wrote:

I have no idea how to run Debugger in OpenMSX ...

You can download the debugger from https://openmsx.org/. It’s a separate application.

siudym wrote:

My first test demo on MSX:
https://dl.dropboxusercontent.com/s/cyompte6mj3j1xm/msxdemo.rom
(Cartridge 32KB, SCREEN 1 mode)

Looks nice! It’s almost a game already!

By ARTRAG

Enlighted (6862)

Аватар пользователя ARTRAG

16-12-2021, 18:06

@siudym Greetings! It looks colorful and well animated
You should definitely try to develop a game! I see potential
The force is strong with you
Wink Wink Big smile

By santiontanon

Paragon (1653)

Аватар пользователя santiontanon

16-12-2021, 18:54

oh wow, very cool!!! Jet Set Willy is back!!! I like how the enemies know how to jump, etc. very nice!! Impressive you got to this point so fast!

Also, you can deactivate that annoying click sound when you press a key by writing a 0 to "CLIKSW" (#F3DB).

By jltursan

Prophet (2619)

Аватар пользователя jltursan

16-12-2021, 18:57

Niiiice!, if you're targetting a MSX1 machine you can give it a try to Meisei emulator. Good enough to start with and has useful tools like the ones you're looking for (great VRAM viewers and so on).

OpenMSX has no MSX1 VRAM viewers, only MSX2 bitmapped modes can be inspected...

Страница 5/9
1 | 2 | 3 | 4 | | 6 | 7 | 8 | 9