Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
875a7b3
Fixed Typo in copper.h
DerThore Mar 18, 2023
970a8fd
Merge branch 'ApolloTeam-dev:master' into master
DerThore Apr 18, 2023
5b01a3b
Merge branch 'ApolloTeam-dev:master' into master
DerThore Aug 18, 2023
583b83f
Add Interlace modes, prepare SuperHires
DerThore Aug 27, 2023
f8f9d54
Merge branch 'ApolloTeam-dev:master' into master
DerThore Aug 30, 2023
971ef3d
Merge branch 'ApolloTeam-dev:master' into master
DerThore Sep 1, 2023
39b5f94
Implement setwritemask
DerThore Sep 10, 2023
e11c99c
Implement minterms
DerThore Sep 10, 2023
c4b3527
Implement minterms
DerThore Sep 10, 2023
788d507
Implement minterms
DerThore Sep 10, 2023
7637c1f
Implement minterms
DerThore Sep 10, 2023
46c6c76
Implement minterms
DerThore Sep 10, 2023
484e2cb
Implement minterms
DerThore Sep 10, 2023
b3d3ca8
Implement minterms
DerThore Sep 10, 2023
454007b
WritePixel rewrite
DerThore Sep 12, 2023
ea2d00f
dragging and swapping screens
DerThore Oct 31, 2023
7bcc2b0
Show screens while dragging
DerThore Oct 31, 2023
6fd1402
Repair requesters
DerThore Nov 21, 2023
5004528
Temp workaround for SysInfo
DerThore Nov 24, 2023
3a7623b
Temp workaround for SysInfo
DerThore Nov 24, 2023
7f92f2a
Better detection of matching screenmode
DerThore Feb 8, 2024
731b4a1
Better detection of matching screenmode
DerThore Feb 8, 2024
7a3d293
Mouse Pointer visible in flipped screen
DerThore Feb 8, 2024
a428f5f
Better detection for CGX screens
DerThore Feb 8, 2024
ea3725e
Aktualisieren von bestmodeida.c
DerThore Feb 8, 2024
1b34a07
Aktualisieren von bestmodeida.c
DerThore Feb 8, 2024
ec8d576
Aktualisieren von bestmodeida.c
DerThore Feb 8, 2024
0785712
Update bestmodeida.c
DerThore Feb 9, 2024
9063b88
Correcting parameter order
DerThore Mar 14, 2024
6b91bca
Update amigavideo_hiddclass.c
DerThore Jul 29, 2024
72ff6cb
Update videocontrol.c
DerThore Jul 29, 2024
aa56e4c
Update videocontrol.c
DerThore Jul 30, 2024
80ac89a
Merge branch 'master' into master
WDrijver Oct 10, 2024
9669f3f
Remove RT from AllocMem
DerThore Nov 7, 2024
833e840
Remove RT from AllocMem
DerThore Nov 7, 2024
9dd6e6d
Enhance GELS with HWSprites
DerThore Nov 7, 2024
966b9ca
Update drawglist.c
DerThore Nov 7, 2024
b594bae
Update start.c for new core
DerThore Dec 25, 2024
837e289
Merge branch 'ApolloTeam-dev:master' into master
DerThore Dec 25, 2024
91a6e28
added missing pointer
DerThore Dec 25, 2024
bc9b4fc
DA/DD bus
DerThore Dec 26, 2024
de4422e
DA/DD IDE Bus
DerThore Dec 26, 2024
b52b3f7
DA/DD IDE Bus
DerThore Dec 26, 2024
ed93f51
DA/DD IDE Bus
DerThore Dec 26, 2024
4a64634
DD/DA IDE Bus
DerThore Dec 26, 2024
31cc282
DA/DD IDE Bus
DerThore Dec 26, 2024
f5f04d5
DA/DD IDE Bus
DerThore Dec 26, 2024
7f9641a
Merge branch 'master' into master
WDrijver Dec 27, 2024
7d4c339
DA/DD Gayle
DerThore Dec 28, 2024
5540857
DA/DD Gayle
DerThore Dec 28, 2024
4e2a0cf
DA/DD Gayle
DerThore Dec 28, 2024
75dea24
DA/DD Gayle
DerThore Dec 28, 2024
951b997
DA/DD Gayle
DerThore Dec 28, 2024
f9c17a9
Add GadGImage
DerThore Dec 30, 2024
92d44c7
Make LoadRGB4 more 1.3 and 3.1 compatible
DerThore Dec 30, 2024
0bed016
Aktualisieren von loadrgb4.c
DerThore Dec 30, 2024
01550e7
Add CL Poke Funcs
DerThore Jan 4, 2025
c15337a
Add CL Poke Funcs
DerThore Jan 4, 2025
b767459
Update setrgb4.c
DerThore Jan 4, 2025
c8d0e1d
Aktualisieren von setrgb4.c
DerThore Jan 4, 2025
c889792
Aktualisieren von setrgb4.c
DerThore Jan 4, 2025
01a8576
Update setrgb4.c
DerThore Jan 6, 2025
7dd9fae
Update loadrgb4.c
DerThore Jan 6, 2025
2b81491
change CL in any case
DerThore Jan 9, 2025
eee988f
Implement Changesprite
DerThore Jan 9, 2025
9cc16d2
Update loadrgb4.c
DerThore Jan 10, 2025
d9a835b
Update setrgb4.c
DerThore Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arch/m68k-amiga/hidd/gayle_ata/bus_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ struct ata_ProbedBus
UBYTE *altport;
UBYTE *gayleirqbase;
BOOL a4000;
BOOL a500;
UBYTE doubler;
};

Expand All @@ -22,6 +23,7 @@ struct ATA_BusData
UBYTE *gayleirqbase;
UBYTE *gayleintbase;
BOOL ideintadded;
BOOL a500;
};

struct ataBase
Expand Down
21 changes: 16 additions & 5 deletions arch/m68k-amiga/hidd/gayle_ata/gayleata_busclass.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2013-2020, The AROS Development Team. All rights reserved.
Copyright © 2013-2020, The AROS Development Team. All rights reserved.
$Id$

Desc: A600/A1200/A4000 ATA HIDD
Expand Down Expand Up @@ -57,12 +57,21 @@ static BOOL ata_CreateGayleInterrupt(struct ATA_BusData *bus, UBYTE num)
{
struct Interrupt *irq = &bus->ideint;

bus->gayleintbase = (UBYTE*)GAYLE_INT_1200;
irq->is_Code = (APTR)IDE_Handler_A1200;

if(bus->a500)
{
bus->gayleintbase = (UBYTE*)GAYLE_INT_500;
}
else
{
bus->gayleintbase = (UBYTE*)GAYLE_INT_1200;
}
irq->is_Code = (APTR)IDE_Handler_A1200;

irq->is_Node.ln_Pri = 20;
irq->is_Node.ln_Type = NT_INTERRUPT;
irq->is_Node.ln_Name = "AT-IDE";
if(bus->a500)
irq->is_Node.ln_Name = "AT-IDE2";
else irq->is_Node.ln_Name = "AT-IDE";
irq->is_Data = bus;
AddIntServer(INTB_PORTS, irq);

Expand Down Expand Up @@ -112,6 +121,7 @@ OOP_Object *GAYLEATA__Root__New(OOP_Class *cl, OOP_Object *o, struct pRoot_New *
data->bus->atapb_Node.ln_Succ = (struct Node *)-1;
data->gaylebase = data->bus->port;
data->gayleirqbase = data->bus->gayleirqbase;
data->a500 = data->bus->a500;
//ata_CreateGayleInterrupt(data, 0);

//mDispose = msg->mID - moRoot_New + moRoot_Dispose;
Expand Down Expand Up @@ -201,6 +211,7 @@ APTR GAYLEATA__Hidd_ATABus__GetPIOInterface(OOP_Class *cl, OOP_Object *o, OOP_Ms
pio->port = data->bus->port;
pio->altport = data->bus->altport;
pio->dataport = (UBYTE*)(((ULONG)pio->port) & ~3);
pio->a500 = data->bus->a500;
/*
* (A600/A1200) Data port is in a shadow bank of gayle (offset of 0x2000).
* This shadow bank is for 16/32-bit data transfers, while the
Expand Down
28 changes: 26 additions & 2 deletions arch/m68k-amiga/hidd/gayle_ata/interface_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,52 @@ static void ata_outsl(struct pio_data *data, APTR address, ULONG count)
{
volatile ULONG *addr = (ULONG*)data->dataport;


if(data->a500)
{
asm volatile(
"1: move.l (%[address])+,(0xda2000) \n"
" move.l (%[address])+,(0xda2000) \n"
" subq.l #1,%[count] \n"
" bnes 1b \n"
::[count]"d"(count >> 3),[address]"a"(address),[port]"a"(addr));
}
else
{
asm volatile(
"1: move.l (%[address])+,(0xdd2000) \n"
" move.l (%[address])+,(0xdd2000) \n"
" subq.l #1,%[count] \n"
" bnes 1b \n"
::[count]"d"(count >> 3),[address]"a"(address),[port]"a"(addr));
}

}


static void ata_insl(struct pio_data *data, APTR address, ULONG count)
{
volatile ULONG *addr = (ULONG*)data->dataport;


if(data->a500)
{
asm volatile(
" bra 2f \n"
"1: \n"
" move16 0x00da6000,(%[address])+ \n"
" move16 0x00da6000,(%[address])+ \n"
"2: dbra %[count],1b \n"
::[count]"d"(count >> 5),[address]"a"(address));
}
else
{
asm volatile(
" bra 2f \n"
"1: \n"
" move16 0x00dd6000,(%[address])+ \n"
" move16 0x00dd6000,(%[address])+ \n"
"2: dbra %[count],1b \n"
::[count]"d"(count >> 5),[address]"a"(address));
}
}

const APTR bus_FuncTable[] =
Expand Down
13 changes: 12 additions & 1 deletion arch/m68k-amiga/hidd/gayle_ata/interface_pio.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@
/*
* Standard Amiga Gayle Definitions
*/
#define GAYLE_BASE_1200 0xdd0000 /* 0xda0000.W, 0xda0004.B, 0xda0008.B ... */
#if VAMPIRECARDSERIES==2
#define GAYLE_BASE_1200 0xda0000 /* 0xda0000.W, 0xda0004.B, 0xda0008.B ... */
#define GAYLE_IRQ_1200 0xda9000
#define GAYLE_INT_1200 0xdaa000
#else
#define GAYLE_BASE_1200 0xdd0000 /* 0xdd0000.W, 0xdd0004.B, 0xdd0008.B ... */
#define GAYLE_IRQ_1200 0xdd9000
#define GAYLE_INT_1200 0xdda000
#endif

#define GAYLE_BASE_4000 0xdd2022 /* 0xdd2020.W, 0xdd2026.B, 0xdd202a.B ... (argh!) */
#define GAYLE_IRQ_4000 0xdd3020

#define GAYLE_BASE_500 0xda0000 /* Let's call it A500 even if it's used in others as well */
#define GAYLE_IRQ_500 0xda9000
#define GAYLE_INT_500 0xdaa000

#define GAYLE_IRQ_IDE 0x80
#define GAYLE_INT_IDE 0x80

Expand All @@ -22,6 +32,7 @@ struct pio_data
UBYTE *dataport;
UBYTE *port;
UBYTE *altport;
BOOL a500;
};

extern const APTR bus_FuncTable[];
Expand Down
193 changes: 132 additions & 61 deletions arch/m68k-amiga/hidd/gayle_ata/probe.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2013-2020, The AROS Development Team. All rights reserved.
Copyright © 2013-2020, The AROS Development Team. All rights reserved.
$Id$

Desc: A600/A1200/A4000 ATA HIDD hardware detection routine
Expand Down Expand Up @@ -33,18 +33,63 @@



static UBYTE *getport(struct ata_ProbedBus *ddata)
static UBYTE *getport(struct ata_ProbedBus *ddata, int a500)
{
volatile struct Custom *custom = (struct Custom*)0xdff000;
UBYTE id, status1, status2;
volatile UBYTE *port, *altport;
struct GfxBase *gfx;

int retrynum = 0;

struct GayleAdr {unsigned short a;};
struct GayleAdr *ga = (struct GayleAdr *)0xda0018;
struct GayleAdr *gd = (struct GayleAdr *)0xdd0018;
struct GayleAdr *ca = (struct GayleAdr *)0xda1010;
struct GayleAdr *cd = (struct GayleAdr *)0xdd1010;
struct GayleAdr *cmda = (struct GayleAdr *)0xda101C;
struct GayleAdr *cmdd = (struct GayleAdr *)0xdd101C;
struct Board {UWORD type;};
struct Board *MyBoard = (struct Board *)0xDFF3FC;
/* Is the following correct or can we do it more intelligent? */
if(a500 > 0)
{
// A500 only has one controller
if((MyBoard->type == 0x02)||(MyBoard->type == 0x03))
return 0;
ga->a = 0x0;
cmda->a = 0x10;
ca->a = 0x10;
if(ca->a != 0x10) return 0; // no hardware?
ca->a = 0x34;
if(ca->a != 0x34) return 0; // no hardware?
if((ga->a & 0xFF) == 0xFF) return 0;
}
else
{
gd->a = 0x0;
cd->a = 0x10;
cmdd->a = 0x10;
if(cd->a != 0x10) return 0; // no hardware?
cd->a = 0x34;
if(cd->a != 0x34) return 0; // no hardware?
if((gd->a & 0xFF ) == 0xFF) return 0;
}

port = NULL;
gfx = (struct GfxBase*)TaggedOpenLibrary(TAGGEDOPEN_GRAPHICS);
Disable();
port = (UBYTE*)GAYLE_BASE_1200;
ddata->gayleirqbase = (UBYTE*)GAYLE_IRQ_1200;
if(a500 > 0)
{
port = (UBYTE*)GAYLE_BASE_500;
ddata->gayleirqbase = (UBYTE*)GAYLE_IRQ_500;
ddata->a500 = TRUE;
}
else
{
port = (UBYTE*)GAYLE_BASE_1200;
ddata->gayleirqbase = (UBYTE*)GAYLE_IRQ_1200;
ddata->a500 = FALSE;
}
Enable();
CloseLibrary((struct Library*)gfx);

Expand Down Expand Up @@ -73,7 +118,9 @@ static UBYTE *getport(struct ata_ProbedBus *ddata)
if ( (((status1 | status2) & (ATAF_BUSY | ATAF_DRDY)) == (ATAF_BUSY | ATAF_DRDY))
|| ((status1 | status2) & (ATAF_ERROR | ATAF_DATAREQ)))
{
// goto RETRY;
retrynum++;
if(retrynum == 10) return NULL;
goto RETRY;

//D(bug("[ATA:Gayle] No Devices detected\n");)
//return NULL;
Expand All @@ -87,70 +134,94 @@ static int gayle_bus_Scan(struct ataBase *base)
{
struct ata_ProbedBus *probedbus;
OOP_Class *busClass = base->GayleBusClass;
struct TagItem ata_tags[] =

for(int i=0; i<2; i++)
{
{aHidd_Name , (IPTR)"ata_gayle.hidd" },
{aHidd_HardwareName , 0 },

struct TagItem ata_tags[] =
{
{aHidd_Name , (IPTR)"ata_gayle.hidd" },
{aHidd_HardwareName , 0 },
#define ATA_TAG_HARDWARENAME 1
{TAG_DONE , 0 }
};

probedbus = AllocVec(sizeof(struct ata_ProbedBus), MEMF_ANY | MEMF_CLEAR);
if (probedbus && getport(probedbus)) {
OOP_Object *ata;
if (probedbus->doubler == 0)
ata_tags[ATA_TAG_HARDWARENAME].ti_Data = (IPTR)"Amiga(tm) Gayle IDE Controller";
{TAG_DONE , 0 }
};

probedbus = AllocVec(sizeof(struct ata_ProbedBus), MEMF_ANY | MEMF_CLEAR);
if (probedbus && getport(probedbus, i)) {
OOP_Object *ata;
if(i == 0)
{
if (probedbus->doubler == 0)
ata_tags[ATA_TAG_HARDWARENAME].ti_Data = (IPTR)"Amiga(tm) Gayle IDE Controller";
else
ata_tags[ATA_TAG_HARDWARENAME].ti_Data = (IPTR)"Amiga(tm) Gayle IDE Controller + Port Doubler";
}
else
ata_tags[ATA_TAG_HARDWARENAME].ti_Data = (IPTR)"Amiga(tm) Gayle IDE Controller + Port Doubler";

ata = HW_AddDriver(base->storageRoot, base->ataClass, ata_tags);
if (ata) {
struct TagItem attrs[] =
{
{aHidd_Name , (IPTR)"ata_gayle.hidd" },
{aHidd_HardwareName , 0 },
if (probedbus->doubler == 0)
ata_tags[ATA_TAG_HARDWARENAME].ti_Data = (IPTR)"Amiga(tm) Gayle IDE Controller 2";
else
ata_tags[ATA_TAG_HARDWARENAME].ti_Data = (IPTR)"Amiga(tm) Gayle IDE Controller 2 + Port Doubler";
}

ata = HW_AddDriver(base->storageRoot, base->ataClass, ata_tags);
if (ata) {
struct TagItem attrs[] =
{
{aHidd_Name , (IPTR)"ata_gayle.hidd" },
{aHidd_HardwareName , 0 },
#define BUS_TAG_HARDWARENAME 1
{aHidd_DriverData , (IPTR)probedbus },
{aHidd_ATABus_PIODataSize , sizeof(struct pio_data) },
{aHidd_ATABus_BusVectors , (IPTR)bus_FuncTable },
{aHidd_ATABus_PIOVectors , (IPTR)pio_FuncTable },
{aHidd_Bus_KeepEmpty , FALSE },
{TAG_DONE , 0 }
};
OOP_Object *bus;

/*
* We use this field as ownership indicator.
* The trick is that HW_AddDriver() fails if either object creation fails
* or subsystem-side setup fails. In the latter case our object will be
* disposed.
* We need to know whether OOP_DisposeObject() or we should deallocate
* this structure on failure.
*/
probedbus->atapb_Node.ln_Succ = NULL;

/*
* Check if we have a FastATA adaptor
*/
attrs[BUS_TAG_HARDWARENAME].ti_Data = (IPTR)"Gayle IDE Channel";
{aHidd_DriverData , (IPTR)probedbus },
{aHidd_ATABus_PIODataSize , sizeof(struct pio_data) },
{aHidd_ATABus_BusVectors , (IPTR)bus_FuncTable },
{aHidd_ATABus_PIOVectors , (IPTR)pio_FuncTable },
{aHidd_Bus_KeepEmpty , FALSE },
{TAG_DONE , 0 }
};
if(i == 1)
attrs[0].ti_Data = (IPTR)"ata_gayle2.hidd";

OOP_Object *bus;

/*
* We use this field as ownership indicator.
* The trick is that HW_AddDriver() fails if either object creation fails
* or subsystem-side setup fails. In the latter case our object will be
* disposed.
* We need to know whether OOP_DisposeObject() or we should deallocate
* this structure on failure.
*/
probedbus->atapb_Node.ln_Succ = NULL;

/*
* Check if we have a FastATA adaptor
*/
if(i == 0)
attrs[BUS_TAG_HARDWARENAME].ti_Data = (IPTR)"Gayle IDE Channel";
else attrs[BUS_TAG_HARDWARENAME].ti_Data = (IPTR)"Gayle IDE Channel 2";


bus = HIDD_StorageController_AddBus(ata, busClass, attrs);
if (bus)
return TRUE;
D(bug("[ATA:Gayle] Failed to create object for device IO: %x:%x IRQ: %x\n",
probedbus->port, probedbus->altport, probedbus->gayleirqbase);)

/*
* Free the structure only upon object creation failure!
* In case of success it becomes owned by the driver object!
*/
if (!probedbus->atapb_Node.ln_Succ)
FreeVec(probedbus);
return TRUE;
bus = HIDD_StorageController_AddBus(ata, busClass, attrs);

// Do not exit, we could have more controllers
// if (bus)
// return TRUE;

D(bug("[ATA:Gayle] Failed to create object for device IO: %x:%x IRQ: %x\n",
probedbus->port, probedbus->altport, probedbus->gayleirqbase);)

/*
* Free the structure only upon object creation failure!
* In case of success it becomes owned by the driver object!
* Edit: Can we really free it yet? We are collecting controllers. Please enable the two lines if sure.
*/
// if (!probedbus->atapb_Node.ln_Succ)
// FreeVec(probedbus);
// return TRUE;
}
}
FreeVec(probedbus);
}
FreeVec(probedbus);

return TRUE;
}
Expand Down
Loading