DFB1 Support thread

Discussion and support for the DSTB1 & DFB1 boosters by BadWolf..
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3043
Joined: 19 Nov 2019 12:09

Re: DFB1 Support thread

Post by Badwolf »

This is what MAPROM2.2 does:-

Code: Select all

TTRAM_Install:
; inputs:
;	d0: size
;--------------------------------------------------------------
	move.l	d0,-(sp)			; size
	move.l	#TTRL_MEMBOTTOM,-(sp)		; start
	move.w	#20,-(sp)			; maddalt(size, start)
	trap	#1				; 
	add.l	#6,sp				; keep size on stack
	tst.l	d0				; tos supports altram?
	bne		.fail

	move.w	#0,-(sp)			; allocate st-ram only
	move.l	#$10000,-(sp)			; 64Kb			
	move.w	#68,-(sp)			; Mxalloc
	trap	#1
	addq.l	#8,sp
	tst.l	d0				; failed to allocate?
	beq		.fail
	cmp.l	#-32,d0				; mxalloc not available?
	beq		.fail
	
	move.l	d0,d1				; 64Kb fastram buffer
	move.l	#$5f465242,d0			; '_FRB'
	bsr 	CK_WriteJar			; write cookie

	move.l	(sp)+,d0
	move.l	#TTRL_MEMBOTTOM,d1	
	add.l	d0,d1				; d1 = memtop
	move.l	d1,$5a4.w			; write fastram top
	move.l	#TTRL_FASTRAMMAGIC,$5a8.w	; write fastram magic
	rts
.fail:
	addq.l	#4,sp
	moveq.l	#0,d0
	rts
Which, assuming cookie writing succeeds -- and it extends the jar if not -- looks ok to me.

Crucially, which is what I forgot when I wrote my first AltRAM declaration program, is to TSR.

Code: Select all

SYS_QuitKeepResident:
;--------------------------------------------------------------
	move.w	#0,-(sp)		; Ptermres()
	lea		gSYS_TsrSize(pc),a0
	move.l	(a0),-(sp)
	move.w	#49,-(sp)
	trap	#1
	addq.l	#8,sp
gSYS_TsrSize is initialsied here:

Code: Select all

_entrypoint
;--------------------------------------------------------------
  	move.l	4(sp),a0		; a0 = basepage
  	lea		gSYS_Stack(pc),sp	; initalize stack
	move.l	#100,d0			; basepage size
	add.l	#$1000,d0		; 
  	add.l	$c(a0),d0		; text size
  	add.l	$14(a0),d0		; data size
  	add.l	$1c(a0),d0		; bss size
	lea		gSYS_TsrSize(pc),a1
	move.l	d0,(a1)
Now, I don't know enough about TSRs, nor assembly, nor TOS to know a) what's happening here and b) what happens to the Mxalloc()'d memory for the FRB at this point. Does Ptermres() stop the release of all memory Mxalloc()'d by a process?

'Cos if not, I can see a problem.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3043
Joined: 19 Nov 2019 12:09

Re: DFB1 Support thread

Post by Badwolf »

dml wrote: 24 Nov 2022 15:18 From what I gather, HDDriver may even install its own (this could be confirmed by booting clean with it and inspecting the cookie list with the CPX). Assuming it does that, subsequently ignoring its own _FRB would be a bug.
...
dml wrote: 24 Nov 2022 15:22 And my own TK040 driver checks for 'XFRB', which is a sized version of _FRB. I don't remember what software defines that one.
I stumbled across that one the other day and I think XFRB is an HDDriver construct.

Which implies it ought to know better.

I wonder what happens if HDDriver is loaded from floppy *after* TT-RAM is declared?



I did try to buy a SCSI adapter to check this out myself but couldn't find anything on EBay to plug into the Falcon and give a 50pin IDC port. Anyone any pointers?

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7384
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: DFB1 Support thread

Post by stephen_usher »

Badwolf wrote: 24 Nov 2022 15:41 I did try to buy a SCSI adapter to check this out myself but couldn't find anything on EBay to plug into the Falcon and give a 50pin IDC port. Anyone any pointers?
This would do it. You'd need a terminator.

https://www.ebay.co.uk/itm/134126945703

The name of the connector you're looking for is "HD50" by the way.

You could buy one of these HD50 to DB50 cables and find a female IDC connector and make up the rest of the cable.

https://www.ebay.co.uk/itm/304136985036
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3043
Joined: 19 Nov 2019 12:09

Re: DFB1 Support thread

Post by Badwolf »

stephen_usher wrote: 24 Nov 2022 16:19 This would do it. You'd need a terminator.
https://www.ebay.co.uk/itm/134126945703
Eeek! Iw as actually thinking something more like this:- https://www.ebay.co.uk/itm/392236581097

But we need Male rather than Female, IIRC.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
mfro
Posts: 124
Joined: 13 Dec 2018 07:32

Re: DFB1 Support thread

Post by mfro »

Badwolf wrote: 24 Nov 2022 15:36... Does Ptermres() stop the release of all memory Mxalloc()'d by a process?...

'Cos if not, I can see a problem.

BW
No worries, that's what Ptermres() does. It's not only "stopping the release" but it completely unhooks allocated blocks from memory management. They simply do not exist anymore from the GEMDOS point of view.
And remember: Beethoven wrote his first symphony in C.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7384
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: DFB1 Support thread

Post by stephen_usher »

Badwolf wrote: 24 Nov 2022 16:26 Eeek! Iw as actually thinking something more like this:- https://www.ebay.co.uk/itm/392236581097

But we need Male rather than Female, IIRC.

BW
See my later edit to my post...
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7384
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: DFB1 Support thread

Post by stephen_usher »

OK, a DB50 female IDC socket is not cheap at £23! https://uk.rs-online.com/web/p/d-sub-connectors/1210157

P.S.

Alternatively... https://www.ebay.co.uk/itm/230460442947

So the whole set of two cables would cost just over £10
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3043
Joined: 19 Nov 2019 12:09

Re: DFB1 Support thread

Post by Badwolf »

mfro wrote: 24 Nov 2022 16:26 No worries, that's what Ptermres() does. It's not only "stopping the release" but it completely unhooks allocated blocks from memory management. They simply do not exist anymore from the GEMDOS point of view.
Grand, thanks, mfro. So it looks to me like MAPROM/FASTRAM is doing the right thing.

I think the only check left is to see if _FRB is actually set.

Although I would be interested in knowing if there's any change to what happens if HDDriver is run *after* MAPROM (eg from floppy).

The more information to report to Uwe the better.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3043
Joined: 19 Nov 2019 12:09

Re: DFB1 Support thread

Post by Badwolf »

stephen_usher wrote: 24 Nov 2022 16:33 Alternatively... https://www.ebay.co.uk/itm/230460442947
So the whole set of two cables would cost just over £10
I was staring wistfully at that one but it's female again.

What are the two combined you referred to? The best combination I could find was an HD50 to HD68 and then an HD68 to IDC50.

But then I thought life's too short! :lol:

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
stephen_usher
Site sponsor
Site sponsor
Posts: 7384
Joined: 13 Nov 2017 19:19
Location: Oxford, UK.

Re: DFB1 Support thread

Post by stephen_usher »

Badwolf wrote: 24 Nov 2022 16:41
stephen_usher wrote: 24 Nov 2022 16:33 Alternatively... https://www.ebay.co.uk/itm/230460442947
So the whole set of two cables would cost just over £10
I was staring wistfully at that one but it's female again.

What are the two combined you referred to? The best combination I could find was an HD50 to HD68 and then an HD68 to IDC50.

But then I thought life's too short! :lol:

BW
This: https://www.ebay.co.uk/itm/304136985036 Plus this: https://www.ebay.co.uk/itm/230460442947
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.

Return to “DSTB1 & DFB1 booster by BadWolf”

Who is online

Users browsing this forum: ClaudeBot and 45 guests