question about color and HBlankInt

For anything related to VDP (plane, color, sprite, tiles)

Moderators: BigEvilCorporation, Mask of Destiny

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Sat Feb 16, 2013 3:35 pm


zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Sat Feb 16, 2013 4:11 pm

I still have some questions did not find out :cry:

Code: Select all

NMI:		MOVEM.L d0-a7,-(sp)
		CMP.W	#$ff,m_IRQFlag
		BNE	?OnlyMusic
		MOVE.W	#$8A30,$C00004	;Set the interval
		MOVE.W	#$8014,$C00004	;Enable IRQ

Code: Select all

IRQ:
		MOVEM.L d0-a7,-(sp)
		MOVE.W	#$8A01,$C00004					;Set new irq Cycle
I set twice interval in NMI(Vint) and IRQ(Hint),The settings in IRQ do not take effect immediately.

Code: Select all

NMI   #$8A30--->$C00004
      ......
NMIEND
      ......
	  SOME TIME

IRQ   #$8A01--->$C00004     ;here changes Interval =0x01
      ......
IRQEND

      Interval--0x30        ;why wait 0x30? I think that will wait 0x01
IRQ1  #$8A01--->$C00004
      ......
IRQ1END

      Interval--0x01
IRQ2
      ......
NextNMIBegin

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Sat Feb 16, 2013 4:29 pm

Image[/img]
Note the white spots on the left,It represents the start of the Hinterrupt.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sat Feb 16, 2013 5:05 pm

Interrupt count is only updated when interrupt happens, not when the count register is written to.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Post by greatkreator » Mon Feb 25, 2013 1:42 am

zhengyaxin, are you aware that it doesn't work on the real device?
just black screen.

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Mon Feb 25, 2013 2:30 am

greatkreator wrote:zhengyaxin, are you aware that it doesn't work on the real device?
just black screen.
I have confirmed that it is good on the real device。These pictures from the interception on the hardware

greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Post by greatkreator » Mon Feb 25, 2013 2:38 am

I tested it on sega genesis 1 and have seen a black screen on my tv.
Did anyone else execute it?

by the way can you use PM on this forum? I have sent you message concerning help in my project.

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Mon Feb 25, 2013 6:24 am

greatkreator wrote:I tested it on sega genesis 1 and have seen a black screen on my tv.
Did anyone else execute it?

by the way can you use PM on this forum? I have sent you message concerning help in my project.
Hardware platform may vary。Which country you are?I calculate the time difference

greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Post by greatkreator » Mon Feb 25, 2013 10:39 am

ntsc sega genesis 1

i am in Ukraine now

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Feb 25, 2013 10:48 am

That screenshot is from real hardware, in 50Hz and at 240 line resolution. This does not work in 60Hz.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Post by greatkreator » Mon Feb 25, 2013 11:19 am

what is reason it doesn't work in 60 hz?

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Feb 25, 2013 12:19 pm

240 line mode is not supported in 60Hz, the VDP will not generate VBlank and VBL interrupt runs in 30Hz. Horizontal ints probably don't work because of it...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Post by greatkreator » Mon Feb 25, 2013 12:26 pm

sadly.
too much restrictions and limitations in the palette switching.
another one confirmation that that is a niche for demos.
sadly.
i have wasted quite a lot time to make it useful in a real project
but not successfully.

by the way TmEE do you know any sega games except Toy Story that used it?

zhengyaxin_8bit
Very interested
Posts: 101
Joined: Thu Sep 04, 2008 2:57 am
Location: China

Post by zhengyaxin_8bit » Mon Feb 25, 2013 3:52 pm

greatkreator wrote:what is reason it doesn't work in 60 hz?
It can work in NTSC and PAL.But the HINT time is shorter in NTSC. if you want to get the better effect,we need to adjust the code. For example,

Code: Select all

 MOVE.W #0x8A02, 0xC00004  ;0x8A01-->0x8A02 
or Upgrade cpu speed of operation. My cpu(TCT6803) allows such

Code: Select all

		move.w	#0x00f7,0xA1630C		|set to NTSC
CheckROMInfo:
		move.w	#0x5350,0xa14480		|raise cpu speed, 0xffff to close,0x5350 for raise
		move.w	#0xBf,0xa14484			|Double cpu speed

greatkreator
Very interested
Posts: 158
Joined: Sat May 12, 2012 7:37 pm
Location: Ukraine

Post by greatkreator » Mon Feb 25, 2013 3:58 pm

can you please build ntsc build?
sadly i cannot do it currently.
thank you.

Post Reply