Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add Platform options ? #36

Closed
nemerle opened this issue Aug 21, 2015 · 5 comments
Closed

How to add Platform options ? #36

nemerle opened this issue Aug 21, 2015 · 5 comments
Assignees
Labels
question This is a question to the Reko maintainers

Comments

@nemerle
Copy link
Collaborator

nemerle commented Aug 21, 2015

I'd like to make use of additional information when ?constructing? Platform instances:

For example, adding option to select different kickstart versions when using AmigaOSPlatform.
Depending on the kickstart version, reko should load different "exec.funcs" definitions, type libraries etc.

I think this would require a change in the way ImageLoaders and UI work:

  • ImageLoader creates Platform instance
  • Ui checks if Platform instance provides options
  • if yes
    • Ui shows a Platform options dialog filled with default values
    • User changes the options/accepts them/ options are applied.

Other option would be to add Platform setting to the menu ?

Things we might want to add in far off future:

Selectable hardware definition modules:

  • MSDOS era PC hardware i.e VGA module, would extend the memory map with video-memory area, add smart translators for OUT/IN instructions, provide video interrupt conversion routines (INT 0x13) etc,
  • Base board configuration modules ( assign selected peripheral to given IO space )

OS module configuration:

  • Selecting OS version ( AmigaOS kickstart revision etc)
@nemerle nemerle added the question This is a question to the Reko maintainers label Aug 21, 2015
@uxmal
Copy link
Owner

uxmal commented Aug 21, 2015

I'm not too keen on popping up user interfaces in the user's face. Rather, in the project browser, let's consider adding a new treenode, a child of the executable, which would be labelled AmigaOS or what have you. Each platform can then have its own custom user interface which could accept user data and persist it in the *.dcproj file.

I can mock this up in the "gui-development" branch over the weekend, so you can take a look.

@uxmal
Copy link
Owner

uxmal commented Aug 21, 2015

Revision 76ad42d of the "gui-development" branch now shows the Platform in the project browser. If the platform is AmigaOS, the Platform will be clickable and show some UI, You can add controls on the AmigaOSProperties user control and react to changes by saving them to the instance of AmigaOSPlatform in the AmigaOSPropertiesInteractor class.

@nemerle , @halsten , open up a file from ~/subjects/Hunk-m68k and let me know what you think.

@uxmal
Copy link
Owner

uxmal commented Aug 25, 2015

@nemerle: you will need to add the requisite properties to the AmigaOSPlatform and MsdosPlatform to store all these hardware configuration details. Then, the loading and saving of projects has to be modified to ask each platform to save / load platform specific options to/from an XmlTextWriter / XmlTextReader. The contents of this Xml will then be added to the .dcconfig file as an opaque blob.

I need some time to investigate how to save XML blobs to a file using XmlSerializer in an elegant way, In the meantime, you can work on the user interface I presented you, adding textboxes, comboboxes etc. to your heart's content

@uxmal
Copy link
Owner

uxmal commented Nov 2, 2015

@nemerle: commit ce1d57f added the virtual methods LoadUserOptions and SaveUserOptions to the Platform class. You're welcome to extend the AmigaOSPlatform class by overriding those methods and implementing the appropriate functionality. The AmigaOSPlatformDesigner user interface should save user changes into a Dictionary<string,object> which can be kept in the AmigaOSPlatform class.

@uxmal
Copy link
Owner

uxmal commented May 13, 2020

Both architectures and platforms have supported options for a while now.

@uxmal uxmal closed this as completed May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a question to the Reko maintainers
Projects
None yet
Development

No branches or pull requests

2 participants