Screen 2 using only one pattern table

Door albs_br

Master (157)

afbeelding van albs_br

01-09-2020, 17:34

I did some research but not found the answer: how to make my 3 name tables on Screen 2 point to the same pattern table?
By doing this I would free 4kb of VRAM to be used by other data.

Some small basic/assembly code would be really aprecciated.

Thanks

Aangemeld of registreer om reacties te plaatsen

Van MsxKun

Paladin (951)

afbeelding van MsxKun

01-09-2020, 17:46

That's not an standard VDP mode and won't work on all the MSX1 machines.

Van Grauw

Ascended (9377)

afbeelding van Grauw

01-09-2020, 18:03

The pattern table base address contains bits that are normally required to be 1. Clear the two highest of those bits to mirror the four tables. Do the same for the color table address. They act as an AND on the VDP's VRAM address lookup, so setting them to 0 causes the mirroring effect.

However, note that there are two compatibility issues:

1. The Texas Intruments TMS9918 VDP has problems with sprites in this mode, only the first 8 sprites work and the remaining are cloned.

2. The Toshiba T6950 VDP does not support this at all.

So on pretty much all MSX1 machines this mode has problems. I think only the Yamaha V2220 supports it well (not 100% sure) but that VDP is only used by a handful of rare MSX1 machines. Therefore it is not recommended to attempt to use this mode on MSX1 machines.

The Yamaha V9938/58 VDP properly support this mode fully though. So you can use it on MSX2 and up. But then, might as well use screen 4 instead of screen 2 to gain access to sprite mode 2.

Van ARTRAG

Enlighted (6453)

afbeelding van ARTRAG

01-09-2020, 19:13

Grauw wrote:

1. The Texas Intruments TMS9918 VDP has problems with sprites in this mode, only the first 8 sprites work and the remaining are cloned.

2. The Toshiba T6950 VDP does not support this at all.

So on pretty much all MSX1 machines this mode has problems. I think only the Yamaha V2220 supports it well (not 100% sure) but that VDP is only used by a handful of rare MSX1 machines. Therefore it is not recommended to attempt to use this mode on MSX1 machines.

The Yamaha V9938/58 VDP properly support this mode fully though. So you can use it on MSX2 and up. But then, might as well use screen 4 instead of screen 2 to gain access to sprite mode 2.

More precisely, all Yamaha chips support the mirroring without side effects, while in the TMS9918 VDPs, the glitch on sprites appears if you mirror the pattern table, not when you mirror the color table.
Exploiting this latter fact, it is possible to allocate two pages of tiles without restrictions on the number of sprites. Here you have a demo
https://github.com/artrag/scroll_8_ways
and here a full game
https://github.com/artrag/Uridium-msx1
On machines with Toshiba clones the mirroring won't work. They are not very widespread, nevertheless Uridium has a compatibility mode that, cutting the number of tiles used in the scrolling, allows the game to work also on that chips.
You can look at the sources if you are interested in details