English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 24 December 2007, 17:20   #1
FrenchShark
FPGAmiga rulez!
 
FrenchShark's Avatar
 
Join Date: Dec 2007
Location: South of France
Age: 50
Posts: 155
NTSC minimg question, test on a real Amiga required !

Hello,

I am new on EAB.
I do have a question that I asked on A.org for an ECS/AGA minimig implementation I am working on.

I am wondering how the long frame line count during interlace mode is done on a real amiga.

In order to save logic, my guess is that on the real stuff, the vertical beam counter is set ($1FF) at the end of a long frame instead of being cleared.

To summarize,
the vertical beam counter values at the end of a PAL short frame would be:
...
310
311 <- last line
0 <- new frame (counter cleared)
1
...
and for a long frame:
310
311
511 <- last line (counter set)
0 <- new frame (counter wraps around)
1
...
Can someone write a short ASM program that:
- Activate interlace mode
- Disable interrupts
- In a loop:
* Read continuously VPOSR + VHPOSR ($DFF004 - $DFF006)
* Wait for V10-V0 to be equal to 311 and LOF = 1
* Wait for V10-V0 to be different from 311 -> exit the loop
- Put the V10-V0 value in a register so we can read the result (312 or something else ?)

PS: this is for a PAL display, if you do it with an NTSC one, replace 311 by 261 !

Regards,

Frederic
FrenchShark is offline  
Old 24 December 2007, 18:53   #2
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,108
Hello and welcome to EAB!

Minimig with AGA would be DZEE SHEET!!!
You're the original Minimig constructor?

Shoonay is offline  
Old 25 December 2007, 12:57   #3
DrF
Blessed A1200 Of TeH Rat
 
DrF's Avatar
 
Join Date: Aug 2007
Location: Bham, UK
Age: 42
Posts: 496
Individual Computers claimed to be doing a AGA clone a while ago, strangly around the time MiniMig was first mentioned, heard or seen anything more I have not

Someone else claimed to be doing a high end Amiga clone (020+/AGA/Fast Ram and some other stuff) I think its all in the Wikipedia if anyone cares to look
DrF is offline  
Old 25 December 2007, 15:03   #4
RedskullDC
Digital Corruption
 
RedskullDC's Avatar
 
Join Date: Jan 2007
Location: Dorrigo/Australia
Age: 60
Posts: 355
Hi Frederic,

Quote:
Originally Posted by FrenchShark View Post
Hello,

- Activate interlace mode
- Disable interrupts
- In a loop:
* Read continuously VPOSR + VHPOSR ($DFF004 - $DFF006)
* Wait for V10-V0 to be equal to 311 and LOF = 1
* Wait for V10-V0 to be different from 311 -> exit the loop
- Put the V10-V0 value in a register so we can read the result (312 or something else ?)

Regards,
Frederic
Just out of curiosity, I tried this under WinUAE using PAL LORES interlace but got some fairly meaningless values

Will try it on my real 500 and let u know.

Red
RedskullDC is offline  
Old 25 December 2007, 17:44   #5
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,570
Quote:
Originally Posted by RedskullDC View Post
Just out of curiosity, I tried this under WinUAE using PAL LORES interlace but got some fairly meaningless values
Do not use JIT?
Toni Wilen is online now  
Old 25 December 2007, 17:54   #6
FrenchShark
FPGAmiga rulez!
 
FrenchShark's Avatar
 
Join Date: Dec 2007
Location: South of France
Age: 50
Posts: 155
Quote:
Originally Posted by RedskullDC View Post
Hi Frederic,



Just out of curiosity, I tried this under WinUAE using PAL LORES interlace but got some fairly meaningless values

Will try it on my real 500 and let u know.

Red
You have to isolate bits V10 to V0:

move.l #$8007FF00,D1
move.l #$00013700,D2
.Wait1
move.l $DFF004,D0 ;Read VHPOSR and VPOSR
and.l D1,D0 ;Keep LOF and V10-V0 bits
bclr #31,D0 ;Test and clear LOF bit
beq.b .Wait1 ;Short frame, keep waiting
cmp.l D2,D0 ;Equal to line 311 ?
bne.b .Wait1 ;No, keep waiting

bclr #31,D1 ;LOF not needed anymore
.Wait2
move.l $DFF004,D0 ;Read VHPOSR and VPOSR
and.l D1,D0 ;Keep V10-V0 bits
cmp.l D2,D0 ;Still equal to line 311 ?
bne.b .Wait2 ;Yes, keep waiting
lsr.l #8,D0 ;D0 contains the line # after line 311

I should have posted this code snippet earlier.

Regards and thank you.
FrenchShark is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ALWAYS test your code on real hardware!! h0ffman Coders. General 32 16 July 2015 21:02
NTSC CD32 and a 1084s monitor question pdorr3 support.Hardware 3 04 August 2013 16:14
PAL/NTSC question Parsec Retrogaming General Discussion 0 01 January 2011 22:00
NTSC & PAL Question ghost_of_war support.Hardware 3 12 June 2010 19:10
Ambermoon Arcade - speed test (real hardware) viddi project.Amiga Game Factory 26 18 November 2009 17:06

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:05.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07702 seconds with 13 queries