English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 07 March 2019, 10:16   #261
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 926
Quote:
Originally Posted by bloodline View Post
-Edit- The loaded data in memory looks exactly as it should starting with the second sync mark of the first sector.
Also, I've tried to feed the data without the track gap, doesn't make any difference
Hmm.. Seems like the problem is something completely different, then :-/

Quote:
Originally Posted by bloodline View Post
-edit2- I'm going around in circles with this floppy disk issue... Until someone has any ideas, I'm looking at the gayle IDE registers... so far my emulator is doing this at startup... now to find some info on what these registers are:
You mean it is a log of what the ROM code does?

DC0000-DCFFFF is real-time clock, not IDE.
DE0000-DEFFFF (I think) is config registers in various ASICs, not IDE - what Amiga does the ROM you're using, belong to?
hooverphonique is offline  
Old 07 March 2019, 10:30   #262
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 44
Posts: 23,017
You also need ATA specs. "d0791r4c-ATA-1.pdf" is good starting point, easy to read. Later specs add too many new and complex features that are not needed.

It is important to not mix hardware and KS ROMs. A4000 IDE is different (No Gayle) than A600/A1200 IDE (Gayle). Note that some ROM versions uses CHS addressing and some LBA addressing.
Toni Wilen is online now  
Old 07 March 2019, 12:04   #263
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by hooverphonique View Post
Hmm.. Seems like the problem is something completely different, then :-/
Yes, I think I need to park the floppy disk issue for now. I can boot KS1.x with it... I think moving forward being able to access hard drive images will be more useful with KS2+

Quote:
You mean it is a log of what the ROM code does?

DC0000-DCFFFF is real-time clock, not IDE.
DE0000-DEFFFF (I think) is config registers in various ASICs, not IDE - what Amiga does the ROM you're using, belong to?
Sorry yes, this is just a record of what the ROM is reading/Writing, address above 0xDA0000.

Thank you for the info about the real-time clock... that might be something I want to implement while I’m figuring out the more complex IDE system.

My KS2 rom is 2.05 from my A600
bloodline is offline  
Old 07 March 2019, 19:42   #264
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by Toni Wilen View Post
You also need ATA specs. "d0791r4c-ATA-1.pdf" is good starting point, easy to read. Later specs add too many new and complex features that are not needed.

It is important to not mix hardware and KS ROMs. A4000 IDE is different (No Gayle) than A600/A1200 IDE (Gayle). Note that some ROM versions uses CHS addressing and some LBA addressing.
Many thanks again! Let’s see how far I get! I never actually thought I’d get as far as I have!
bloodline is offline  
Old 08 March 2019, 15:07   #265
Hewitson
Registered User
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 36
Posts: 3,255
Very impressive mate. I couldn't even work out how to get Musashi to run some code. I know there's an example included with it, but it's overly complicated.
Hewitson is offline  
Old 08 March 2019, 17:31   #266
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by Hewitson View Post
Very impressive mate. I couldn't even work out how to get Musashi to run some code. I know there's an example included with it, but it's overly complicated.
Yeah, Musashi was a bit fiddly to get working, but once I got it sorted out back in 2017, it found it actually a really nice self contained CPU Emulator. The difficult part is instruction table and setting up the callbacks.

If you want a plain 68k Emulator, download my Emulator and rip out everything except the Musashi code and CPU.c (and CPU.h), then just call the functions in CPU.c to interface with it.
bloodline is offline  
Old 08 March 2019, 20:10   #267
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 988
@bloodline,

In your github page you wrote "clang *.c -o omega -Iinclude -Lib -lsdl2 -LSDL2main"
shoud be "clang *.c -o omega -Iinclude -Lib -lSDL2 -LSDL2main"
kamelito is offline  
Old 08 March 2019, 21:20   #268
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by kamelito View Post
@bloodline,

In your github page you wrote "clang *.c -o omega -Iinclude -Lib -lsdl2 -LSDL2main"
shoud be "clang *.c -o omega -Iinclude -Lib -lSDL2 -LSDL2main"
How annoying! I thought I had fixed that typo! Many thanks, I’ll fix it now.
bloodline is offline  
Old 12 March 2019, 15:47   #269
EugeneNine
Registered User

 
Join Date: Aug 2016
Location: Ohio
Posts: 179
What have you done with pi bare metal so far, care to post the source for that (I was just starting with bare metal myself).

I thought about taking parts of the UAE4ARM code rather than starting the emulation from scratch.
EugeneNine is offline  
Old 12 March 2019, 17:30   #270
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by EugeneNine View Post
What have you done with pi bare metal so far, care to post the source for that (I was just starting with bare metal myself).

I thought about taking parts of the UAE4ARM code rather than starting the emulation from scratch.
Hi Eugene, perhaps we should talk offline, but if you look at my first post, I link to the project which allows you to get Baremetal frambuffer and keyboard working. I have written Omega so that I can sit it on top of that!
bloodline is offline  
Old 12 March 2019, 20:17   #271
EugeneNine
Registered User

 
Join Date: Aug 2016
Location: Ohio
Posts: 179
The valvers link where it says the account is unavailable?
EugeneNine is offline  
Old 12 March 2019, 22:17   #272
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by EugeneNine View Post
The valvers link where it says the account is unavailable?
Fortunately Web Archive have cached it:

https://web.archive.org/web/20180131...mming-in-cpt1/

The really interesting stuff is in Part 5:

https://web.archive.org/web/20180310...ming-in-c-pt5/

I’m definitely interested in discussing the RasPi part in more detail, I think UAE4ARM would also be a great idea as a Baremetal emu. Perhaps we should start a new thread (not in the Amiga hardware section for this topic).

Last edited by bloodline; 13 March 2019 at 10:59.
bloodline is offline  
Old 13 March 2019, 11:35   #273
Hewitson
Registered User
Hewitson's Avatar
 
Join Date: Feb 2007
Location: Melbourne, Australia
Age: 36
Posts: 3,255
Any figures on RPi performance baremetal vs Linux? Obviously not for this particular app at this stage, but I'd be interested in seeing the results from others.
Hewitson is offline  
Old 13 March 2019, 11:55   #274
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by Hewitson View Post
Any figures on RPi performance baremetal vs Linux? Obviously not for this particular app at this stage, but I'd be interested in seeing the results from others.
I don’t have any numbers at this time, but Linux should have better performance as that is able to use the “binary blob” drivers provided by Broadcom.

My idea is that my Emulator implements just enough hardware to get AmigaOS booting, after that I would want to write drivers which interact with the raspberry pi directly in AmigaOS.

Last edited by bloodline; 13 March 2019 at 12:07.
bloodline is offline  
Old 14 March 2019, 02:26   #275
EugeneNine
Registered User

 
Join Date: Aug 2016
Location: Ohio
Posts: 179
I've ran emulators on various flavors of Linux but to me running bare metal would be more Amigaish

I bought the official RPi display and since its wider than the Amiga display I wanted to have the "emulator" controls on each side of the display.
My idea was to take as much of the emulator code from UAE4ARM instead of trying to reverse engineer that myself and just replace the Linux system calls with bare metal code.

I'm doing similar with x48 (hp48 emulator) as well, planning to compile it on a PIC or AVR.
EugeneNine is offline  
Old 14 March 2019, 02:28   #276
EugeneNine
Registered User

 
Join Date: Aug 2016
Location: Ohio
Posts: 179
Quote:
Originally Posted by bloodline View Post
Fortunately Web Archive have cached it:

https://web.archive.org/web/20180131...mming-in-cpt1/

The really interesting stuff is in Part 5:

https://web.archive.org/web/20180310...ming-in-c-pt5/


I was meaning anything specifically you had done yourself, I assumed that was your website, but it looks more like a copy/paste of some of the other bare metal tutorials.
EugeneNine is offline  
Old 14 March 2019, 09:34   #277
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by EugeneNine View Post
I was meaning anything specifically you had done yourself, I assumed that was your website, but it looks more like a copy/paste of some of the other bare metal tutorials.
No, I started this project after trying to get the various Baremetal RPi tutorials working.

It is fairly easy to get the Pi up to a known good state, with working Keyboard and frambuffer... then I wrote a simple memory allocator, and it was while I was trying to workout an executable loader (I was struggling with the ELF docs and wondered it I could adapt my HUNK loader to work with ARM), I realised I was fed up reinventing the wheel... This is where I wondered if I could just run a 68k Emulator Baremetal and then treat the Pi as 68k based board, and use existing 68k code... that’s how this started, running AmigaOS needs a bit more than just a 68k, so I started adding more stuff to the Emulator and found that this was a lot of fun.
bloodline is offline  
Old 14 March 2019, 10:08   #278
Gorf
Registered User

 
Join Date: May 2017
Location: Munich/Bavaria
Posts: 806
Quote:
Originally Posted by bloodline View Post
I don’t have any numbers at this time, but Linux should have better performance as that is able to use the “binary blob” drivers provided by Broadcom.

My idea is that my Emulator implements just enough hardware to get AmigaOS booting, after that I would want to write drivers which interact with the raspberry pi directly in AmigaOS.
Are you aware of "Ultibo" - a alternative kernal/os for the rpi?
Thy managed to get native accelerated video support for their non-linux Open Source OS:

The majority of the interface between the ARM CPU and the VC4 GPU is contained with the userland libraries which are maintained by both Broadcom and Raspberry Pi. These have been ported to Ultibo and are provided as a series of static libraries that are included as required in order to expose the appropriate parts of the interface.

https://ultibo.org/wiki/Unit_VC4

(They have a good an friendly forum too)
Gorf is offline  
Old 14 March 2019, 10:31   #279
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by EugeneNine View Post
I've ran emulators on various flavors of Linux but to me running bare metal would be more Amigaish
Yeah, with my idea the 68k code has full access to the RaspberryPi adress space... So in effect it would essentially be an A500(ish) with a BCM2837 gfx chip on the CPU bus.

Quote:
I bought the official RPi display and since its wider than the Amiga display I wanted to have the "emulator" controls on each side of the display.
Seems like a reasonable idea... FS-UAE does something a bit similar. The problem we face with Amiga emulators is that the mouse X/Y is a relative counter... so the host and the Amiga quickly become unsyncronised. Something I want to do is make the Emulator more aware of the absolute mouse position of the host, this would allow seamless mouse transistion between the two... it’s not an easy task.

Quote:
My idea was to take as much of the emulator code from UAE4ARM instead of trying to reverse engineer that myself and just replace the Linux system calls with bare metal code.
So, yeah my approach was the other way around. I stated with a simple 68k Emulator and added to the emulation whatever parts were need to get AmigaOS booting. This has resulted in a very minimal emulation layer.

I was spiuosed to have moved house by now, but things haven’t gone very well, so all my hobby electronics (including the Pis) have been packed away in boxes for a few months now. This has given me time to fix bugs and add a few nice features to my Emulator.

Quote:
I'm doing similar with x48 (hp48 emulator) as well, planning to compile it on a PIC or AVR.
A few years ago, I started getting Mushashi compiling on a Cortex M3, it would be fun to run a real A500 on an ARM... Where I could then sneak in native ARM code!
bloodline is offline  
Old 14 March 2019, 10:31   #280
bloodline
Registered User

bloodline's Avatar
 
Join Date: Jan 2017
Location: London
Posts: 279
Quote:
Originally Posted by Gorf View Post
Are you aware of "Ultibo" - a alternative kernal/os for the rpi?
Thy managed to get native accelerated video support for their non-linux Open Source OS:

The majority of the interface between the ARM CPU and the VC4 GPU is contained with the userland libraries which are maintained by both Broadcom and Raspberry Pi. These have been ported to Ultibo and are provided as a series of static libraries that are included as required in order to expose the appropriate parts of the interface.

https://ultibo.org/wiki/Unit_VC4

(They have a good an friendly forum too)
I didn’t know about this! Many thanks for the link

-edit-
Ok, having read over the description of Ultibo, it seems this is the platform needed to run a Baremetal Emulator.

Last edited by bloodline; 14 March 2019 at 10:46.
bloodline 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 emulator for iOS steviebwoy support.OtherUAE 35 15 November 2014 10:14
Amiga emulator for a PSP? Vars191 support.OtherUAE 1 09 May 2010 02:08
Frederic's Emulator inside and Emulator thread Fred the Fop Retrogaming General Discussion 22 09 March 2006 07:31
ADF Files -> Amiga(amiga with dos Emulator) Schattenmeister support.Hardware 8 14 October 2003 00:10
Which Amiga emulator is best? Tim Janssen Amiga scene 45 15 February 2002 19:52

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 07:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.09995 seconds with 16 queries