Milan BIOS and Radeon

All things related to the Hades and Milan clones

Moderators: Mug UK, lp, moondog/.tSCc., [ProToS], Moderator Team

PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

I think I found the same block. It didn't mean a lot to me.

I haven't done any hardware code since uni and that was in m68k assembler.

It might be useful to get it to compile with gcc 14 so that gdb can be used.
medmed
Atari Super Hero
Atari Super Hero
Posts: 983
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Milan BIOS and Radeon

Post by medmed »

What's your error with gcc14? I used gcc 9.5.

You can also adapt with dbg() like that

Code: Select all

                            ...
                            if(rinfo){
                            dbg("rinfo non null\r\n");
                            if(rinfo->bios_seg_phys){
                            dbg("rinfo->bios_seg_phys non null\r\n");
                            }
                            }
                            if(pci_rsc_desc){
                            dbg("pci_rsc_desc non null\r\n");
                            if(pci_rsc_desc->start){
                            dbg("pci_rsc_desc->start non null\r\n");
                            }
                            }                            
                            dbg("rinfo->bios_seg_phys = pci_rsc_desc->start -> %x\r\n",
                                    pci_rsc_desc->start);
                            rinfo->bios_seg_phys = pci_rsc_desc->start;
                            if (BIOS_IN16(0) == 0xaa55)
                            {
                                dbg("rinfo->bios_seg = %x + %x\r\n",
                                    pci_rsc_desc->offset, pci_rsc_desc->start);
                                rinfo->bios_seg = (void *)(pci_rsc_desc->offset + pci_rsc_desc->start);
                            }
So you'll know where it falls.
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

Adding some debug statements:

Code: Select all

###->           pci_rsc_desc->flags = 0x702
DEBUG (radeonfb_pci_register()): flags 0xa702
DEBUG (radeonfb_pci_register()):        start 0x30020000
DEBUG (radeonfb_pci_register()):        offset 0x40000000
DEBUG (radeonfb_pci_register()):        length 0x20000
###->           pci_rsc_desc->flags = 0xa702
DEBUG (radeonfb_pci_register()): FLG_ROM resource descriptor found
DEBUG (radeonfb_pci_register()):        start = 0x30020000, size = 0x20000
DEBUG (radeonfb_pci_register()):        bios_seg = (nil)
DEBUG (radeonfb_pci_register()):        pci_rsc_desc->start = 0x30020000
It looks like the if (BIOS_IN16(0)... is the issue.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

Or the assignment line to rinfo->bios_seg_phys
medmed
Atari Super Hero
Atari Super Hero
Posts: 983
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Milan BIOS and Radeon

Post by medmed »

Code: Select all

#define BIOS_IN16(v) 	((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v) | \
			  ((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v+1) << 8))
This is handled by pci_read_mem_byte_fast() function.

May be rinfo->bios_seg_phys is NULL or something is wrong with pci_read_mem_byte_fast()
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

It looks like this is the cause

Code: Select all

 dbg("rinfo->bios_seg[0] (%p) was %x (expected 0xaa55)\r\n",
                                    rinfo->bios_seg_phys, * (uint16_t *) rinfo->bios_seg_phys);
medmed
Atari Super Hero
Atari Super Hero
Posts: 983
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Milan BIOS and Radeon

Post by medmed »

And if you comment this dbg line then will it pass?
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

I commented it and it seemed to hang, I couldn't open the task manager but ctrl-alt-del worked.

It does return0; so it won't complete the VGA bios stuff.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

AGranlund made an interesting observation about the boot time, in this thread viewtopic.php?p=472768#p472768
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

medmed wrote: Thu Dec 12, 2024 6:29 pm

Code: Select all

#define BIOS_IN16(v) 	((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v) | \
			  ((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v+1) << 8))
This is handled by pci_read_mem_byte_fast() function.

May be rinfo->bios_seg_phys is NULL or something is wrong with pci_read_mem_byte_fast()
In the do-while loop I think

Code: Select all

if (BIOS_IN16(0) == 0xaa55) 
has to be true for it to work properly, otherwise it just returns.
medmed
Atari Super Hero
Atari Super Hero
Posts: 983
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Milan BIOS and Radeon

Post by medmed »

PeterS wrote: Fri Dec 13, 2024 3:33 pm
medmed wrote: Thu Dec 12, 2024 6:29 pm

Code: Select all

#define BIOS_IN16(v) 	((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v) | \
			  ((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v+1) << 8))
This is handled by pci_read_mem_byte_fast() function.

May be rinfo->bios_seg_phys is NULL or something is wrong with pci_read_mem_byte_fast()
In the do-while loop I think

Code: Select all

if (BIOS_IN16(0) == 0xaa55) 
has to be true for it to work properly, otherwise it just returns.
And if you print his var with dbg and %x ?
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

The value is 8051
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

pcibios_read_mem_byte_fast uses cookie_pci

Maybe it doesn't exist or is different on the Milan.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

20180930130350394.jpg
The card I'm using it's labelled ATi D33053 RV6P NB3.

There are still a few around https://www.impactcomputers.com/boards- ... n-rv6p-nb3
You do not have the required permissions to view the files attached to this post.
medmed
Atari Super Hero
Atari Super Hero
Posts: 983
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Milan BIOS and Radeon

Post by medmed »

PeterS wrote: Sat Dec 14, 2024 5:26 pm 20180930130350394.jpg

The card I'm using it's labelled ATi D33053 RV6P NB3.

There are still a few around https://www.impactcomputers.com/boards- ... n-rv6p-nb3
You can try to replace aa55 with the dbg number
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

I was thinking the same but haven't tried it yet.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

This doesn't make sense, am I doing something dumb ?

Code: Select all

DEBUG (framebuffer_alloc()):
DEBUG (radeonfb_pci_register()): Set base addrs
DEBUG (radeonfb_pci_register()): flags 0x702
DEBUG (radeonfb_pci_register()):        start 0x28000000
DEBUG (radeonfb_pci_register()):        offset 0x40000000
DEBUG (radeonfb_pci_register()):        length 0x8000000
DEBUG (radeonfb_pci_register()): host bridge is little endian
DEBUG (radeonfb_pci_register()): flags 0x4702
DEBUG (radeonfb_pci_register()):        start 0x8c00
DEBUG (radeonfb_pci_register()):        offset 0xc0000000
DEBUG (radeonfb_pci_register()):        length 0x100
DEBUG (radeonfb_pci_register()): flags 0x702
DEBUG (radeonfb_pci_register()):        start 0x30000000
DEBUG (radeonfb_pci_register()):        offset 0x40000000
DEBUG (radeonfb_pci_register()):        length 0x10000
###->           pci_rsc_desc->flags = 0x702
DEBUG (radeonfb_pci_register()): flags 0xa702
DEBUG (radeonfb_pci_register()):        start 0x30020000
DEBUG (radeonfb_pci_register()):        offset 0x40000000
DEBUG (radeonfb_pci_register()):        length 0x20000
###->           pci_rsc_desc->flags = 0xa702
DEBUG (radeonfb_pci_register()): FLG_ROM resource descriptor found
DEBUG (radeonfb_pci_register()):        start = 0x30020000, size = 0x20000
DEBUG (radeonfb_pci_register()):        bios_seg = (nil)
DEBUG (radeonfb_pci_register()):        pci_rsc_desc->start = 0x30020000
DEBUG (radeonfb_pci_register()):        rinfo->bios_seg_phys = 0x30020000
DEBUG (radeonfb_pci_register()):        1: BIOS_IN16(0) = 0x8051
DEBUG (radeonfb_pci_register()):        2: BIOS_IN16(0) = 0xc000
Bus Error
You do not have the required permissions to view the files attached to this post.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

Could the rage card be interfering with the pci values ?
medmed
Atari Super Hero
Atari Super Hero
Posts: 983
Joined: Sat Apr 02, 2011 5:06 am
Location: France, Paris

Re: Milan BIOS and Radeon

Post by medmed »

PeterS wrote: Sun Dec 15, 2024 3:45 pm Could the rage card be interfering with the pci values ?
I'm pretty sure the ati original driver interfer with this one. Plus this one was forked hardely from firebee driver who was design for one gpu only. We need some didier mequignon or rodolph to clear this :)
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

Or DGalvez who knows the pci stuff.

Interestingly, when booting up the XBoot screen has some corruption. It might just be analogue interference.
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

I had some ideas about how to try and move forwards and I hope to try them over the next week.

1. Boot into single TOS with the existing ATI driver disabled
2. Modfiy the code to take out the check on 0xaa55 to see if anything sensible happens
PeterS
Atari Super Hero
Atari Super Hero
Posts: 995
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Milan BIOS and Radeon

Post by PeterS »

I just tried booting from a floppy with the radeon.prg in the auto folder and without the Rage card.

There is no output on the vga or DVI of the Radeon.
Post Reply

Return to “Hades / Milan / Raven”