Are you saying it's impossible to access the VDP at all outside of vertical refresh? That waiting with NOPs doesn't really help?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.
TMS9918/9928/9929 programming
Re: TMS9918/9928/9929 programming
Re: TMS9918/9928/9929 programming
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.
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.
Re: TMS9918/9928/9929 programming
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?
Re: TMS9918/9928/9929 programming
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.
Re: TMS9918/9928/9929 programming
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
Remember me on the Amiga HAM Mode.
http://vik.cc/dvik-joyrex/download/105Colors.ppt
-
- Posts: 41
- Joined: Mon Feb 05, 2018 9:23 am
- Contact:
Re: TMS9918/9928/9929 programming
[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
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.
-
- Posts: 41
- Joined: Mon Feb 05, 2018 9:23 am
- Contact:
Re: TMS9918/9928/9929 programming
I have figure this out and I have managed to implement some graphics in my game!