Giter Site home page Giter Site logo

Support config files about vamiga HOT 9 CLOSED

dirkwhoffmann avatar dirkwhoffmann commented on May 25, 2024
Support config files

from vamiga.

Comments (9)

dirkwhoffmann avatar dirkwhoffmann commented on May 25, 2024 1

Launching the emulator with a script is already supported. It is used, e.g., by the regression test suite:

To run a regression test, vAmiga is launched in a Makefile with a script that looks like this:

# Regression testing script for vAmiga
# Dirk W. Hoffmann, 2022

# Setup the test environment
regression setup A500_ECS_1MB /tmp/kick13.rom

# Run the test
regression run /tmp/sprdma1_ECS.adf
wait 9 seconds

# Exit with a screenshot
screenshot save sprdma1_ECS

The path to the scrips is provided as command line parameter.

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 25, 2024 1

BTW, you can get an overview of all available commands inside RetroShell. Hitting the tab key twice will print all possible extensions of the typed in (partial) command. E.g., typing amiga and hitting tab twice shows the following:

Bildschirmfoto 2024-01-18 um 19 27 46

Alternatively, have a look at files InterpreterCmds.cpp and InterpreterDebugCmds.cpp. This is where all commands are registered:

    ...
    root.add({"help"}, { }, {Arg::command},
             "Prints usage information",
             [this](Arguments& argv, long value) {

        retroShell.help(argv.empty() ? "" : argv.front());
    });

    root.add({"joshua"},
             "",
             [this](Arguments& argv, long value) {

        retroShell << "\nGREETINGS PROFESSOR HOFFMANN.\n";
        retroShell << "THE ONLY WINNING MOVE IS NOT TO PLAY.\n";
        retroShell << "HOW ABOUT A NICE GAME OF CHESS?\n\n";
    });

    root.add({"source"}, {Arg::path},
             "Processes a command script",
             [this](Arguments& argv, long value) {

        auto stream = std::ifstream(argv.front());
        if (!stream.is_open()) throw VAError(ERROR_FILE_NOT_FOUND, argv.front());
        retroShell.execScript(stream);
    });
    ...

from vamiga.

DidierMalenfant avatar DidierMalenfant commented on May 25, 2024

I'm interested in contributing on this since it would be useful for my little project (see #812).

  • Is the idea to add a menu item to load/save a config?
  • Would we want the emulator to reset to default before loading a config?
  • Any opposition with adding the ability to load a config from the command line if that's not already planned?

from vamiga.

DidierMalenfant avatar DidierMalenfant commented on May 25, 2024

It looks like something is already loading and saving ini files but those don't seem to support all the retroshell command/features.

Is the goal still to replace this with something that simply load/save retroshell scripts similar to the ones used in the test suite?

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 25, 2024

Every issue labeled with v2.5 is already completed.

The path to the Kickstart or the ADFs is not saved because the emulator doesn't know them. When an ADF is attached, it converts it into the internal disk format and forgets about the original file.

from vamiga.

DidierMalenfant avatar DidierMalenfant commented on May 25, 2024

So would it be feasible to implement something like the original idea above and support launching the emulator using a script like the one the unit tests use?

The idea would be to be able to launch it from an IDE and make it automatically boot up with the right config/disk/kickstart. Maybe there is a better way to approach this though?

from vamiga.

DidierMalenfant avatar DidierMalenfant commented on May 25, 2024

Yeah that's what I meant above:

So would it be feasible to implement something like the original idea above and support >launching the emulator using a script like the one the unit tests use?

Does this run the Amiga at regular speed? I see the Mhz counter in the corner get to some crazy values when I use this method.

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 25, 2024

Does this run the Amiga at regular speed?

It usually does.

I see the Mhz counter in the corner get to some crazy values when I use this method.

This is because of the regression run command which turns on warp mode beside other things. In your own script, you would not use this command.

from vamiga.

dirkwhoffmann avatar dirkwhoffmann commented on May 25, 2024

Fixed in v2.5b1

from vamiga.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.