TMS9918/9928/9929 programming

Talk about programming CreatiVision (except games programming). Projects of homebrew hardware are also welcome.
User avatar
TBCTBC
Posts: 64
Joined: Wed Mar 13, 2013 1:27 pm
Location: Solna, Sweden
Contact:

Re: TMS9918/9928/9929 programming

Post by TBCTBC » Sat Sep 07, 2013 9:05 pm

Mobsie wrote:yes, but on both machines are great experts there. As a beginner in VDP programming all try the same way to handle the writing, and this is try nop`s to slow down the access. First here they take CPU power/cycles for nothing, second this dont really help because the error can happen when you first set your write adress.
In this little time when at the same time the VDP is render the screen you got wrong adress and then when you write you see the mistakes on screen.
I see my english is strange today, sorry for that.
Are you saying it's impossible to access the VDP at all outside of vertical refresh? That waiting with NOPs doesn't really help?
User avatar
Mobsie
Posts: 717
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: TMS9918/9928/9929 programming

Post by Mobsie » Sun Sep 08, 2013 7:22 am

Hi, Not impossible but very Hard. If the error comes from the Part Wehre
you Set the Adress to Write, Then the nop dont help.
And this you dont know if you Not Double Check After Each Set.
So for me was the best Way all to do in vbi, i have my Sprite table
and make all the changes here and in the vbi i Push this table complete
to the VDP with Rotation to fix the 4 Sprites Limit. So i have a multiplexer
and no VDP Trouble in One step. For the Map tiles etc. i Collect the changes
and modify also in vbi. There is enough Time. And i dont like to burn CPU
Power with nop.
User avatar
TBCTBC
Posts: 64
Joined: Wed Mar 13, 2013 1:27 pm
Location: Solna, Sweden
Contact:

Re: TMS9918/9928/9929 programming

Post by TBCTBC » Sun Sep 08, 2013 9:32 pm

Well, if you don't try to write too fast, you should never get any error. There's also no way to double check anything, since there's no way to read the current vram adress right?
User avatar
carlsson
Posts: 514
Joined: Fri Jun 13, 2008 7:39 am
Location: Västerås, Sweden

Re: TMS9918/9928/9929 programming

Post by carlsson » Mon Sep 09, 2013 12:58 pm

Isn't the problem that BIOS will run code that reads the status register, so between your setup to read or write to the VDP there may occur an interrupt, and the next instruction where you actually send data may go to a different address than you intended? As you remember, I added quite a lot of NOP but didn't seem to cure my problems earlier this year. Of course, all read and writes while interrupts are disabled work perfectly fine, I didn't find any reason to slow those down. The problems occurred as soon as I enabled the interrupts within the program.
User avatar
Mobsie
Posts: 717
Joined: Fri Jun 13, 2008 10:38 am
Location: Weinheim, Germany

Re: TMS9918/9928/9929 programming

Post by Mobsie » Sun Sep 15, 2013 8:38 am

If someone Need something to read, here is the 105 Color Mode.
Remember me on the Amiga HAM Mode.
http://vik.cc/dvik-joyrex/download/105Colors.ppt
Fabrizio Caruso
Posts: 41
Joined: Mon Feb 05, 2018 9:23 am
Contact:

Re: TMS9918/9928/9929 programming

Post by Fabrizio Caruso » Fri Oct 04, 2019 9:13 am

[SOLVED!]

Hi

I would like to understand how to write into video memory in order to redefine characters and set their colors in mode 1.

I have done this already on the MSX in C (by using Z88DK):
https://github.com/Fabrizio-Caruso/CROS ... graphics.c

This is possible by using the command or macro VPOKE(video memory address, value to write).

I see that such command is implemented in a complicated indirect way.
Who could please help me implement such command?

In my MSX example I simply write into video memory to redefine characters and set their colors.

Fabrizio
Last edited by Fabrizio Caruso on Mon Oct 14, 2019 3:12 pm, edited 1 time in total.
Fabrizio Caruso
Posts: 41
Joined: Mon Feb 05, 2018 9:23 am
Contact:

Re: TMS9918/9928/9929 programming

Post by Fabrizio Caruso » Mon Oct 14, 2019 3:12 pm

I have figure this out and I have managed to implement some graphics in my game!
Post Reply