Correct usage of VDP ports following the standard

Page 13/18
6 | 7 | 8 | 9 | 10 | 11 | 12 | | 14 | 15 | 16 | 17 | 18

By Grauw

Ascended (8452)

Grauw's picture

11-06-2017, 14:48

I think they don’t, leave it up to the composer to fiddle with AR / RR values and alternate channels. I know some of Impact’s music has audible clicks in it (I thought it was an emulation issue but the real hardware had it too).

By sd_snatcher

Prophet (3068)

sd_snatcher's picture

11-06-2017, 16:50

ARTRAG wrote:

Expecialy the Uridium 2 and the Total parody engine relies on exact timing to build on fly the borders on the active page using the z80 while the vdp is rendering a certain part of the screen and the copy engine is moving a slice of the screen in order that anything is completed before the screen split occurs.
Add a cycle per pixel and the z80 will miss the line, add a pixel in the copies and the vdp engine will not end its task in time (and you cannot execute vdp commands and change R#18 at the same time without corrupting the copy).

Such astringent timing requirements are usually a call for problems in the MSX world. Have you tested this code in any machines that feature the T9763, T9769, T9769A or T9769B chipsets? Those chipsets add 1 or more extra cycles to the VDP I/Os. This will trigger race condition bugs on poorly designed algorithms based on software timing.

Race conditions bugs are a well documented type of design mistakes. I heavily recommend this wiki article for more info on the topic.

By ARTRAG

Enlighted (6244)

ARTRAG's picture

11-06-2017, 17:11

Do not worry. My code works perfectly even on msx TR - using the T9769C (in z80 and R800 mode) where it has been tested extensively on the real thing. Should I release it as a ROM game, it will be much more compatible with the msx machines than you can expect.
Thanks for the hint, but HW race conditions are rather a problem of yours, if you develop new HW, not mine.

I suspect you are thinking to release some machine not using ports 98h and 99h or with other HW hack formally complying with the msx guidelines. If you do not want to take care of the existing SW, good luck to you.

By sd_snatcher

Prophet (3068)

sd_snatcher's picture

11-06-2017, 22:02

The T9769C isn't on that list of chipsets, as it doesn't insert extra waitstates. Testing with the Z80 in a TR will be irrelevant for this case.

But since you said that you tested and it works with the R800, it means that the cycle timing requirements are not even close to be as tight as you believed, because (you probably know) the S1990 inserts *a lot* of waitstates between VDP accesses. It's a clear signal that there are plenty of cycles free to accommodate that difference.

Maybe I haven't made myself clear, but the race conditions I mentioned are software race conditions and not hardware ones. The be very specific, let me rectify it:

The differences that exist in hardware timings will trigger software racing condition bugs in poorly designed algorithms that rely on software timing.

According to what you said, it's not the case of your software.

Quote:

I suspect you are thinking to release some machine not using ports 98h and 99h or with other HW hack formally complying with the msx guidelines. If you do not want to take care of the existing SW, good luck to you.

You got me confused with this statement. Since you already said that you have every piece of hardware that you ever wanted and that you're not interested in anything new, why would any hardware released after 1992 raise your suspicions or be of your concern?

By ARTRAG

Enlighted (6244)

ARTRAG's picture

12-06-2017, 16:20

I do not know how you code (very badly probably) but in order to not incur in the delay of 52 R800 cycles, the I/O opcodes are interleaved with other useful operations. The borders in Uridium, as the Raycasting demo, are plain case of non linear access to the VRAM, so nothing is wasted, do not worry, free cycles are maybe in your code not in mine.
You can even study the rendering code in the comments of this https://www.youtube.com/watch?v=8ffvdvpePY8. It could be surprising, but you could learn something looking at the above sources (the renderers are Wouter's art, not mine, I cannot fly that high).

About the second question, your dull insistence in evidently irrational arguments trying to state that it is better to castrate the SW development in order to provide "compatibility" with the HW that will come (??) in a standard dead 30 years ago has to come from your personal interest in selling your HW (a latter option is less flattering so I will stay to the former).

By Sander

Ambassador (1845)

Sander's picture

12-06-2017, 00:31

@Artrag; I value your expertise, but your last comment sounds a bit hostile to me. I taste a bit Bios vs maximum performance here; which are good goals to pursue both imho. How about agree to disagree? No need to question each other programmer skills. I ( And I know many others) like your achievements in programming but I also like FRS's his efforts in doing things by the (red) book. His work on the MSX Audio bios found it's way in hundreds of upgrade boards so clearly there is a market for it too ( please continue your work also FRS!). Please don't make this forum a fighting arena. We are all right, in our own way. Thnx.

By syn

Paragon (1920)

syn's picture

12-06-2017, 00:37

Artrag your link doesn't work, it points to my own videos (or anyone else's).

Regarding this whole topic, it seems we all have our own opinions about the matter and after so many years, it is hard to change those. So imho just do whatever you want: You feel comfortable doing everything through bios, fine. Want do use direct IO? go for it.

By Piter Punk

Master (202)

Piter Punk's picture

12-06-2017, 02:24

ARTRAG wrote:

I suspect you are thinking to release some machine not using ports 98h and 99h or with other HW hack formally complying with the msx guidelines. If you do not want to take care of the existing SW, good luck to you.

Any machine with an external MSX1->MSX2 adapter uses ports 88h-8Bh, this is what the NEOS MA-20 does. Last year, user fzanoto developed an NEOS MA-20 clone. Also, using the ports 88h-8Bh is the only upgrade path available in machines that uses the T7937 engine, like the Expert Plus and Expert DD Plus. In the 90's Ademir Carchano sold upgrade kits for these machines.

Most japanese games works fine using the alternate VDP ports, at least most of the games that I had access in the 90's.

EDIT: change 'released' to 'developed'

By Piter Punk

Master (202)

Piter Punk's picture

12-06-2017, 02:23

syn wrote:

So the MA-20 works with just a small portion of the existing software? How many of those devices are in circulation and actively used right now?

Most japanese games works OK with MA-20. To play problematic MSX1 games you can remove the expansion. Sadly, to play problematic MSX2 games there is nothing to do.

By Wlcracks

Champion (325)

Wlcracks's picture

12-06-2017, 09:46

cut the tms vdp out and reroute the ma-20 out ports to 99 98, change the bios and burn it.

Page 13/18
6 | 7 | 8 | 9 | 10 | 11 | 12 | | 14 | 15 | 16 | 17 | 18