meisei 1.2.2

by hap on 21-10-2008, 18:59
Topic: Emulation
Languages:

The MSX1 emulator meisei, known for its somewhat unconventional yet interesting features, has been updated with support for tape images and a couple of VDP fixes. To get it, head to hap's homepage.

Relevant link: hap's homepage

Comments (31)

By hap

Paragon (2017)

hap's picture

21-10-2008, 19:58

complete list of changes (from http://hap.samor.nl/meisei.txt )

- tile and sprite viewer can be resized
- added support for fMSX CAS images (tapes), including the ability to save separate blocks, and import common MSX files normally meant for MSX disks. Be aware that you'll need an official BIOS ROM to be able to play tape games.
- PSG: moved chip type configuration to the GUI
- VDP: added chip type configuration: TMS9118, TMS9129, TMS9918, and TMS9929 (TMSxx18 is NTSC/J, can also be TMSxx28. TMSxx29 is PAL)
- VDP: enabled 4KB mode address bus mangling for TMS99xx
- VDP: added M3 sprite cloning quirk
- fixed tile viewer screen loader BLOAD header detection

By Huey

Prophet (2642)

Huey's picture

22-10-2008, 00:37

Thanks \o/

Especially on the M3 thingie and the sprite resize-ing.

By ARTRAG

Enlighted (6173)

ARTRAG's picture

22-10-2008, 00:59

how do you activate the M3 issue ?

By Manuel

Ascended (15362)

Manuel's picture

22-10-2008, 14:11

About the videochips: isn't this a matter of PAL (xxx9) vs NTSC (xxx8)? Or are there more differences?

By hap

Paragon (2017)

hap's picture

22-10-2008, 18:53

The 3rd digit of TMS VDP, "1" or "2" is related to video output.

ARTRAG: The M3 issue is always emulated, you don't activate it with a GUI checkbox or something, try:
10 screen2:sprite$(0)="BLA":vdp(4)=0: putsprite8,(0,0),15,0
20 goto20

By ARTRAG

Enlighted (6173)

ARTRAG's picture

22-10-2008, 20:08

ah!
Are you sure it actually works like this on ANY msx1 ?
In case not, can you add a switch to disable it?

By hap

Paragon (2017)

hap's picture

22-10-2008, 20:23

It happens on all TMS VDPs (that don't overheatTongue), I'm not going to emu/simulate the temperature related sprite deteriorating problem.

By ARTRAG

Enlighted (6173)

ARTRAG's picture

22-10-2008, 20:26

I surrend.
We use the so called hybrid mode in our game engine.
If this is the situation we will need to change strategy......

CryingCryingCryingCryingCrying

By hap

Paragon (2017)

hap's picture

22-10-2008, 20:28

If you just use sprites 0-7, or don't use sprites in the 0-63 area, it's not a problem.
How many MSX1s did you test it on?

By ARTRAG

Enlighted (6173)

ARTRAG's picture

22-10-2008, 20:41


If you just use sprites 0-7, or don't use sprites in the 0-63 area, it's not a problem.
How many MSX1s did you test it on?

I do not fully understand.
When you say "sprites 0-7" you mean planes in the SAT. Do you?
What you mean when you say "don't use sprites in the 0-63 area" ?
Are you referring to sprite patterns ?
In case, with 16x16 sprites (whoese patterns are counted times 4), what you mean exectly ?

PS
I tested it only on msx2 and TR, I do not have any msx1 for testing Sad

By hap

Paragon (2017)

hap's picture

22-10-2008, 20:50

sprites 0-7 in the sprite attribute table, yes
0-63: vertical position

If you want your engine tested, come to #openmsx on freenode, I'm sure manuel (Quibus), who owns many MSXes, is willing to try it.

By ro

Guardian (4073)

ro's picture

22-10-2008, 21:30

I don't know, what does that sprite stuff do? (or DON't) a bug in VDP?
(sorry, haven't tested your basic on msx)

By hap

Paragon (2017)

hap's picture

22-10-2008, 21:36

By dvik

Prophet (2200)

dvik's picture

22-10-2008, 21:47

I had a similar emulation in blueMSX 2.5 or 2.6 but there are some games that actually don't work with this emulation that apparently works on at least some MSXes. I can try to remember which MSX1 games assumed non-mirrored VDP but I don't have the info here.

I'm quite sure that this mirror thing is not present in all video chips used in MSX1 machines. If it were, there wouldn't be any games out there that fails because of the mirroring effect in emus.

By dvik

Prophet (2200)

dvik's picture

22-10-2008, 21:55

Btw, another cool TMS /V9918 feature you can look at emulating the 4/16kB. This is also emulated in blueMSX but disabled because I'm missing some information that makes it work incorrectly in a few cases. But basically, if 4kB VRAM is programmed in R0 (or R1), the top 12kB slowly resets when the display is disabled. I verified the behavior against my CX5M and it looks the same. The final value of the RAM after being powered off depends on the RAM chips though, and I only emulated the behavior of my MSX.

By hap

Paragon (2017)

hap's picture

22-10-2008, 22:02

IIRC the blueMSX implementation also mirrored the first 8 sprites, which would make games like Dr Archie and The Ice King look glitchy.

... But basically, if 4kB VRAM is programmed in R0 (or R1), the top 12kB slowly resets when the display is disabled. ...It's the "slowly" part that stops me from emulating it.

By dvik

Prophet (2200)

dvik's picture

22-10-2008, 22:09

IIRC the blueMSX implementation also mirrored the first 8 sprites, which would make games like Dr Archie and The Ice King look glitchy.

Ah, maybe thats the problem then. I didn't investigate it further. If you are confident that you know the behavior, we should add it back to blueMSX and add the different VDP types to the configuration.

By hap

Paragon (2017)

hap's picture

22-10-2008, 22:19

I'm almost certain that the behaviour (what the user can see/measure) is correct in meisei, based on tests, and eg. the Alankomaat flame effect looks exactly the same like in the video. But I'm also almost certain that the implementation is not correct, the cause is probably at a much lower level (and not just that meisei has a scanline renderer instead of pixel perfect)

By ARTRAG

Enlighted (6173)

ARTRAG's picture

22-10-2008, 23:05

Hap, how do you run bandwagon's demos on meisei without having disk support ?

By hap

Paragon (2017)

hap's picture

22-10-2008, 23:15

Put DSK2ROM.ROM ( http://home.kabelfoon.nl/~vincentd/ ) in the same folder as meisei.exe, and insert the disk image into a cartridge slot as if it were a ROM (don't try that on a real MSX ;) ).
You'll also need an official BIOS ROM instead of CBIOS, but I think you know that already.

By ARTRAG

Enlighted (6173)

ARTRAG's picture

22-10-2008, 23:57

Done!
And it is a true pleasure to look at the tiles and sprites during these demos...
Tile viewer is great !!!

Only I note that even when M3 is set, the addresses of PGT and CT are far from being 0x0000 or 0x2000 (in Alankomaat).

Is there some VDP trick I do not know, or the number meisei displays are wrong?

[offtopic]
what is the last effect:
#12 / ending pic
- extra high res. (256x384)
interlaced
how is it done?

By hap

Paragon (2017)

hap's picture

23-10-2008, 00:20

Some parts use pattern table mirroring, some parts don't. If it's used, you'll also see "p0 p0 p0" instead of "p0 p1 p2" to the left of the tile viewer.
The interlaced effect is an illusion, done by quickly switching tables. dvik has done one too, using a mixed mode (called scr05.rom, dvik got a link?)

By ARTRAG

Enlighted (6173)

ARTRAG's picture

23-10-2008, 00:22

the same flaw in the addresses of the tile viewer appears with my code.
maybe the hybrid modes play havoc with address computations

By hap

Paragon (2017)

hap's picture

23-10-2008, 12:58

It works fine here, copy paste this (press a key to switch between normal and mirrored):
10 screen2:line(0,0)-(255,191),15
20 a$=input$(1):vdp(4)=vdp(4)xor3:goto20

http://samor.nl/hap/crap/tileviewm31.png
http://samor.nl/hap/crap/tileviewm32.png
- PGT at the top updates
- px px px at the left updates
- mouse hover info at the bottom updates
- detailed tile data only updates when you click on a tile

By ARTRAG

Enlighted (6173)

ARTRAG's picture

23-10-2008, 13:53

Maybe there is some misunderstanding on the meaning of PGT and CT in meisei....
The pictures show exactly what I mean.

In standard screen 2 we have that r4=3 and that the pattern generation table starts at 0x0000
In your televiewm31.png you can read PGT=1800h : what you mean by this ?
Are you pointing to the end of the table and not to the start ?

In "mirror mode", where r4=0, the pattern generation table starts again at 0x0000h.
In your televiewm32.png you can read PGT=0000h : what you mean by this ? (it could be correct but than you do not point to the end...)

Again about colors, in standard screen 2 the colors start at 0x2000.
You say CT = 0x3FC0 in both pictures. What you mean ?
This address isn't neither the end of the CT (which should be 3800h IIRC)

By hap

Paragon (2017)

hap's picture

23-10-2008, 14:09

Ah Smile it's the exact contents of reg 4 and 3, shifted to the left, this way it also provides info on masking in M3.
If you want to know the start of the table, it's trivial to do AND 2000h in your head.

By hap

Paragon (2017)

hap's picture

23-10-2008, 14:43

Aw, I edited my post and it didn't work, I guess edit-allowed-time expired Tongue

Here's dvik's interlace effect. If you want to closely see what's going on, pause meisei and press F12/F11 to advance/go back one frame.
http://samor.nl/hap/crap/dvik_scr05.zip

By ARTRAG

Enlighted (6173)

ARTRAG's picture

23-10-2008, 16:02

Amazing!
Is this done by just swapping the PGTs?

If yes -the debugger seems to confirm-, why does it look like double X resolution?

BTW Daniel's demo seems in screen 0 and with double horizontal resolution.
(64 columns - or 80? I cannot count )

IIRC Bandwagon's effect is in screen 2 with double vertical resolution.
Are those effects the same?

By dvik

Prophet (2200)

dvik's picture

23-10-2008, 16:37

Yes these effects are essentially the same.

I made an even nicer implementation of the 64 column mode in the Illusuions demo (MSX1 only). This part is using screen 2 but unfortunately it doesn't work on all real MSXes because its using a mirrored color table. The nice thing with the screen 2 version is that its actually a 'real' 64 column mode. I have primitives to write characters, scroll lines vertically etc. The screen 0.5 version is a static image rendered from a piece of text, but its not that useful.

I haven't tried Illusions in meisei yet, but I'd like to do it soon and see if the color table mirroring is emulated.

By dvik

Prophet (2200)

dvik's picture

24-10-2008, 07:01

Unfortunately I wasn't able to get the Illusions demo to run (didn't really put that much time into why) but I ran Utopia and MSX Unleashed and its really fun to see the tile editor. Meisei runs both demos really well, only blueMSX and openMSX does it better, but meisei is far better than MSXPlayer, nlMSX and the other emus out there. As far as issues running the demos, its maily when pixel accuracy is needed or assumed, other than that its doing a great job.

For effects in the demos its kindof cool to look at for example the intro to MSX Unleashed and the Bouncing scroller in the same demo. The tile editor really highlights the shortcuts the demo makes to make the effects possible. A bit of a spoiler I guess Wink I'll do some more work to get Illusions running as well, not sure if its something I'm doing wrong or if its a bug in the emulator....

By hap

Paragon (2017)

hap's picture

24-10-2008, 07:59

It should work fine once you've set up disk image support. SmilePut DSK2ROM.ROM ( http://home.kabelfoon.nl/~vincentd/ ) in the same folder as meisei.exe, and insert the disk image into a cartridge slot as if it were a ROM (don't try that on a real MSX ;) ).
You'll also need an official BIOS ROM instead of CBIOS, but I think you know that already.