English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 07 December 2012, 14:56   #41
Hewitson
Registered User
 
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 41
Posts: 3,772
Quote:
Originally Posted by Mrs Beanbag View Post
What I'd really like to see in an Amiga ROM is native support for Linux Ext2 filesystem! Then it would be possible to format and install a HDD for a real classic Amiga on any Linux PC without emulators, which would be very convenient, plus it is generally a better filesystem than FFS in many ways.

I could perhaps do this myself if I knew where to begin.
Linux has supported Amiga filesystems for years (CONFIG_AFFS_FS kernel option). You should always compile kernel and applications yourself, you never know what features you are missing out on

Quote:
Originally Posted by Wikipedia
Most notably, support for affs can be compiled into Linux kernels, and offers full read, write and format support on FFS and OFS partitions of all dostypes except DOS\6 and DOS\7 (which are probably incredibly rare).

Last edited by Hewitson; 07 December 2012 at 15:02.
Hewitson is offline  
Old 09 December 2012, 13:28   #42
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Quote:
Originally Posted by mark_k View Post
I think the "UNI\1" designation was just used for defining partitions in the RDB. There was never an AmigaOS filesystem to access Amiga UNIX partitions.
Which filesystem is used by Amix ? For me it must be UNIX filesystem for Amiga.

BTW.Here is some infos about UNI1:
http://ftp.uni-erlangen.de/pub/Linux...k/fdisk.readme

Last edited by Don_Adan; 11 December 2012 at 16:37.
Don_Adan is offline  
Old 03 January 2013, 16:02   #43
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Optimised version of cia resource is available.

Code:
; Resourced version of cia.resource (39.1) from Amiga ROM 3.1 for Amiga68k ROM 1.0
; For easy recognition all changes are done using lower cases and ";" signs
; Original code is removed with ";" signs
; New code is added using lower cases only

; We made it...
; OS Group: Bryce Nesbitt, Michael Sinz, Peter Cherna, Darren Greenwald, Randell Jesup, Jerry Horanoff
; GFX: Allan Havemose, Barry 'Bart' Whitebook, Spence Shanson, Steve Beats, Chris Green, Ray Brand, Jim Barkley
; Special Projects: Eric Cotton, Martin Hunt, Bill Koester, Martin Taillefer, Brian Jackson, Kaori Kuwata, David Junod, Palmyra Pawlik, Kevin Klop
; NET: Brian Jackson, Greg Miller, Kenneth Dyke
; GUI: Peter Cherna, Martin Taillefer, David Junod, Kaori Kuwata
; Others: Andy Finkel, Dale 'Duck' Luck, Jim 'Jimm' Mackraz, Bob 'Kodiak' Burns, Jeff Porter, Carolyn Scheppner, David Haynie,
; Lauren Brown, CATS (Commodore Amiga Technical Support), QA (Quality Assurance), SA (Software Assurance)
; Thanks to: Bill Hawes, Software Distillery
; Better than ever.

MatchTag
	ILLEGAL				; match word
	dc.l	MatchTag		; match tag
	dc.l	EndSkip			; end skip
	dc.b	1			; flags
;	dc.b	$27			; version

	dc.b	$28			; new version

	dc.b	8			; type
	dc.b	$50			; priority
	dc.l	ciaresource.MSG		; name
	dc.l	cia39110392.MSG		; id string
	dc.l	InitResource		; init code
;ciaresource.MSG	dc.b	'cia.resource',0,0
;ciaaresource.MSG1	dc.b	'ciaa.resource',0
;ciabresource.MSG0	dc.b	'ciab.resource',0
;cia39110392.MSG	dc.b	'cia 39.1 (10.3.92)',$D,$A,0
;	dc.b	0
;	dc.b	0
;	dc.b	0
Vectors
	dc.w	$FFFF
	dc.w	AddICRVector-Vectors	;  -6 _LVOAddICRVector
	dc.w	RemICRVector-Vectors	; -12 _LVORemICRVector
	dc.w	AbleICR-Vectors		; -18 _LVOAbleICR
	dc.w	SetICR-Vectors		; -24 _LVOSetICR
	dc.w	$FFFF

InitResource
	MOVEM.L	A2/A3,-(SP)
	MOVEQ	#$20,D0
	MOVE.L	#$10001,D1
	JSR	-$C6(A6)		; AllocMem
	MOVEA.L	D0,A3			; resource base, no error code
;	BSR.L	MakeLib

	bsr.b	MakeLib

	MOVE.L	A2,4(A3)
	MOVEQ	#0,D0
	MOVEQ	#3,D1
	MOVEM.L	D0/D1/A2,8(A3)
	BSET	D0,$86(A2)
	MOVE.L	#$BFE001,$22(A2)
	MOVE.L	A6,$7C(A2)		; exec base
	MOVE.W	#8,$26(A2)
	MOVE.L	#IO_PortsInt,$12(A1)
	MOVEQ	#3,D0			; I/O Ports and timers
	JSR	-$A8(A6)		; AddIntServer
	LEA	ciaaresource.MSG1(PC),A0
	BSR.S	AddResource
	BSR.S	MakeLib
	MOVE.L	A2,(A3)
	LEA	$BFD000,A0
	MOVE.L	A0,$22(A2)
	MOVE.L	A6,$7C(A2)		; exec base
	MOVEQ	#-$40,D0
	OR.B	D0,$200(A0)
	OR.B	D0,(A0)
	MOVE.W	#$2000,$26(A2)
	MOVE.L	#ExternalInt,$12(A1)
	MOVEQ	#13,D0			; External interrupt
	JSR	-$A8(A6)		; AddIntServer
	LEA	ciabresource.MSG0(PC),A0
	BSR.S	AddResource
	MOVEM.L	(SP)+,A2/A3
	RTS

MakeLib	LEA	Vectors(PC),A0
	SUBA.L	A1,A1
	SUBA.L	A2,A2
;	MOVEQ	#$11,D0
;	ROL.L	#3,D0

	moveq	#136/2,D0
	add.w	D0,D0

	JSR	-$54(A6)		; MakeLibrary
	MOVEA.L	D0,A2			; again, no error check
;	MOVE.B	#8,8(A2)
;	CLR.B	9(A2)

	move.w	#$800,8(A2)

	LEA	$2A(A2),A1
;	MOVE.B	#2,8(A1)
;	MOVE.B	#$78,9(A1)

	move.w	#$278,8(A1)

	MOVE.L	A2,14(A1)
	MOVE.L	A3,$80(A2)
	RTS

AddResource	MOVE.L	A0,10(A1)
	MOVE.L	A0,10(A2)
	MOVEA.L	A2,A1			; A1 input
;	JSR	-$1E6(A6)		; AddResource
;	RTS

	jmp	-$1E6(A6)		; AddResource

IO_PortsInt	MOVEM.L	D2/A2,-(SP)
	MOVEA.L	A1,A2
lbC03F6FC	BCLR	#0,$87(A2)
	BEQ.S	lbC03F710
	MOVEA.L	$80(A2),A1
	MOVEM.L	$18(A1),A1/A5
	JSR	(A5)
lbC03F710	MOVE.W	SR,D0
	ORI.W	#$700,SR
	MOVE.B	$BFED01,D2
	BCLR	#7,D2
	OR.B	$29(A2),D2
	MOVE.B	D2,$29(A2)
	AND.B	$28(A2),D2
	MOVE.B	D2,$84(A2)
	BEQ.S	lbC03F75E
	EOR.B	D2,$29(A2)
	MOVE.W	D0,SR
	MOVEA.L	$7C(A2),A6		; set exec base in A6
	LEA	$DFF000,A0		; set chip in A0
	LSR.B	#1,D2
	BCS.S	lbC03F768
lbC03F746	LSR.B	#1,D2
	BCS.S	lbC03F772
	BEQ.S	lbC03F6FC
lbC03F74C	LSR.B	#1,D2
	BCS.S	lbC03F77C
	BEQ.S	lbC03F6FC
lbC03F752	LSR.B	#1,D2
	BCS.S	lbC03F786
	BEQ.S	lbC03F6FC
lbC03F758	LSR.B	#1,D2
	BCS.S	lbC03F790
	BRA.S	lbC03F6FC

lbC03F75E	MOVE.W	D0,SR
	MOVEM.L	(SP)+,D2/A2
	MOVEQ	#0,D0
	RTS

lbC03F768	MOVEM.L	$40(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F746

lbC03F772	MOVEM.L	$4C(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F74C

lbC03F77C	MOVEM.L	$58(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F752

lbC03F786	MOVEM.L	$64(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F758

lbC03F790	MOVEM.L	$70(A2),A1/A5
	JSR	(A5)
	BRA.L	lbC03F6FC

; A0 and A6 are not set for ExternalInt handler

ExternalInt	MOVEM.L	D2/A2,-(SP)
	MOVE.B	$BFDD00,D2
	BCLR	#7,D2
	OR.B	$29(A1),D2
	MOVE.B	D2,$29(A1)
	AND.B	$28(A1),D2
	BEQ.S	lbC03F7E0
	MOVE.B	D2,$84(A1)
	MOVEA.L	A1,A2
	EOR.B	D2,$29(A2)
	LSR.B	#1,D2
	BCS.S	lbC03F7E8
lbC03F7C6	LSR.B	#1,D2
	BCS.S	lbC03F7F2
	BEQ.S	lbC03F7DC
lbC03F7CC	LSR.B	#1,D2
	BCS.S	lbC03F7FC
	BEQ.S	lbC03F7DC
lbC03F7D2	LSR.B	#1,D2
	BCS.S	lbC03F806
	BEQ.S	lbC03F7DC
lbC03F7D8	LSR.B	#1,D2
	BCS.S	lbC03F810
lbC03F7DC	CLR.B	$84(A2)
lbC03F7E0	MOVEM.L	(SP)+,D2/A2
	MOVEQ	#0,D0
	RTS

lbC03F7E8	MOVEM.L	$40(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7C6

lbC03F7F2	MOVEM.L	$4C(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7CC

lbC03F7FC	MOVEM.L	$58(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7D2

lbC03F806	MOVEM.L	$64(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7D8

lbC03F810	MOVEM.L	$70(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7DC

; D0 - input
; A1 - input
; A6 - resource base
; D0 - output

AddICRVector	MOVEQ	#0,D1
	MOVE.B	D0,D1
	MULU.W	#12,D1
	MOVEA.L	$7C(A6),A0
	MOVE.W	#$4000,$DFF09A
	ADDQ.B	#1,$126(A0)
	LEA	$40(A6,D1.W),A0
	MOVE.L	8(A0),D1
	BNE.S	lbC03F914
lbC03F8E4	MOVE.L	A1,8(A0)
	MOVE.L	$12(A1),4(A0)
	MOVE.L	14(A1),(A0)
	BSET	D0,$85(A6)
	MOVE.W	#$80,D1
	BSR.S	lbC03F96C
lbC03F8FC	MOVEA.L	$7C(A6),A0
	SUBQ.B	#1,$126(A0)
	BGE.S	lbC03F90E
	MOVE.W	#$C000,$DFF09A
lbC03F90E	RTS

lbC03F910	MOVE.L	D1,D0
	BRA.S	lbC03F8FC

lbC03F914	BTST	D0,$86(A6)
	BEQ.S	lbC03F910
	MOVEM.L	D0-D3/A0-A3/A6,-(SP)
	BSR.S	lbC03F978
	BNE.S	lbC03F950
	BSR.S	lbC03F992
	MOVEM.L	(SP)+,D0-D3/A0-A3/A6
	BRA.S	lbC03F8E4

; D0 - input
; A1 - input
; A6 - resource base

RemICRVector	MOVEA.L	$7C(A6),A0
	MOVE.W	#$4000,$DFF09A
	ADDQ.B	#1,$126(A0)
	BSR.S	lbC03F956
	MOVEM.L	D0-D3/A0-A3/A6,-(SP)
	BSR.S	lbC03F978
	MOVEM.L	8(A1),D0/D1/A6
	CMP.B	D1,D3
	BLE.S	lbC03F950
	BSR.S	lbC03F956
	BSR.S	lbC03F992
lbC03F950	MOVEM.L	(SP)+,D0-D3/A0-A3/A6
	BRA.S	lbC03F910

lbC03F956	MOVEQ	#0,D1
	MOVE.B	D0,D1
	MULU.W	#12,D1
	LEA	$40(A6,D1.W),A0
	CLR.L	8(A0)
	MOVEQ	#0,D1
	BCLR	D0,$85(A6)
lbC03F96C	BSET	D0,D1
	MOVE.W	D1,D0
;	BSR.L	AbleICR

	bsr.b	AbleICR

	MOVEQ	#0,D0
	RTS

lbC03F978	MOVEA.L	$80(A6),A1
	MOVEM.L	(A1),A2/A3
	MOVEQ	#3,D3
	MOVEQ	#$40,D2
lbC03F984	EXG	A3,A2
	LSR.B	#3,D2
	BTST	D2,$85(A2)
	DBEQ	D3,lbC03F984
	RTS

lbC03F992	AND.B	#1,D2
	MOVEM.L	D2/D3/A2,8(A1)
	CLR.B	$86(A3)
	CLR.B	$86(A2)
	BSET	D2,$86(A2)
	MOVEA.L	$14(A1),A0
	JMP	(A0)

; D0 - input
; A6 - resource base
; D0 - output

AbleICR
;	MOVEA.L	$7C(A6),A0
;	MOVE.W	#$4000,$DFF09A
;	ADDQ.B	#1,$126(A0)
;	MOVEA.L	$22(A6),A0		; timer

	bsr.b	SetMe

	MOVE.B	D0,$D00(A0)
	MOVEQ	#0,D1
	MOVE.B	$28(A6),D1
	TST.B	D0
	BEQ.S	lbC03F85E
	BCLR	#7,D0
	BNE.S	lbC03F8BC
	NOT.B	D0
	AND.B	D0,$28(A6)
	BRA.S	lbC03F85E

lbC03F8BC	OR.B	D0,$28(A6)
	BRA.S	lbC03F85E

SetMe
	move.l	$7C(A6),A0
	move.w	#$4000,$DFF09A
	addq.b	#1,$126(A0)
	move.l	$22(A6),A0		; timer
	rts

; D0 - input
; A6 - resource base
; D0 - output

SetICR
;	MOVEA.L	$7C(A6),A0		; exec base
;	MOVE.W	#$4000,$DFF09A
;	ADDQ.B	#1,$126(A0)
;	MOVEA.L	$22(A6),A0		; timer

	bsr.b	SetMe

	MOVE.B	$D00(A0),D1
	BCLR	#7,D1
	OR.B	D1,$29(A6)
	MOVEQ	#0,D1
	MOVE.B	$29(A6),D1
	OR.B	$84(A6),D1
	TST.B	D0
	BEQ.S	lbC03F85E
	BCLR	#7,D0
	BNE.S	lbC03F85A
	NOT.B	D0
	AND.B	D0,$29(A6)
	AND.B	D0,$84(A6)
	BRA.S	lbC03F85E

lbC03F85A	OR.B	D0,$29(A6)
lbC03F85E	MOVE.B	$28(A6),D0
	AND.B	$29(A6),D0
	BEQ.S	lbC03F876
	MOVE.W	$26(A6),D0
	OR.W	#$8000,D0
	MOVE.W	D0,$DFF09C
lbC03F876	MOVEA.L	$7C(A6),A0		; exec base
	SUBQ.B	#1,$126(A0)
	BGE.S	lbC03F888
	MOVE.W	#$C000,$DFF09A
lbC03F888	MOVE.L	D1,D0
	RTS

ciaresource.MSG	dc.b	'cia.resource',0,0
ciaaresource.MSG1	dc.b	'ciaa.resource',0
ciabresource.MSG0	dc.b	'ciab.resource',0
cia39110392.MSG	dc.b	'cia 40.0 (3.1.2013)',$D,$A,0

	cnop	0,4
EndSkip
Don_Adan is offline  
Old 03 January 2013, 22:35   #44
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
Tried it as always and system seems to work just fine
Thanks for these updates as always DonAdan mate \o/
mfilos is offline  
Old 04 January 2013, 09:27   #45
Bamiga2002
BlizzardPPC'less
 
Bamiga2002's Avatar
 
Join Date: May 2004
Location: Finland
Age: 46
Posts: 3,210
Send a message via MSN to Bamiga2002
Thanks Don, installed this yesterday
Bamiga2002 is offline  
Old 20 January 2013, 18:53   #46
fgh
Registered User
 
Join Date: Dec 2010
Location: Norway
Posts: 817
Could some of you ROM-gurus check this patch that Toni Wilen has suggested will keep PCMCIA enabled with >4MB Z2-RAM installed?

Quote:
Originally Posted by Mrs Beanbag View Post
Any way to get the Amiga to recognise standard MBR? MBR and RDB apparently can co-exist, but I take it the Amiga simply ignores the MBR in this case.
FAT95 can read MBR's and FAT file systems.
RDB position is more flexible than FAT, so place the RDB after the FAT, and the amiga can access both.
It has been done, although not by myself..
fgh is offline  
Old 20 January 2013, 19:12   #47
Arnie
R.I.P Smudge 18-08-16
 
Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 66
Posts: 3,968
Yes, it can be done. I have successfully created Usb sticks and HD partitions with both MBR & RDB on the same device. I find Aros the easiest for this task.
Arnie is offline  
Old 21 January 2013, 01:54   #48
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by Don_Adan View Post
Quote:
Originally Posted by Ratte
Better start helping aros68k ...
I know only 68K ASM, and don't want to learn C.
you could propose crucial optimisations that you find out about to be inlined into c code in 68k branch. that could be very helpful. toni wilen is one of the two 68k maintainers. i think he would likely be bothered to review if you had any proposals.
wawa is offline  
Old 26 January 2013, 15:16   #49
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Quote:
Originally Posted by wawa View Post
you could propose crucial optimisations that you find out about to be inlined into c code in 68k branch. that could be very helpful. toni wilen is one of the two 68k maintainers. i think he would likely be bothered to review if you had any proposals.
If you want you can compile AROS module using CodeWarrior for Mac 68k:
http://macintoshgarden.org/apps/c?page=2

Later you can give/send to me CodeWarrior binary and direct deassembler (CodeWarrior has this option, if I remember right) output of compiled AROS module.
Don_Adan is offline  
Old 26 January 2013, 15:19   #50
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Optimised version of cia resource, more bytes gained.

Code:
; Resourced version of cia.resource (39.1) from Amiga ROM 3.1 for Amiga68k ROM 1.0
; For easy recognition all changes are done using lower cases and ";" signs
; Original code is removed with ";" signs
; New code is added using lower cases only

; We made it...
; OS Group: Bryce Nesbitt, Michael Sinz, Peter Cherna, Darren Greenwald, Randell Jesup, Jerry Horanoff
; GFX: Allan Havemose, Barry 'Bart' Whitebook, Spence Shanson, Steve Beats, Chris Green, Ray Brand, Jim Barkley
; Special Projects: Eric Cotton, Martin Hunt, Bill Koester, Martin Taillefer, Brian Jackson, Kaori Kuwata, David Junod, Palmyra Pawlik, Kevin Klop
; NET: Brian Jackson, Greg Miller, Kenneth Dyke
; GUI: Peter Cherna, Martin Taillefer, David Junod, Kaori Kuwata
; Others: Andy Finkel, Dale 'Duck' Luck, Jim 'Jimm' Mackraz, Bob 'Kodiak' Burns, Jeff Porter, Carolyn Scheppner, David Haynie,
; Lauren Brown, CATS (Commodore Amiga Technical Support), QA (Quality Assurance), SA (Software Assurance)
; Thanks to: Bill Hawes, Software Distillery
; Better than ever.

MatchTag
	ILLEGAL				; match word
	dc.l	MatchTag		; match tag
	dc.l	EndSkip			; end skip
	dc.b	1			; flags
;	dc.b	$27			; version

	dc.b	$28			; new version

	dc.b	8			; type
	dc.b	$50			; priority
	dc.l	ciaresource.MSG		; name
	dc.l	cia39110392.MSG		; id string
	dc.l	InitResource		; init code
;ciaresource.MSG	dc.b	'cia.resource',0,0
;ciaaresource.MSG1	dc.b	'ciaa.resource',0
;ciabresource.MSG0	dc.b	'ciab.resource',0
;cia39110392.MSG	dc.b	'cia 39.1 (10.3.92)',$D,$A,0
;	dc.b	0
;	dc.b	0
;	dc.b	0
Vectors
	dc.w	$FFFF
	dc.w	AddICRVector-Vectors	;  -6 _LVOAddICRVector
	dc.w	RemICRVector-Vectors	; -12 _LVORemICRVector
	dc.w	AbleICR-Vectors		; -18 _LVOAbleICR
	dc.w	SetICR-Vectors		; -24 _LVOSetICR
	dc.w	$FFFF

InitResource
	MOVEM.L	A2/A3,-(SP)
	MOVEQ	#$20,D0
	MOVE.L	#$10001,D1
	JSR	-$C6(A6)		; AllocMem
	MOVEA.L	D0,A3			; resource base, no error code
;	BSR.L	MakeLib

	bsr.b	MakeLib

	MOVE.L	A2,4(A3)
	MOVEQ	#0,D0
	MOVEQ	#3,D1
	MOVEM.L	D0/D1/A2,8(A3)
	BSET	D0,$86(A2)
	MOVE.L	#$BFE001,$22(A2)
	MOVE.L	A6,$7C(A2)		; exec base
	MOVE.W	#8,$26(A2)
	MOVE.L	#IO_PortsInt,$12(A1)
	MOVEQ	#3,D0			; I/O Ports and timers
	JSR	-$A8(A6)		; AddIntServer
	LEA	ciaaresource.MSG1(PC),A0
	BSR.S	AddResource
	BSR.S	MakeLib
	MOVE.L	A2,(A3)
	LEA	$BFD000,A0
	MOVE.L	A0,$22(A2)
	MOVE.L	A6,$7C(A2)		; exec base
	MOVEQ	#-$40,D0
	OR.B	D0,$200(A0)
	OR.B	D0,(A0)
	MOVE.W	#$2000,$26(A2)
	MOVE.L	#ExternalInt,$12(A1)
	MOVEQ	#13,D0			; External interrupt
	JSR	-$A8(A6)		; AddIntServer
	LEA	ciabresource.MSG0(PC),A0
	BSR.S	AddResource
	MOVEM.L	(SP)+,A2/A3
	RTS

MakeLib	LEA	Vectors(PC),A0
	SUBA.L	A1,A1
	SUBA.L	A2,A2
;	MOVEQ	#$11,D0
;	ROL.L	#3,D0

	moveq	#136/2,D0
	add.w	D0,D0

	JSR	-$54(A6)		; MakeLibrary
	MOVEA.L	D0,A2			; again, no error check
;	MOVE.B	#8,8(A2)
;	CLR.B	9(A2)

	move.w	#$800,8(A2)

	LEA	$2A(A2),A1
;	MOVE.B	#2,8(A1)
;	MOVE.B	#$78,9(A1)

	move.w	#$278,8(A1)

	MOVE.L	A2,14(A1)
	MOVE.L	A3,$80(A2)
	RTS

AddResource	MOVE.L	A0,10(A1)
	MOVE.L	A0,10(A2)
	MOVEA.L	A2,A1			; A1 input
;	JSR	-$1E6(A6)		; AddResource
;	RTS

	jmp	-$1E6(A6)		; AddResource

IO_PortsInt	MOVEM.L	D2/A2,-(SP)
	MOVEA.L	A1,A2
lbC03F6FC	BCLR	#0,$87(A2)
	BEQ.S	lbC03F710
	MOVEA.L	$80(A2),A1
	MOVEM.L	$18(A1),A1/A5
	JSR	(A5)
lbC03F710	MOVE.W	SR,D0
	ORI.W	#$700,SR
	MOVE.B	$BFED01,D2
	BCLR	#7,D2
	OR.B	$29(A2),D2
	MOVE.B	D2,$29(A2)
	AND.B	$28(A2),D2
	MOVE.B	D2,$84(A2)
	BEQ.S	lbC03F75E
	EOR.B	D2,$29(A2)
	MOVE.W	D0,SR
	MOVEA.L	$7C(A2),A6		; set exec base in A6
	LEA	$DFF000,A0		; set chip register in A0
	LSR.B	#1,D2
;	BCS.S	lbC03F768

	bcc.b	lbC03F746
	movem.l	$40(A2),A1/A5
	jsr	(A5)

lbC03F746	LSR.B	#1,D2
	BCS.S	lbC03F772
	BEQ.S	lbC03F6FC
lbC03F74C	LSR.B	#1,D2
	BCS.S	lbC03F77C
	BEQ.S	lbC03F6FC
lbC03F752	LSR.B	#1,D2
	BCS.S	lbC03F786
	BEQ.S	lbC03F6FC
lbC03F758	LSR.B	#1,D2
	BCS.S	lbC03F790
	BRA.S	lbC03F6FC

lbC03F75E	MOVE.W	D0,SR
	MOVEM.L	(SP)+,D2/A2
	MOVEQ	#0,D0
	RTS

lbC03F790	MOVEM.L	$70(A2),A1/A5
	JSR	(A5)
;	BRA.L	lbC03F6FC

	bra.b	lbC03F6FC


;lbC03F768	MOVEM.L	$40(A2),A1/A5
;	JSR	(A5)
;	BRA.S	lbC03F746

lbC03F772	MOVEM.L	$4C(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F74C

lbC03F77C	MOVEM.L	$58(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F752

lbC03F786	MOVEM.L	$64(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F758


; A0 and A6 are not set for ExternalInt handler

ExternalInt	MOVEM.L	D2/A2,-(SP)
	MOVE.B	$BFDD00,D2
	BCLR	#7,D2
	OR.B	$29(A1),D2
	MOVE.B	D2,$29(A1)
	AND.B	$28(A1),D2
	BEQ.S	lbC03F7E0
	MOVE.B	D2,$84(A1)
	MOVEA.L	A1,A2
	EOR.B	D2,$29(A2)
	LSR.B	#1,D2
;	BCS.S	lbC03F7E8

	bcc.b	lbC03F7C6
	movem.l	$40(A2),A1/A5
	jsr	(A5)

lbC03F7C6	LSR.B	#1,D2
	BCS.S	lbC03F7F2
	BEQ.S	lbC03F7DC
lbC03F7CC	LSR.B	#1,D2
	BCS.S	lbC03F7FC
	BEQ.S	lbC03F7DC
lbC03F7D2	LSR.B	#1,D2
	BCS.S	lbC03F806
	BEQ.S	lbC03F7DC
lbC03F7D8	LSR.B	#1,D2
	BCS.S	lbC03F810
lbC03F7DC	CLR.B	$84(A2)
lbC03F7E0	MOVEM.L	(SP)+,D2/A2
	MOVEQ	#0,D0
	RTS

;lbC03F7E8	MOVEM.L	$40(A2),A1/A5
;	JSR	(A5)
;	BRA.S	lbC03F7C6

lbC03F7F2	MOVEM.L	$4C(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7CC

lbC03F7FC	MOVEM.L	$58(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7D2

lbC03F806	MOVEM.L	$64(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7D8

lbC03F810	MOVEM.L	$70(A2),A1/A5
	JSR	(A5)
	BRA.S	lbC03F7DC

; D0 - input
; A1 - input
; A6 - resource base
; D0 - output

AddICRVector	MOVEQ	#0,D1
	MOVE.B	D0,D1
	MULU.W	#12,D1
	MOVEA.L	$7C(A6),A0
	MOVE.W	#$4000,$DFF09A
	ADDQ.B	#1,$126(A0)
	LEA	$40(A6,D1.W),A0
	MOVE.L	8(A0),D1
	BNE.S	lbC03F914
lbC03F8E4	MOVE.L	A1,8(A0)
	MOVE.L	$12(A1),4(A0)
	MOVE.L	14(A1),(A0)
	BSET	D0,$85(A6)
	MOVE.W	#$80,D1
	BSR.S	lbC03F96C
lbC03F8FC	MOVEA.L	$7C(A6),A0
	SUBQ.B	#1,$126(A0)
	BGE.S	lbC03F90E
	MOVE.W	#$C000,$DFF09A
lbC03F90E	RTS

lbC03F910	MOVE.L	D1,D0
	BRA.S	lbC03F8FC

lbC03F914	BTST	D0,$86(A6)
	BEQ.S	lbC03F910
	MOVEM.L	D0-D3/A0-A3/A6,-(SP)
	BSR.S	lbC03F978
	BNE.S	lbC03F950
	BSR.S	lbC03F992
	MOVEM.L	(SP)+,D0-D3/A0-A3/A6
	BRA.S	lbC03F8E4

; D0 - input
; A1 - input
; A6 - resource base

RemICRVector	MOVEA.L	$7C(A6),A0
	MOVE.W	#$4000,$DFF09A
	ADDQ.B	#1,$126(A0)
	BSR.S	lbC03F956
	MOVEM.L	D0-D3/A0-A3/A6,-(SP)
	BSR.S	lbC03F978
	MOVEM.L	8(A1),D0/D1/A6
	CMP.B	D1,D3
	BLE.S	lbC03F950
	BSR.S	lbC03F956
	BSR.S	lbC03F992
lbC03F950	MOVEM.L	(SP)+,D0-D3/A0-A3/A6
	BRA.S	lbC03F910

lbC03F956	MOVEQ	#0,D1
	MOVE.B	D0,D1
	MULU.W	#12,D1
	LEA	$40(A6,D1.W),A0
	CLR.L	8(A0)
	MOVEQ	#0,D1
	BCLR	D0,$85(A6)
lbC03F96C	BSET	D0,D1
	MOVE.W	D1,D0
;	BSR.L	AbleICR

	bsr.b	AbleICR

	MOVEQ	#0,D0
	RTS

lbC03F978	MOVEA.L	$80(A6),A1
	MOVEM.L	(A1),A2/A3
	MOVEQ	#3,D3
	MOVEQ	#$40,D2
lbC03F984	EXG	A3,A2
	LSR.B	#3,D2
	BTST	D2,$85(A2)
	DBEQ	D3,lbC03F984
	RTS

lbC03F992	AND.B	#1,D2
	MOVEM.L	D2/D3/A2,8(A1)
	CLR.B	$86(A3)
	CLR.B	$86(A2)
	BSET	D2,$86(A2)
	MOVEA.L	$14(A1),A0
	JMP	(A0)

; D0 - input
; A6 - resource base
; D0 - output

AbleICR
;	MOVEA.L	$7C(A6),A0
;	MOVE.W	#$4000,$DFF09A
;	ADDQ.B	#1,$126(A0)
;	MOVEA.L	$22(A6),A0		; timer

	bsr.b	SetMe

	MOVE.B	D0,$D00(A0)
	MOVEQ	#0,D1
	MOVE.B	$28(A6),D1
	TST.B	D0
	BEQ.S	lbC03F85E
	BCLR	#7,D0
	BNE.S	lbC03F8BC
	NOT.B	D0
	AND.B	D0,$28(A6)
	BRA.S	lbC03F85E

lbC03F8BC	OR.B	D0,$28(A6)
	BRA.S	lbC03F85E

SetMe
	move.l	$7C(A6),A0
	move.w	#$4000,$DFF09A
	addq.b	#1,$126(A0)
	move.l	$22(A6),A0		; timer
	rts

; D0 - input
; A6 - resource base
; D0 - output

SetICR
;	MOVEA.L	$7C(A6),A0		; exec base
;	MOVE.W	#$4000,$DFF09A
;	ADDQ.B	#1,$126(A0)
;	MOVEA.L	$22(A6),A0		; timer

	bsr.b	SetMe

	MOVE.B	$D00(A0),D1
	BCLR	#7,D1
	OR.B	D1,$29(A6)
	MOVEQ	#0,D1
	MOVE.B	$29(A6),D1
	OR.B	$84(A6),D1
	TST.B	D0
	BEQ.S	lbC03F85E
	BCLR	#7,D0
	BNE.S	lbC03F85A
	NOT.B	D0
	AND.B	D0,$29(A6)
	AND.B	D0,$84(A6)
	BRA.S	lbC03F85E

lbC03F85A	OR.B	D0,$29(A6)
lbC03F85E	MOVE.B	$28(A6),D0
	AND.B	$29(A6),D0
	BEQ.S	lbC03F876
	MOVE.W	$26(A6),D0
	OR.W	#$8000,D0
	MOVE.W	D0,$DFF09C
lbC03F876	MOVEA.L	$7C(A6),A0		; exec base
	SUBQ.B	#1,$126(A0)
	BGE.S	lbC03F888
	MOVE.W	#$C000,$DFF09A
lbC03F888	MOVE.L	D1,D0
	RTS

ciaresource.MSG	dc.b	'cia.resource',0
;		dc.b	0
ciaaresource.MSG1	dc.b	'ciaa.resource',0
ciabresource.MSG0	dc.b	'ciab.resource',0
cia39110392.MSG	dc.b	'cia 40.0 (4.1.2013)',$D,$A,0

	cnop	0,4
EndSkip
Don_Adan is offline  
Old 26 January 2013, 16:03   #51
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Quote:
Originally Posted by fgh View Post
Could some of you ROM-gurus check this patch that Toni Wilen has suggested will keep PCMCIA enabled with >4MB Z2-RAM installed?
I don't think that this patch will be works correctly, other method must be used. Z2-RAM and cardresource RAM can used this same memory from $600000 to $A00000 area. Then Z2-RAM check must be used in other place.
Don_Adan is offline  
Old 26 January 2013, 16:21   #52
fgh
Registered User
 
Join Date: Dec 2010
Location: Norway
Posts: 817
Thanks for having a look at it!

Yes, cardresource RAM would conflict with Z2-RAM above 4MB, but all other PCMCIA equipment (CF/SD-adapters, wifi, ethernet, modems, SCSI, etc) would work, which is a big improvement for anyone with 8MB Z2-RAM and KS3.1.

And I'm sure there are far less people trying to use PCMCIA SRAM with 8MB Z2-RAM, than people trying to use all those other pcmcia cards with 8MB Z2-RAM.

(Of course, if there would be a way to just disable PCMCIA RAM, and not other cards, that would be the ultimate solution..)
fgh is offline  
Old 26 January 2013, 16:45   #53
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Quote:
Originally Posted by fgh View Post
Thanks for having a look at it!

Yes, cardresource RAM would conflict with Z2-RAM above 4MB, but all other PCMCIA equipment (CF/SD-adapters, wifi, ethernet, modems, SCSI, etc) would work, which is a big improvement for anyone with 8MB Z2-RAM and KS3.1.

And I'm sure there are far less people trying to use PCMCIA SRAM with 8MB Z2-RAM, than people trying to use all those other pcmcia cards with 8MB Z2-RAM.

(Of course, if there would be a way to just disable PCMCIA RAM, and not other cards, that would be the ultimate solution..)
I can make test version for support only Z2-RAM, if more than 4MB Z2-RAM is available, pcmcia memory will be ignored, but I can't test this version, due I don't have working Amiga within PCMCIA.
Don_Adan is offline  
Old 26 January 2013, 17:09   #54
fgh
Registered User
 
Join Date: Dec 2010
Location: Norway
Posts: 817
That would be great!
I don't have an amiga with 8mb z2-RAM anymore, but if such a patch can simply be loaded with loadmodule, I'm sure I can find someone to test it.
fgh is offline  
Old 27 January 2013, 14:19   #55
Don_Adan
Registered User
 
Join Date: Jan 2008
Location: Warsaw/Poland
Age: 55
Posts: 1,959
Quote:
Originally Posted by fgh View Post
That would be great!
I don't have an amiga with 8mb z2-RAM anymore, but if such a patch can simply be loaded with loadmodule, I'm sure I can find someone to test it.
I made two test versions. Perhaps one can works.
Attached Files
File Type: lzx card.lzx (7.8 KB, 309 views)
Don_Adan is offline  
Old 27 January 2013, 14:49   #56
fgh
Registered User
 
Join Date: Dec 2010
Location: Norway
Posts: 817
Great stuff, looking for people to test it...
fgh is offline  
Old 27 January 2013, 18:53   #57
Turran
Moderator
 
Turran's Avatar
 
Join Date: May 2012
Location: Stockholm / Sweden
Age: 49
Posts: 1,572
Ok. tried card.resourcev1 and card.resourcev2. After LoadModule restarts, the amiga just power cycles over and over with the power light blinking, no matter if I have a PCMCIA card in or not.

I am testing on kickstart 3.0, if that matters.

I have an 8mb memory board in the amiga that configures itself as 2 boards. It works fine without PCMCIA card. When I insert a PCMCIA network card (since I have kickstart 3.0), the amiga complains about "Board error" and I only get 4mb fast in workbench. Network card works fine.

As I understand it. If I have kickstart 3.1, the PCMCIA slot or memory card is disabled totally. This "disable half the memory" is a kickstart 3.0 only thing.

However, would be nice to be able to utilize the full 8mb memory with the PCMCIA network card. TCP stack takes up enough memory as it is =)

Last edited by Turran; 27 January 2013 at 20:17.
Turran is offline  
Old 28 January 2013, 01:50   #58
kipper2k
Registered User
 
Join Date: Sep 2006
Location: Thunder Bay, Canada
Posts: 4,323
Not too sure of exactly what the patch can do...

If i had 8mb fastmem and 2mb chipmem in an A600, then will this patch allow the PCMCIA slot to be active so a CF card in the PCMCIA slot can be read for file transfer etc?
kipper2k is offline  
Old 28 January 2013, 21:25   #59
altcomputing
MC68060@85MHz
 
altcomputing's Avatar
 
Join Date: Jan 2011
Location: Poland/Wroclaw
Age: 38
Posts: 76
Quote:
Originally Posted by kipper2k View Post
Not too sure of exactly what the patch can do...

If i had 8mb fastmem and 2mb chipmem in an A600, then will this patch allow the PCMCIA slot to be active so a CF card in the PCMCIA slot can be read for file transfer etc?
No patch can guarantee that. It's a hardware limitation - both PCMCIA and upper 4MB FastRAM use the same address space in MC68000 memory map so they can't be used simultanously. Either you have 4MB+PCMCIA active or 8MB with no PCMCIA.
altcomputing is offline  
Old 28 January 2013, 21:44   #60
fgh
Registered User
 
Join Date: Dec 2010
Location: Norway
Posts: 817
Altcomputing: You're talking about pcmcia ram. Pcmcia I/O address space does not conflict with z2 ram.
fgh 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
Open-source scsi device Don_Adan Coders. System 92 05 January 2024 01:48
Open-source dos.library Don_Adan Coders. System 273 02 September 2020 00:42
Realistic Open Source Ports fishyfish Retrogaming General Discussion 1 25 June 2013 08:10
NewsRog goes Open Source Paul News 0 04 December 2004 16:37
BlitzBasic - Is now open source Djay Amiga scene 2 08 February 2003 01:09

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 09:41.

Top

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