Hallo Besucher, der Thread wurde 33k mal aufgerufen und enthält 173 Antworten

letzter Beitrag von Endurion am

Emulatoren xemu-xmega65 / xemu-xc65 bauen und benutzen

  • @LGB-Z: Hi, Lénárt. Nice to meet you here. Please, could you make an arch=ARM11 (BCM2835) for me? I would like to try something out. It is for a "BARE METAL" project.

    Let's stick with Gábor, Lénárt is my family name :)


    It does not make sense to create a new "architecture" unless I (or you) know what to do differently for that architecture ... I mean, I can do that, but without filling the needed code, Makefile changes etc etc etc needed for that given "port" of Xemu, it will result in the same as some other "arch=" (architecture). For "bare metal" you basically want to run something without any OS, etc. For starting point, you must port the whole SDL2 project to that situation. Then you must add your own code to do initialization of the hardware itself you want to run on, providing/implementing some C / POSIX like functions, including implementing file system, time/date/timing stuff, audio/video "drivers" etc. Basically you need to write your own "mini OS", since in case of bare metal, you don't have an already existing underlying infrastructure provided by the OS. So you must do that for yourself. Also, for sure, you need the dedicated toolchain for the given architecture, but that's the most easy part really, the bulk of a "bare metal" project is rather the other stuffs.


    What you want to do can be similar to the "Commodore Pi" project for example, I believe, for that project as well, not so much happened since years, since all of the CPU / hardware / etc initialization must be done manually, and the performance somehow is horrible compared to using an OS (as it turned out, it's not so much trivial to set CPU's caches, programming the "chipset" - well in case of Raspberry Pi, it's really a SoC but anyway). So you see ...


    Anyway, I had some similar idea as yours here some time ago, but it's really not so easy to do so. Xemu is developed to utilize SDL2 also some common OS functions like filesystem etc. All of these dependencies must be provided first, to be able to run Xemu on it .... (Xemu is not even a "clean" SDL project, ie it used other calls as well than only SDL ones, let it be C standard, or even POSIX, which is provided in case of Windows by the mingw cross-compiler's run-time stuff ...).


    But in fact, I already tried to run Xemu on Raspberry Pi (though years before, even before C65/M65 emulation in Xemu ...), it works, but note, that it wasn't a bare metal project, but running on the Raspbian OS (Linux) of Rapsberry Pi (though it worked without X, as SDL2 has support for using framebuffer implementation of the Linux kernel directly, I believe ... or something similar, I can't remember now so much).

  • Gábor excuse me, my english isn't well.


    Basically you need to write your own "mini OS",

    => Ultibo Raspberry Pi Firmware.


    What you want to do can be similar to the "Commodore Pi" project for example

    Yes!


    SDL2 also some common OS functions like filesystem etc.

    => SDL2 Raspberry.


    Raspbian OS (Linux) of Rapsberry Pi

    that's real shit! Too big and bloated for all possibilities.



    My first attempt starts within 7 seconds. The lcd display is too slow and the old 512mb SD-Card is also little slow.


    I try with Lazarus ...


    P.S.: cp/m system is already running quite well. It take's ca. 5,3MB at the SD-Card.



    (Xemu is not even a "clean" SDL project, ie it used other calls as well than only SDL ones, let it be C standard, or even POSIX, which is provided in case of Windows by the mingw cross-compiler's run-time stuff ...).

    Therefore so I need you!

  • Gábor excuse me, my english isn't well.


    No problem, welcome to the club, mine is kinda lame as well :)


    Ah, so I can see, you are at least prepared for the difficulties for such a project. Sounds interesting. I wouldn't say that Raspbian is "bloated" but yes, compared to a bare metal project, it IS, no doubts, in fact almost everything is bloated then compared to bare metal :) (though still some can have a middle-way to strip down a Linux distro to the absolute minimum and using that .. yeah, it's still not bare metal, that's true!!) I'm not sure still about SDL2 though. The link you've provided discuss about building SDL2 on Raspbian / some kind of Linux, not on "bare metal" (yes, SDL supports working without X, but still depends on the Linux kernel/framebuffer then, and also some OpenGL stuff, I guess) ... Though I can be wrong ...


    I always enjoy to do projects like this, but unfortunately, I have not so much free time for everything :( If you can create a demonstration to be able to compile some SDL example code (which would compile for Linux / Windows as well without any hack, and on the top of your bare metal project as well - again without any change on the SDL example code of yours), then I think we have a good hope already. But unfortunately I have no time to play with that at level (even though it's quite exciting "game to play"). But, I think, if you can provide a more or less complete test-case where everything already works, and any "standard" SDL app can be run), then it's a much easier project already, and maybe then it's time for me too, to jump in (I have raspberry pi 1 and 3 too, so I can play with that).


    What Xemu uses from SDL mainly:


    * getperformancecounter stuff, and others for timing
    * create window/renderer/texture, with OpenGL acceleration (though it works without it, just I guess it will be painfully slow), streaming texture support
    * able to scale textures on rendering with/without antialiasing
    * alpha blending of textures (needed for OSD, and the soon-coming OSD based menu system ... though probably it can be commented out with all of these functionalities then)
    * SDL audio stuff (unless you don't need audio)
    * SDL joystick/game controller functions (unless you don't want to support these)
    * SDL keyboard stuffs
    * SDL basic event handling stuffs
    * standard C library functions (most important part are file system related functions)
    * POSIX (even on Windows, provided by mingw then ...) functions, quite various things


    Just some quick ideas by heart now, far from being exact or complete list ....

  • @WalkThatWay:
    If you have question to Gábor that don't have anything to do with the Xemu/Mega65 Target of Xemu, please open a seperate Thread !
    If possible, the Thread here is for the Xemu/Mega65 only. (That's why the Thread is called exactly like this)
    Thanks !

  • ????

    ????

    I wie weit, hat Deine Anfrage an Gábor mit dem Mega65 Emulator zu tun, wenn du ihn nach einem Bare Metal Arm11 fragst ?

    LGB-Z: Hi, Lénárt. Nice to meet you here. Please, could you make an arch=ARM11 (BCM2835) for me? I would like to try something out. It is for a "BARE METAL" project.

    Dieser Thread ist für die Kompilierung, Installation und Benutzung, oder einfach alle Fragen rund um den Mega65 Emulator von Gábor:
    Xemu/Mega65 gedacht.

  • @adtbm:

    I wie weit, hat Deine Anfrage an Gábor mit dem Mega65 Emulator zu tun, wenn du ihn nach einem Bare Metal Arm11 fragst ?

    In sofern, das XEMU/Mega65 auf dem Raspberry pi lauffähig wird.


    Dieser Thread ist für die Kompilierung, Installation und Benutzung, oder einfach alle Fragen rund um den Mega65 Emulator von Gábor:
    Xemu/Mega65 gedacht.

    Ja, dachte ich auch. Deswegen die ????.

  • @WalkThatWay:
    If you have question to Gábor that don't have anything to do with the Xemu/Mega65 Target of Xemu, please open a seperate Thread !
    If possible, the Thread here is for the Xemu/Mega65 only. (That's why the Thread is called exactly like this)
    Thanks !

    Ah, good idea, sorry about my side too, to "spam" the topic. I think, this is core Xemu related thing, nothing to do with Mega65/C65, etc stuffs this forum is more about, THOUGH I am happy to help, but I guess it's even not forum topic, but more like a private topic. So, @WalkThatWay please drop me some private messages if you like to talk about this, it's really interesting, though a bit "out of scope" because my free time, this thread's topic, and in general - I guess - even the purpose of this forum (???). Thanks for the patience from all.

  • @WalkThatWay: Ich muss da @adtbm zustimmen: Dieser Emulator xemu ist bisher kaum selbst benutzt worden.
    Wir haben es gerade erst geschafft, dass es dank LGB-Z für mehrere Plattformen konsumierbare aktuelle Kompilate gibt. Die Portierung des Emulators auf eine andere Plattform ist eine interessante Sache, kann aber auch gut in einem Zweiergespräch mit @LGB-Z per Konversation oder aber in einem anderen Thread diskutiert werden.


    Mein Eindruck ist: Kaum jemand hat den Emulator bisher in der Praxis benutzt. Primär wichtig ist, dass Entwickler den Emulator nutzen können für C65-Software-Projekte im Emulator, und dass Bugs am Emulator diskutiert und gefixt werden können. Darum geht es mir hier im Thread. Momentan steht LGB-Z allein da als Emulator-Entwickler.


    Enduser, die sich den Emulator komfortabel auf dem Pi installieren können, würden zum jetzigen Zeitpunkt frustriert sein, weil:
    a) Es gibt keine Software zum Ausprobieren. Es gibt keinen Alltags-Vorteil gegenüber VICE. Die SD-Karte mit einem Mega65-Emulator würde nach zwei Tagen neu formatiert werden.
    b) Der Emulator ist nicht feature-complete.

  • O.K. @adtbm do not want us here, so we do it for ourselves without him.

    Please be precise ! :versohl:
    You have not asked, if it is possible to run Xemu on a Rasp. Did you ?
    So it's not about: adtbm do not want us here ... It's about running Xemu on a Raspberry.


    @Gábor: No worries, even if it is an interessting topic and i really would like to see the possibility of running
    Xemu on a Rasp. I would be happy to follow the development of this project in a seperate thread .


    Thanks !

  • Das hört sich in meinen Ohren vom Höflichkeitsgrad her ein bisschen zu fordernd an. Vor einer halben Stunde hast Du noch seinen Nachnamen mit seinem Vornamen verwechselt. Zahlst Du ihm ein Gehalt? :D

  • @emulaThor: So'n tüdelkram. Wir verstehen uns halt. ;) (Sein Familienname ist genauso wertvoll wie sein Vorname.)
    Alles of topic, ich bin jetzt raus hier. (Es gibt auch Menschen, die Freitag heißen... zumindest hier in Hamburg)



    in meinen Ohren vom Höflichkeitsgrad her ein bisschen zu fordernd

    Das ist mit eine der höchsten Stufen der Höflichkeit. Abwertend währe wenn ich schreiben würde, ich brauche ihn nicht, er sei überflüssig. Zu fordernd währe "ich will ihn unbedingt haben" bzw. "ich muß ihn haben".



    Zahlst Du ihm ein Gehalt?

    Er kommt auch ohne mich gut im Leben zurecht.

  • btt:


    @der_funker: Ich habe gerade Gàbor angeschrieben und habe ihn gefragt, mit welcher Taste man beim Xemu/Mega65 ins Freeze menu kommt.
    Wie gesagt, beim Mega65 ist es, indem man die RESTORE Taste für ca. 2 Sekunden drückt.
    Hast du mal probiert, das Equivalent (Bild Hoch) für ca. 2 Sekunden am PC zu drücken ?

  • But in fact, I already tried to run Xemu on Raspberry Pi (though years before, even before C65/M65 emulation in Xemu ...), it works, but note, that it wasn't a bare metal project, but running on the Raspbian OS (Linux) of Rapsberry Pi (though it worked without X, as SDL2 has support for using framebuffer implementation of the Linux kernel directly, I believe ... or something similar, I can't remember now so much).

    That sound really interesting (especialy the "without X").


    This could lead to one very cheap (10,- to 20,- € using Rapberry Pi Zero/W) MEGA- Pi and /or (what I would like to see) a Project similar to the MEGA (Case etc.) for the Commodore LCD, where people do 3D Printing the case, insert a Panel etc.pp.


    Anyways, many peopla, many ideas. Fun stuff allways come in mind ;)


    Diese Frage der Keys-Bindings hat sich mir auch öfters gestellt.


    btt:


    @der_funker: Ich habe gerade Gàbor angeschrieben und habe ihn gefragt, mit welcher Taste man beim Xemu/Mega65 ins Freeze menu kommt.
    Wie gesagt, beim Mega65 ist es, indem man die RESTORE Taste für ca. 2 Sekunden drückt.
    Hast du mal probiert, das Equivalent (Bild Hoch) für ca. 2 Sekunden am PC zu drücken ?

    Ich habe es öfters mit Bild-Hoch (RESTORE) versucht.
    Ergebniss: der Emu startet neu aber KEIN Freezer.

  • Wenn Reset ausgelöst hat, dann war (Wenn es das gleiche ist, wie beim Mega65) die Restore/Bild-Hoch Taste zu lange gedrückt.
    Wie gesagt, laut Paul und das kann ich bestätigen, ist so ca. 1 - 1,5 Sekunden - Freeze Menu
    Über 3 Sekunden - Reset

  • Wenn Reset ausgelöst hat, dann war (Wenn es das gleiche ist, wie beim Mega65) die Restore/Bild-Hoch Taste zu lange gedrückt.
    Wie gesagt, laut Paul und das kann ich bestätigen, ist so ca. 1 - 1,5 Sekunden - Freeze Menu
    Über 3 Sekunden - Reset

    Ich lande immer (egal ob kurz oder land drücken) hier ->


    Auch verstehe ich nicht die dortigen Meldungen von wegen 'could not load' (banner.m65 & kickup.m65) weil in der shell steht ->


    Loading banner content from file: #mega65-banner.m65
    FILE: file #mega65-banner.m65 opened as /home/freddy/xemu/build/bin/rom/mega65-banner.m65 with base mode-set as fd=12
    FILE: 21248 bytes loaded from file: /home/freddy/xemu/build/bin/rom/mega65-banner.m65
    Loading C000 utility content from file: #mega65-diskmenu_c000.bin
    FILE: file #mega65-diskmenu_c000.bin opened as /home/freddy/xemu/build/bin/rom/mega65-diskmenu_c000.bin with base mode-set as fd=12
    FILE: 4069 bytes loaded from file: /home/freddy/xemu/build/bin/rom/mega65-diskmenu_c000.bin
    FILE: file #mega65-kickup.m65 opened as /home/freddy/xemu/build/bin/rom/mega65-kickup.m65 with base mode-set as fd=12
    FILE: 16384 bytes loaded from file: /home/freddy/xemu/build/bin/rom/mega65-kickup.m65
    FILE: file @mega65.img opened as /home/freddy/.local/share/xemu-lgb/mega65/mega65.img with base mode-set as fd=12
    FILE: file /home/freddy/.xemu-lgb/mega_pack.d81 opened as /home/freddy/.xemu-lgb/mega_pack.d81 with base mode-set as fd=13


    Also hat er sowohl banner als auch kickup geladen, oder?