Welcome, Guest. Please login or register.

Author Topic: MiniMig NTSC  (Read 13166 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline freqmax

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: MiniMig NTSC
« Reply #74 from previous page: May 10, 2008, 07:13:14 AM »
It will wreck any timing within the software. Same goes with the user interaction.
 

Offline straycat

  • Full Member
  • ***
  • Join Date: Jan 2008
  • Posts: 114
    • Show only replies by straycat
Re: MiniMig NTSC
« Reply #75 on: May 10, 2008, 11:07:38 AM »
@Darrin:
No problem I'll drop you a PM near the time. I have the same problem with a lot of original disks failing. Although I've managed to transfer a lot of my disks to ADFs I've had trouble transferring many of them.
Minimig ¦ A500 ¦ A600
 

Offline FrenchShark

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show only replies by FrenchShark
    • http://www.arcaderetrogaming.com
Re: MiniMig NTSC
« Reply #76 on: May 10, 2008, 04:51:55 PM »
Quote

freqmax wrote:
It will wreck any timing within the software. Same goes with the user interaction.

Not sure.
You must keep the CIAs at 700 KHz and Paula at 3.54 MHz.
The rest will run faster: CPU at 8.867 MHz, Horizontal frequency at 19.5 KHz but still 227 cycles per horizontal line.
The timer.device will still auto-detect the Amiga as a PAL machine.
Here is the ROM code that does that:

SupplyFreqDetect

    ;We launch the timer B (frequence = 715,909Hz or 709,379Hz) and wait
    ;for 1 TOD tick. We guess the TOD's frequency with the number of
    ;decremented EClock ticks.

    ;  +----- 65535 : Timer B start
    ;  |
    ;  |
    ;  |
    ;  +----- 53603 : 60 Hz tick (EClock = 715909 Hz) - ECS Amiga
    ;  |
    ;  +- 52476 : Threshold 50Hz ECS / 60Hz ECS
    ;  |
    ;  +----- 51347 : 50 Hz tick (EClock = 709379 Hz) - ECS Amiga
    ;  |
    ;  +- 46509 : Threshold 60Hz AGA / 50Hz ECS
    ;  |
    ;  +----- 41671 : 60 Hz tick (EClock = 1431818 Hz) - AGA Amiga
    ;  |
    ;  +- 39416 : Threshold 50Hz AGA / 60Hz AGA
    ;  |
    ;  +----- 37160 : 50 Hz tick (EClock = 1418758 Hz) - AGA Amiga

    lea     _ciaa,A0                ;Get base address of CIA A.

    bclr    #CIACRBB_ALARM,ciacrb(A0)
    moveq   #0,D0
    move.b  D0,todhi(A0)
    move.b  D0,todmid(A0)
    move.b  D0,todlow(A0)           ;Clear the TOD clock

    moveq   #CIACRBF_RUNMODE,D0
    move.b  D0,ciacrb(A0)           ;Activate one-shot mode for timer B

    moveq   #-1,D0
    move.b  D0,tblo(A0)
    move.b  D0,tbhi(A0)             ;Load the timer B latch with $FFFF

    move.b  todlow(A0),D0
.WaitTick1
    tst.b   tbhi(A0)                ;Does timer B work ?
    beq.b   .CiaAFail               ;If not, Guru time !
    cmp.b   todlow(A0),D0
    beq.b   .WaitTick1              ;Wait for a TOD tick.

    ;The timer B starts decrementing from $FFFF.
    move.b  #CIACRAF_LOAD|CIACRAF_RUNMODE|CIACRAF_START,ciacrb(A0)

    move.b  todlow(A0),D0
.WaitTick2
    tst.b   tbhi(A0)                ;Does timer B work ?
    beq.b   .CiaAFail               ;If not, Guru time !
    cmp.b   todlow(A0),D0
    beq.b   .WaitTick2              ;Wait for another TOD tick.

    moveq   #CIACRBF_RUNMODE,D0
    move.b  D0,ciacrb(A0)           ;Stop the timer B.

    move.b  tbhi(A0),D0
    lsl.l   #8,D0
    move.b  tblo(A0),D0             ;Read the timer B value.

    cmpi.l  #52476,D0               ;Timer B >= 52476 ?
    bcs.b   .Not60Hz                ;No, skip the next two lines.
    moveq   #60,D0                  ;Yes, we have a 60Hz tick.
    bra.b   .StoreTickInfo          ;Store the information.
.Not60Hz

    cmpi.l  #46509,D0               ;Timer B >= 46509 ?
    bcs.b   .Not50Hz                ;No, skip the next two lines.
    moveq   #50,D0                  ;Yes, we have a 50Hz tick.
    bra.b   .StoreTickInfo          ;Store the information.
.Not50Hz

    cmpi.l  #39416,D0               ;Timer B >= 39416 ?
    bcs.b   .Not30Hz                ;No, skip the next two lines.
    moveq   #30,D0                  ;Yes, we have a 60Hz tick.
    bra.b   .StoreTickInfo          ;Store the information.
.Not30Hz

    moveq   #25,D0                  ;Timer B < 39416 : 50Hz tick.
.StoreTickInfo
    move.l  #1000000,D1             ;1,000,000 µs
    divu    D0,D1                   ;Divided by TOD freq = TOD period (in µs).
    move.w  D0,tdev_PSupplyFrqHz(A2)       ;Store the frequency.
    move.w  D1,tdev_PSupplyPerMicroSec(A2) ;Store the period.
    rts
.CiaAFail
    move.l  #$15000002,D0           ;Alert number (AN_TMBadSupply).
    bra.w   DisplayAlert            ;Guru time.
 

Offline boing4000

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show only replies by boing4000
    • http://www.amigademo.de
Re: MiniMig NTSC
« Reply #77 on: May 11, 2008, 12:32:57 PM »
@Darrin

Minimig IS an open source project, due to the GNU licence anyone has to make the source code public to a released binary.
It is the same as in Linux, exceptions are commercial products and they have to be declared as such.

I am also not happy that this source is not available to the community, that make it sound like closed open-source! Anyone wants to make the nice minimig working more perfect, so all improvements should be open to anybody :-)

Regards
Sascha
 

Offline Darrin

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: May 2002
  • Posts: 4430
    • Show only replies by Darrin
Re: MiniMig NTSC
« Reply #78 on: May 11, 2008, 01:12:36 PM »
Quote

boing4000 wrote:


I understand what you're saying.

What I'm saying is that if he wants to throw out cores that he's "tinkering" with to a few people for testing and not as a public release then I'll be happy to help and I don't want (or need or know what to do with) the sources.

This modification is the most important one so far to me, and I'll have to stop using Denis' update until it's modified to include this code.  I just can't go back to a CRT when the Minimig looks so good on the widescreen LCD.  :-)
A2000, A3000, 2 x A1200T, A1200, A4000Tower & Mediator, CD32, VIC-20, C64, C128, C128D, PET 8032, Minimig & ARM, C-One, FPGA Arcade... and AmigaOne X1000.
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: MiniMig NTSC
« Reply #79 on: May 11, 2008, 01:45:36 PM »
Quote

Darrin wrote:
when the Minimig looks so good on the widescreen LCD.  :-)

MiniMig?? Widescreen? LCD? Looks good?? Surely not.

Stretched, scaled, distorted, looks bad is more what I would expect.
 

Offline Darrin

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: May 2002
  • Posts: 4430
    • Show only replies by Darrin
Re: MiniMig NTSC
« Reply #80 on: May 11, 2008, 01:55:49 PM »
Quote

alexh wrote:
MiniMig?? Widescreen? LCD? Looks good?? Surely not.

Stretched, scaled, distorted, looks bad is more what I would expect.


Actually, that's what I was expecting, but I can't notice it.

Honestly, if I didn't know that the games were designed for a regular "square" CRT then I wouldn't know any better.  Of course, some widescreens have different "stretch" modes and some scale better than others.  I'm using a cheap 25" LCD from Tiger Direct and I'm really impressed.

Of course, I can always switch the "stretch" off if I need too.
A2000, A3000, 2 x A1200T, A1200, A4000Tower & Mediator, CD32, VIC-20, C64, C128, C128D, PET 8032, Minimig & ARM, C-One, FPGA Arcade... and AmigaOne X1000.
 

Offline Darrin

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: May 2002
  • Posts: 4430
    • Show only replies by Darrin
Re: MiniMig NTSC
« Reply #81 on: May 11, 2008, 01:59:00 PM »
Here's Defender of the Crown:

http://i18.photobucket.com/albums/b134/darrin01311/100_1273s.jpg

Note that the Minimig pic doesn't fill the whole screen, so even though the image is "stretched", it is not stretched over the whole display.  That probably helps.
A2000, A3000, 2 x A1200T, A1200, A4000Tower & Mediator, CD32, VIC-20, C64, C128, C128D, PET 8032, Minimig & ARM, C-One, FPGA Arcade... and AmigaOne X1000.
 

Offline boing4000

  • Full Member
  • ***
  • Join Date: Apr 2006
  • Posts: 222
    • Show only replies by boing4000
    • http://www.amigademo.de
Re: MiniMig NTSC
« Reply #82 on: May 11, 2008, 02:43:10 PM »
And I know what you are saying ;-) in fact I also can not do very much with the source but certainly other ppl like Dennis etc.. They would be as happy as we are to see any new source.

I am also trying to compile the source and improove something (as blitter things). When I did something, I will release the source in the same time. Maybe somebody else can do more with it.
 

Offline straycat

  • Full Member
  • ***
  • Join Date: Jan 2008
  • Posts: 114
    • Show only replies by straycat
Re: MiniMig NTSC
« Reply #83 on: May 11, 2008, 08:29:57 PM »
Everything else aside you'd be hard pressed to find a shop selling a CRT monitor these days so the Minimig does need LCD support. Even if it does stretch the screen a little, we need the option.

I wish I was advanced in C enough to work on the source code and contribute to the Minimig in that way, and have the time spare to learn!
Minimig ¦ A500 ¦ A600
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: MiniMig NTSC
« Reply #84 on: May 11, 2008, 09:06:39 PM »
MiniMig isnt written in C, it's in Verilog HDL.

The PIC might be in C... but that has nothing to do with screen output.
 

Offline whiteb

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 739
    • Show only replies by whiteb
Re: MiniMig NTSC
« Reply #85 on: May 14, 2008, 01:41:49 PM »
Quote

alexh wrote:
MiniMig isnt written in C, it's in Verilog HDL.

The PIC might be in C... but that has nothing to do with screen output.


Except the Menu routines that the pic contains, but as you pointed out, the rest of the core display functions of the Amiga chipset are Verilog.
A4000D - CSMKII//128MB/IDE CF/Indivision Scandoubler
A1200
A1000

(And now a Minimig) :>)
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: MiniMig NTSC
« Reply #86 on: May 14, 2008, 02:22:46 PM »
I don't know the architecture of MiniMig that well... is the menu some sort of video genlock type situation?? Seems a strange thing to do, but you never know.
 

Offline freqmax

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: MiniMig NTSC
« Reply #87 on: May 15, 2008, 09:26:05 PM »
I think it was something like if( OSD ) then OSD else Amiga. For every pixel.
 

Offline whiteb

  • Hero Member
  • *****
  • Join Date: Feb 2006
  • Posts: 739
    • Show only replies by whiteb
Re: MiniMig NTSC
« Reply #88 on: May 16, 2008, 11:47:42 AM »
Just take a looksie at the pic source code, specifically the On screen Display section of the code (osd.c and osd.h)
A4000D - CSMKII//128MB/IDE CF/Indivision Scandoubler
A1200
A1000

(And now a Minimig) :>)