English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 20 June 2015, 15:04   #1
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Roomboot question(s)

on the http://wandel.ca/homepage/execdis/exec_disassembly.txt I found followin code which I don't understand

Code:
        ; Set up port A on the first CIA (8520-A).

FC00FE  move.b    #3,BFE201         Set low two bits for output. (ciaa pra)
FC0106  move.b    #2,BFE001         Set boot ROM off, power light dim. (ciaa ddra)
Why I must set up port A on the first CIA ?
As I checked even with first line my tiny custom roomboot (which only copy code to ram and run it and set screen to some color) works fine. Is this mean that second line is not necessary ?
I'm not sure but I don't find any information that set bit 1 in ciaa ddra makes boot Rom off. Am I wrong ? Can someone explain it a bit more. Thanks a lot.
Asman is offline  
Old 20 June 2015, 15:16   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
Which Amiga model? Gayle based systems switch off overlay when first CIA (any CIA register, any CIA) is done.
Toni Wilen is offline  
Old 20 June 2015, 15:48   #3
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Thanks for answer.
I didn't know that depend from Amiga model ? My knowledge about it is weak. Where I can find more information about it ?
Asman is offline  
Old 20 June 2015, 16:14   #4
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
It was mentioned in Gayle datasheet and I am sure it was found earlier because it is easy to notice that CIA OVL pin does nothing on Gayle based Amigas and schematics shows CIA OVL pin is not connected. (It is re-used as a CD audio mute pin on CD32! I think I originally found out how it worked when I started doing CD32 emulation)

http://eab.abime.net/showpost.php?p=399851&postcount=1

Quote:
The ROMs are also selected in the range from $0000000 to $OlFFFFF when the internal overlay signal (OVL) is high (this allows the RESET vectors to be contained in the ROMs). The internal OVL signal becomes asserted at reset, and negates on the first write to CIA1 (address range of $BFDOOO to $BFDFFF.
(and I remembered wrong, it was CIA-A only, not both)
Toni Wilen is offline  
Old 25 June 2015, 13:59   #5
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Thank a lot Toni for answers. I'm back with next bunch of questions

Code:
FC00D2  lea       040000,SP         Set stack pointer to top of first 128K.
FC00D8  move.l    #$020000,D0
FC00DE  subq.l    #1,D0             Delay loop.
FC00E0  bgt.s     FC00DE
In above code stack pointer is set. Ok, but the question is (perhaps stupid) where point SP before was set ?

For what is used delay loop which is cpu depend ?
Asman is offline  
Old 25 June 2015, 15:52   #6
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
Quote:
Originally Posted by Asman View Post
In above code stack pointer is set. Ok, but the question is (perhaps stupid) where point SP before was set ?
680x0 fetches both PC and SP from memory after hardware reset.

Address 0.L = initial SP (ROM identifier and JMP opcode normally in Amigas, boot code needs to set correct SP)
Address 4.L = initial PC

Quote:
For what is used delay loop which is cpu depend ?
I guess (originally?) it was added to allow some slow hardware to finish reset processing before rom code tries to initialize them or something like that.
Toni Wilen is offline  
Old 17 July 2015, 15:24   #7
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
I'm back again with bunch of questions. I'm trying to do custom romboot but now I have problem with ints. Mean they don't work. I set for example VERTB int in following way.

Code:
		move.w	#$20,intena(a5)
		move.w	#$20,intreq(a5)

		lea	irq(pc),a0
		move.l	a0,$6c
		
		move.w	#$c020,intena(a5)

;... rest code

irq:		movem.l	d0-a6,-(sp)
		lea	_custom,a0

		move.w	intreqr(a0),d0
		and.w	#$20,d0
		beq	.end

		move.w	#$505,color(a0)

.end
		move.w	#$20,intreq(a0)
		nop
		movem.l	(sp)+,d0-a6
		rte
And of course color of background never change. I set breakpoint into label irq but debugger never break on it. There is something which I missing ?

Edit: a5 = $dff000, dma is enabled ($380).
Asman is offline  
Old 17 July 2015, 16:00   #8
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
did you turn off the rom overlay? otherwise I suspect changing the level 3 vector ($6C) doesn't work.
hooverphonique is offline  
Old 17 July 2015, 16:05   #9
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Yes, I did that on begining of the code right after delay loop

Code:
	;first access to cia-a switch off overlay (Gayle based systems)
		move.b	#3,_ciaa+ciaddra
		move.b	#2,_ciaa
Asman is offline  
Old 17 July 2015, 18:22   #10
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Did you set the CPU's interrupt mask in the SR register accordingly?
Did you enable the display, so that a VERTB interrupt may happen?
phx is offline  
Old 17 July 2015, 18:36   #11
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
Most likely reason is too high interrupt mask in SR register. (Vertical blank does not need any special initialization)

Getting hardware in sane state after powerup/reset is not that simple
Toni Wilen is offline  
Old 19 July 2015, 19:42   #12
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Quote:
Originally Posted by phx View Post
Did you set the CPU's interrupt mask in the SR register accordingly?
Did you enable the display, so that a VERTB interrupt may happen?
eh... I see that my knowledge about 68000 is a bit weak, I didn't know that (SR register contains int mask). When I added
Code:
move.w #$2200,sr
then my test with vertb int pass. thanks a lot. And I see that must learn more about 680x0.

@Toni
Quote:
Getting hardware in sane state after powerup/reset is not that simple
Indeed
Asman 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
Amiga 1200...board revisions question / wire link modification question voyager_1701e support.Hardware 3 20 February 2014 12:32
Question... Reynolds Retrogaming General Discussion 1 21 November 2008 21:33
T.F.X Question ???? synchro Amiga scene 29 13 September 2004 01:13
question nnever2000 project.SPS (was CAPS) 2 16 July 2003 17:15

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 18:58.

Top

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