Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
149 user(s) are online (109 user(s) are browsing Forums)

Members: 1
Guests: 148

afxgroup, more...

Headlines

 
  Register To Post  

« 1 ... 9 10 11 (12) 13 14 »
Re: qemu emualtion of AmigaONE XE
Not too shy to talk
Not too shy to talk


See User information
The system has reached me is a quick test of Amigaos SE.
It runs very smoothly - it has limitations because it is a preliminary version.
I saw that @balaton has sent patches for acccpetation in the Qemu branch. So it will get better and better.
It's just a pity that no mention was made of his work on Qemu emulation of AOS4 on Amiga38 ... but it's always like that with silent heroes

Of the problems sysinfo does crash - but it looks like a problem with the program. Possibly it can't distinguish between two graphics cards.


https://streamable.com/6b4ttl

Go to top
Re: qemu emualtion of AmigaONE XE
Just can't stay away
Just can't stay away


See User information
@smarkusg
Quote:
Of the problems sysinfo does crash - but it looks like a problem with the program.
In your video at 1:57 it's not SysMon crashing but "nvgetvar", which SysMon may be using to get the U-Boot environment variables.
More likely a problem with the missing, or at least incomplete, NVRAM support in the AmigaOne emulation of QEmu than the SysMon program.


Edited by joerg on 2023/10/11 7:41:18
Go to top
Re: qemu emualtion of AmigaONE XE
Not too shy to talk
Not too shy to talk


See User information
@joerg

thanks for your help

I still have a question about the u-boot. According to this information it has been removed the part concerning bios emulation

[PATCH 5/7]Remove the BIOS emulator from MAI board

if it can be done as it is written there, is there anything in AOS4 for amigaone that can cause problems without this? (the topic is about qemu not real hardware)

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
@smarkusg
The u-boot binary from Hyperion that we use to boot AmigaOS does have a bios emulator in it. The upstream u-boot sources moved this to drivers to be used for an ati driver by some other board and later dropped the AmigaOne board altogether as it was never complete and did not work in later versions. I've tried to compile a u-boot versions for amigaone from upstream u-boot sources but the old versions before this change don't compile with newer gcc any more ("newer" here means gcc 4.x that's not exactly new now) but what was upstream seems never was complete, e.g. it only had a partial, not compiled fragment of the menu part so even if it could be compiled there are some things missing from it.

Later for Sam boards some of these were re-added to u-boot but never upstreamed which I think was modeled after (and maybe used code from) the amigaone version so we have the source for the sam460ex u-boot and I can compile that. I've tried adding the previously removed AmigaOne board to that version which I can compile but it crashes in bios emulator even if I replace that with the one in sam460ex which works on sam460ex but not in amigaone.

The Sam u-boot was made by @m3x on this forum and on another forum I've seen comments from him saying he had the AmgiaOne u-boot sources at some point and maybe tried to merged them with sam sources but nothing came out of that. If these sources are still available I'd try to update them to work with amigaone emulation but nobody could dig up these sources and send them to me yet so I only have the partial sources from upstream u-boot that I'm not sure ever worked and don't work with sam460ex u-boot at least. I can't really debug the bios emulator because it's an external code and the debug code in there does not produce output in u-boot. Maybe this was solved in some other versions but I did not want to spend too much time with it when there could be working sources somewhere out there.

So in summary there are at least 3 versions of bios emulator in u-boot I know about. The AmigaOne and Sam used their own versions and the patch you've found moved the abandoned AmigaOne version to elsewhere and cut it down to the necessary minimum to be used by some other board that needed an ati driver but these aren't used by AmigaOne or Sam boards.

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
@smarkusgQuote:
smarkusg wrote:The system has reached me is a quick test of Amigaos SE.
It runs very smoothly - it has limitations because it is a preliminary version.
I saw that @balaton has sent patches for acccpetation in the Qemu branch. So it will get better and better.


I have already seen the new patch series under Qemu Patches, but I have not been able to test it yet as I am currently having problems compiling from the current Qemu Master Source, I am currently investigating the problem.

On branch master
Your branch is up to date with 
'origin/master'.

nothing to commitworking tree clean
reneengel
@Mac-Studio qemu % ./configure --target-list=ppc-softmmu
Using 
'./build' as the directory for build output
python determined to be 
'/Library/Frameworks/Python.framework/Versions/3.10/bin/python3'
python versionPython 3.10.8
mkvenv
Creating non-isolated virtual environment at 'pyvenv'
mkvenvchecking for tomli>=1.2.0
mkvenv
installing tomli>=1.2.0
mkvenv
checking for meson>=0.63.0
mkvenv
installing meson==0.63.3
mkvenv
checking for sphinx>=1.6
mkvenv
checking for sphinx_rtd_theme>=0.5

'sphinx==5.3.0' not found:
• Python package 'sphinx' was not found nor installed.
• mkvenv was configured to operate offline and did not check PyPI.


Sphinx not found/usabledisabling docs.
Disabling PIE due to missing toolchain support
The Meson build system
Version
0.63.3
Source dir
: /Users/reneengel/qemu
Build dir
: /Users/reneengel/qemu/build
Build type
native build
Project name
qemu
Project version
8.1.50

../meson.build:1:0ERRORUnable to detect linker for compiler `cc -Wl,--version`
stdout:
stderrldunknown options: --version
clang
errorlinker command failed with exit code 1 (use -v to see invocation)


A full log can be found at /Users/reneengel/qemu/build/meson-logs/meson-log.txt

ERROR
meson setup failed


Thanks for your video it runs very well on your little Mac dwarf
Among other things I will provide an installation guide for the new AmigOneSe/XE installation in the next days. A few questions I have for you.

The AmigaOne CD Installer could finish the installation for you, or were there problems with the installation of AmigaOs4.1 ?

Could you briefly explain how you set up the SFTP server under MacOs with RNOxfer, which SFTP server program did you use under MacOs for this?

Quote:
Of the problems sysinfo does crash - but it looks like a problem with the program. Possibly it can't distinguish between two graphics cards.


Exactly the same error with SysMon occurs with me under the AmigaOne emulation.

MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE
Go to top
Re: qemu emualtion of AmigaONE XE
Just can't stay away
Just can't stay away


See User information
@smarkusg
Quote:
is there anything in AOS4 for amigaone that can cause problems without this? (the topic is about qemu not real hardware)
On real hardware the x86 emulator executing the BIOS ROM of PCI cards is required at least for Radeon R100/R200 gfx cards (Radeon 7000, 9000, M9, etc.), the ones supported by the AmigaOS ATIRadeon.chip driver. Maybe it's required for some other PCI cards as well. Should not be required for Radeon HD and RX cards.

On emulation it's not required, even if you use a real PCI card like Radeon 9250 requiring BIOS execution with pass-through and the AmigaOS ATIRadeon driver: The host system BIOS has already executed the PCI card BIOS ROM code.

Go to top
Re: qemu emualtion of AmigaONE XE
Not too shy to talk
Not too shy to talk


See User information
@Maijestro
Quote:
The AmigaOne CD Installer could finish the installation for you, or were there problems with the installation of AmigaOs4.1 ?

The installation went without a problem. Installation launched from the desktop.
I've been using a Raspberry pi zero as my ssh/sftp server for a couple of years now, as a dns server and simple file sharing. It is plugged into the usb port on the router - no power is needed, I like this little device very much

On macOS, try enabling ssh in the sharing - open preferences and search for ssh, enable. Should work

@balaton
Quote:
I've tried to compile a u-boot versions for amigaone from upstream u-boot sources but the old versions before this change don't compile with newer gcc any more

I also tried to compile u-boot under gcc4 on ppc. The code didn't compile either , especially the one about bios emulation.
Thank you for the rest of the information

@joerg
Ok - thank you also for the information

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
@smarkusg
The problem with compiling u-boot is probably more than the bios_emulator makefile that can be fixed but then it does not link or work if compiled with gcc 4.x or newer. Maybe it compiles with a contemporary gcc from the time this was merged in u-boot which was even before it was called u-boot so a long time ago. The sam460ex u-boot compiles with gcc 4.9 (maybe not with gcc 10) and also produces the working firmware image included in QEMU for sam460ex. I could add the MAI/AmigaOneG3SE board from older u-boot to that and fix it up to conpile (either with its own original bios_emulator or also updating that to the one used by sam460ex, I've ignored the stripped down version in driver that was moved there by the patch you quoted as that one was never used for AmigaNG firmware). Compiling the AmigaOneG3SE board with the sam460ex u-boot that way also produces working firmware in that it starts and detects the machine, CPU, RAM but when trying to run the VGA BIOS it crashes in the bios emulator and stops there. Since it also does that with the bios_emulator from the sam460ex that works with the sam460ex board to run the same VGA BIOS the problem is not actually in the bios_emulator but somewhere either in the AmigaOne board code or in PPC74xx CPU support (the sam460ex uses PPC440 instead). Maybe I could fix this but I've noticed that the results are different than with the binary AmigaOne u-boot from Hyperion as that detects Board: AmigaOne while the upstream u-boot has Board: AmigaOneG3SE and also it would have no menu as that appears to have never been merged in u-boot so maybe it could only call boota directly. Therefore I've concluded these aren't the same sources that were used by Hyperion for the binary so there could be whatever changes in there that I'd need to find out without a clue so I wait until actual sources surface or just let people use the binary. At least that's freely distributable because of GPL even without source and is still available publicly. But the most convenient would be to include it in QEMU like the sam460ex firmware because then users won't have to get it separately but for that I think we need sources to rebuild it.

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
@joerg
Quote:

On emulation it's not required, even if you use a real PCI card like Radeon 9250 requiring BIOS execution with pass-through and the AmigaOS ATIRadeon driver: The host system BIOS has already executed the PCI card BIOS ROM code.


I guess that's generally true but in practice may not always be true and it's a bit more involved. First it depends on your host as you can run QEMU on anyting so if it isn't a PC that probably did not run the BIOS so you may need something to run it. Then if you have a modern PC with UEFI with CSM disabled that probably did not run BIOS of old card either so you may need to do that in the firmware of the virtual machine or some other way. Finally if you have old enough host with BIOS (which then may not have iommu to pass the card through) or CSM enabled in BIOS that has init the card properly then you need to make sure nothing is touching the card between reboot and when the virtual machine gets using it so no driver is loaded for it on the host but it's isolated and assigned to vfio and not reset when the VM starts which may need some patches to appropriate kernel quirks somewhere in Linux. So maybe it's better to assume that you'd need to run the BIOS even on PCs where you pass the card through if nothing in AmigaOS handles this.

Go to top
Re: qemu emualtion of AmigaONE XE
Just can't stay away
Just can't stay away


See User information
@balaton
Quote:
So maybe it's better to assume that you'd need to run the BIOS even on PCs where you pass the card through if nothing in AmigaOS handles this.
Only the classic Amiga version of AmigaOS 4.x includes a x86 emulator executing the BIOS ROM of PCI cards, all other versions depend on the firmware doing it.

But even if someone wants to use a real gfx card with pass through, the only option for usable gfx (32 bit UHD with GPU accelerated 2D and 3D, etc.) until the Virtio GPU AmigaOS driver is available, it's unlikely he will be using an old Radeon R100/R200 PCI gfx card, which additionally needs a PCIe->PCI bridge on most systems.
Using a much better Radeon HD/RX PCIe gfx card, which works without a x86 emulator executing it's BIOS ROM, makes much more sense.

Go to top
Re: qemu emualtion of AmigaONE XE
Not too shy to talk
Not too shy to talk


See User information
@Maijestro

Quote:
I have already seen the new patch series under Qemu Patches, but I have not been able to test it yet as I am currently having problems compiling from the current Qemu Master Source, I am currently investigating the problem.


I've checked the new patches - there is already sound on via-ac97, the address assignment problem (addr=) looks to have been resolved too.

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
@smarkusgQuote:
smarkusg wrote:@Maijestro

[quote]
I've checked the new patches - there is already sound on via-ac97, the address assignment problem (addr=) looks to have been resolved too.


That's great news, so Balaton has made it so that the AmigaOne ac97 machine can also be used. I'm not sure, but Volker another Qemu developer found this problem and Balaton then released the patch or added the AmigaOne emulation to Qemu Master. The patch development I have been able to read a bit there was some disagreement with other Qemu developers about how it should be done.

Have you also tested the new patch for the Sam460 emulation? Balaton told me that this emulation could also be as fast as the AmigaOne and Pegasos2, but it should be tested if something else is not broken.

Until Qemu 8.2 is released I still have some time to get my system in order. In the meantime I'm out for the time being and can't help with testing.

Did you compile Sonoma on MacOs via Homebrew and XCode 15, or are you just on an older version?


Edited by Maijestro on 2023/10/12 15:52:01
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE
Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
Hi Maijestro,

I have no experience with QEMU, but I was curious if it is possible to turn on a computer and boot straight into the machine it emulates? Similar to KX Lite on Amiga Forever, where you don't see Linux before the emulated Amiga environment starts. Let us say I have a laptop and want it to run emulated Pegasos 2 straight away. Thanks in advance for your answer.

Go to top
Re: qemu emualtion of AmigaONE XE
Not too shy to talk
Not too shy to talk


See User information
@AmigaOldskooler

I'm sure it would only be possible to do something . You would have to configure it and spend a while on it.
Install a minimal system with the Linux kernel. Configure a display server.
Install a graphical desktop environment or not.
Add QEMU full-screen start-up.
Prepare a disk image.
Finally, add a boot logo etc.

It may be a problem to change the disk image, add a cdrom, etc. with this configuration.

I don't know if there are any ready-made solutions.


Edited by smarkusg on 2023/10/12 23:10:39
Edited by smarkusg on 2023/10/12 23:11:20
Edited by smarkusg on 2023/10/13 5:10:58
Edited by smarkusg on 2023/10/13 8:29:51
Go to top
Re: qemu emualtion of AmigaONE XE
Not too shy to talk
Not too shy to talk


See User information
@Maijestro
Quote:
Did you compile Sonoma on MacOs via Homebrew and XCode 15, or are you just on an older version?


I have learned over the years to install the version update system from Apple after a few months to avoid becoming their beta tester

If there are further problems you can try installing gcc under Homebrew. By default you have clang from Apple . But I have not tested this....

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
@AmigaOldskooler

Quote:
AmigaOldskooler wrote:Hi Maijestro,

I have no experience with QEMU, but I was curious if it is possible to turn on a computer and boot straight into the machine it emulates? Similar to KX Lite on Amiga Forever, where you don't see Linux before the emulated Amiga environment starts. Let us say I have a laptop and want it to run emulated Pegasos 2 straight away. Thanks in advance for your answer.


It would be nice to have such a solution, Qemu Pegasos2 I have created a script so that I can start it quickly and it then starts directly in the full screen so that the MacOs desktop is completely hidden. When I am then under AmigaOs4.1, I almost forget that it is an emulation.

We had a similar project in the past with Amithlon, who knows maybe we could do something like that with Qemu.

Of course you must not forget that it is and remains an emulation even if the whole thing already works well. Real hardware with AmigaOs4.1 will always be better.For the really real feeling of AmigaOs4.1 you can also only experience with real hardware.


Edited by Maijestro on 2023/10/13 18:17:48
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE
Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
@AmigaOldskooler
This question has nothing to do with QEMU. If you start any OS it has some way to configure startup. Like on AmigaOS you have startup-sequence and without that you only get a shell but with the right commands it can boot into Workbench. Other OSes have similar startup config. On Unix like systems (including Linux) the first process started by the kernel is init which can be anything. QEMU needs some facilities to be available and some dependencies installed so it cannot be started as init directly but it's possible to cut down a Linux distro to the bare minimum to be able to only run QEMU and start that on boot. This has already been done for UAE so if you want the same for QEMU maybe the easiest is to take one of those distros and replace UAE with QEMU. As UAE also needs similar dependencies (graphics and input devices working) it should probably work and you don't have to do the minimal distro for it as sombody already did that.

But what is this good for? It's not difficult to have a script to start QEMU when you want to use it but you can still use Linux or your host OS for other tasks normally.

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
Once you have chosen how to build your distribution and related dependencies for qemu etc.

and having a stable repository to refer to for qemu updates (for updates dedicated to the evolution of qemu for AmigaOS)
this is a practically already complete start menu.

Scripts for creating hdf and everything else have also been added here.

It works perfectly in this case with FS-UAE

With a little work you can boot graphics animations and everything else.

menu.sh
----------------

#!/bin/bash
trap '' 2
sudo /usr/bin/setfont /usr/share/consolefonts/Lat7-Terminus24x16.psf
function Amiga500() {
echo ""
echo "Loading Amiga 500 Setup..."
startx /usr/bin/fs-uae -c /amiga/Configurations/amiga500.fs-uae --fullscreen > /dev/null 2>&1 &
echo ""
tput reset
}

function Amiga1200() {
echo ""
echo "Loading Amiga 1200 Setup..."
echo ""
startx /usr/bin/fs-uae -c /amiga/Configurations/amiga1200.fs-uae --fullscreen > /dev/null 2>&1 &
echo ""
tput reset
}

function Amiga3000() {
echo ""
echo "Loading Amiga 3000 Setup..."
echo ""
startx /usr/bin/fs-uae -c /amiga/Configurations/amiga3000.fs-uae --fullscreen > /dev/null 2>&1 &
echo ""
tput reset
}

function Amiga4000() {
echo ""
echo "Loading Amiga 4000 Setup..."
echo ""
startx /usr/bin/fs-uae -c /amiga/Configurations/amiga4000.fs-uae --fullscreen > /dev/null 2>&1 &
echo ""
tput reset
}

function Amiga400041() {
echo ""
echo "Loading Amiga 4000 OS 4.1 Setup..."
echo ""
cd /home/amiga/fs-uae3.2
startx ./fs-uae -c /amiga/Configurations/A4000-PPC.fs-uae --fullscreen > /dev/null 2>&1 &
echo ""
tput reset
}

function Arosm68k() {
echo ""
echo "Loading Aros M68K Setup..."
echo ""
startx /usr/bin/fs-uae -c /amiga/Configurations/AROS-One.fs-uae --fullscreen > /dev/null 2>&1 &
echo ""
tput reset
}

function FS-Launch() {
echo ""
echo "Loading FS-UAE-Launcher..."
echo ""
startx /usr/bin/fs-uae-launcher > /dev/null 2>&1 &
echo ""
tput reset
}


##
# Color Variables
##
green='\e[32m'
blue='\e[34m'
clear='\e[0m'
yellow='\033[0;33m'

##
# Color Functions
##

ColorGreen(){
echo -ne $green$1$clear
}
ColorBlue(){
echo -ne $blue$1$clear
}

ColorYellow(){
echo -ne $yellow$1$clear
}

menu(){
tput reset
echo -ne ""
echo -ne "My ip address is: "; hostname -I | cut -f1 -d' '
echo -ne "
AmiDeb Menu (V1.0)

$(ColorGreen '1)') Basic Amiga 500/2000 Setup
$(ColorGreen '2)') Basic Amiga 1200 Setup
$(ColorGreen '3)') Amiga 3000 Setup
$(ColorGreen '4)') Amiga 4000 Setup
$(ColorGreen '5)') Amiga 4000 OS 4.1 Setup
$(ColorGreen '6)') Aros One M68K
$(ColorGreen '7)') FS-Uae Launcher

$(ColorGreen 'u)') Utilities Menu

Choose an option: "
read a
case $a in
1) Amiga500 ; menu ;;
2) Amiga1200 ; menu ;;
3) Amiga3000 ; menu ;;
4) Amiga4000 ; menu ;;
5) Amiga400041 ; menu ;;
6) Arosm68k ; menu ;;
7) FS-Launch ; menu ;;
u) configmenu ; menu ;;
*) echo -e $red"Wrong option."$clear; tput reset;menu;;
esac
}

configmenu(){
tput reset
echo -ne ""
echo -ne "My ip address is: "; hostname -I | cut -f1 -d' '
echo -ne "

AmiDeb Utilities Menu

$(ColorYellow '0)') Shutdown System
$(ColorYellow '1)') Reboot System
$(ColorYellow '2)') Apt Update
$(ColorYellow '3)') Apt Upgrade
$(ColorYellow '4)') Apt Dist Upgrade
$(ColorYellow '5)') Start command shell
$(ColorYellow '6)') Edit WIFI/Network Connection
$(ColorYellow '7)') Create 1Gb HDF File (1G.hdf)
$(ColorYellow '8)') Create 2Gb HDF File (2G.hdf)

$(ColorGreen 'q)') Quit to AmiDeb Main Menu

Choose an option: "
read a
case $a in
0) sudo /usr/sbin/shutdown -h now ;;
1) sudo /usr/sbin/shutdown -r now ;;
2) sudo apt-get update ; configmenu ;;
3) sudo apt-get upgrade ; configmenu ;;
4) sudo apt-get dist-upgrade ; configmenu ;;
5) sudo -u amiga -s ; configmenu ;;
6) sudo nmtui ; configmenu ;;
7) sudo -u amiga python3 /home/amiga/hdfcreate.py -t rdb -s 1G -f /amiga/'Hard Drives'/1G.hdf ; configmenu ;;
8) sudo -u amiga python3 /home/amiga/hdfcreate.py -t rdb -s 2G -f /amiga/'Hard Drives'/2G.hdf ; configmenu ;;
q) menu ;;
*) echo -e $red"Wrong option."$clear; tput reset;menu;;
esac
}

# Call the menu function
menu
----------------------------------

then possibly all the reference scripts follow.

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
here is an example in .py
for creating a .hdf (raw)

#!/usr/bin/env python3

"""
Copyright 2021 Tiago Epifanio

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

import getopt
import sys
import re
import math

ABOUT_TEXT = '\
HDF Create v0.1\n\
Copyright 2021 Tiago Epifanio\n\
\n\
Licensed under the Apache License, Version 2.0 (the "License");\n\
you may not use this file except in compliance with the License.\n\
You may obtain a copy of the License at\n\
\n\
http://www.apache.org/licenses/LICENSE-2.0\n\
\n\
Unless required by applicable law or agreed to in writing, software\n\
distributed under the License is distributed on an "AS IS" BASIS,\n\
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
See the License for the specific language governing permissions and\n\
limitations under the License.\n\
'

HELP = '\
HDF Create v0.1\n\
Copyright 2021 Tiago Epifanio\n\
This is free software, and you are welcome to redistribute it\n\
under certain conditions; type \'python3 hdfcreate --about\' for details.\n\n\
Usage: python3 hdfcreate.py [OPTIONS]\n\n\
Options:\n\
-t, --type TYPE\n\
TYPE: raw (Single partition)\n\
rdb (Partitionable Hard Drive Image)\n\
-s, --size SYZE\n\
-f, --filename\n\
-h, --help\n\n\
Example 1 - create a single partition file with 32GiB:\n\
python3 hdfcreate.py --type raw --size 32G --filename myhd.hdf\n\n\
Example 1 - create a partitionable hard drive with 512MiB:\n\
python3 hdfcreate.py --type rdb --size 512M --filename myhd.hdf\n\
'

DISK_TYPE_RAW = "raw"
DISK_TYPE_RDB = "rdb"
DISK_TYPES = [DISK_TYPE_RAW,DISK_TYPE_RDB]

def create_disk(size, filename = "out.hdf", disktype = "raw"):
if disktype not in DISK_TYPES:
print("Invalid type. Valid types are: raw, rdb.")

size_regex = re.compile('(\d+)([bkmgBKMG]{0,1}$)')

m = size_regex.match(size)

if m:
size = int(m.group(1))
unit = m.group(2)
else:
print("Invalid size.")
sys.exit(1)

if (unit in ("k","K")):
size *= 1024
elif (unit in ("m","M")):
size *= 1024 * 1024
elif (unit in ("g","G")):
size *= 1024 * 1024 * 1024

try:
f = open(filename, "wb")
except Exception:
print("Error opening file.")
sys.exit(1)

if (disktype == DISK_TYPE_RDB):
size = size - 4
f.write(b"rdsk")

blocksize = 1024 * 1024 * 10; #10MiB
written = 0

for i in range(0, size // (blocksize)):
f.write(b"\0" * blocksize)
written += blocksize
print("\rProgress: " + str(math.floor(written / size * 100)) + "%",end='',flush=True)

f.write(b"\0" * (size % blocksize))

print("\rProgress: 100%")
def main(argv):
if len(argv) == 0:
print(HELP)
sys.exit(1)

disktype = None
size = None
filename = None

try:
opts, args = getopt.getopt(argv[0:],"t:s:f:h",["type=","size=","filename=","about","help"])
except getopt.GetoptError:
print(HELP)
sys.exit(1)

for opt, arg in opts:
if opt in ("-t", "--type"):
disktype = arg
elif opt in ("-s", "--size"):
size = arg
elif opt in ("-f", "--filename"):
filename = arg
elif opt in ("-h", "--help"):
print(HELP)
sys.exit(1)
elif opt in ("--about"):
print(ABOUT_TEXT)
sys.exit(1)

if size is None:
print("Size not specified. Use -s parameter to specify size.")
sys.exit(1)

create_disk(size, filename, disktype)

if __name__ == "__main__":
try:
main(sys.argv[1:])
except Exception as ex:
print('Error: ' + str(ex))

Go to top
Re: qemu emualtion of AmigaONE XE
Quite a regular
Quite a regular


See User information
@white

Have you tested the latest qemu AmigaOne patches from Balaton?

Ac97 now works under the AmigaOne machine, I can't decide which of the two machines I prefer Pegasos2 or AmigaOne.

SDL1 problems do not exist under AmigaOne, but I miss the shutdown button which is available under the Pegasos2 machine. They are both excellent machines and very fast.





Edited by Maijestro on 2023/10/14 19:24:40
Edited by Maijestro on 2023/10/15 7:26:06
MacStudio ARM M1 Max Qemu//Pegasos2 AmigaOs4.1 FE
Go to top

  Register To Post
« 1 ... 9 10 11 (12) 13 14 »

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project