Work on the Minimig core?

https://github.com/mist-devel/mist-board/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

Post Reply
User avatar
retrofun
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 137
Joined: Sat Jan 12, 2019 3:12 pm

Re: Work on the Minimig core?

Post by retrofun »

kolla wrote: Sun Oct 25, 2020 10:06 pm I wish there simply was an option to swap left ctrl and capslock and swap alts and windows keys... :)
kolla wrote: Sun Jan 03, 2021 1:42 pm [...]
What I want to fix (for myself) is swapping ctrl and capslock - I have now tried to do this from software on the Amiga side, and while swapping alt and amiga keys was a breeze, swapping ctrl and capslock turned out to be impossible, since the "toggling" of the capslock on Amiga is done in hardware - I ended up with ctrl-lock key, which admittedly is a heck lot more usefull than a capslock, still isn't what I want to accomplish. I did all this key swapping in the old Minimig cores back in the days, and here I am 10 years later wanting to do the same... :)
[...]
Maybe you want to try this firmware hack/patch I did some weeks ago
https://github.com/retrofun/mist-firmwa ... b784aa46e8

with the following settings in mist.ini:

Code: Select all

[minimig]
amiga_mod_keys=1
reset_combo=1
Works according to AMIGA Test Kit keyboard test.
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

retrofun wrote: Sun Jan 03, 2021 4:24 pm Maybe you want to try this firmware hack/patch I did some weeks ago
https://github.com/retrofun/mist-firmwa ... b784aa46e8
Hm, maybe? But I see zero mention of the magic words "caps" in that patch, so atm it doesn't appear to do what I want :)

Like I mention, the other qualifier keys (that I see listed in the patch) are rather trivial to swap in software, but the Amiga capslock key is special - it is a toggle and has a state, if it is pressed while state is up, it sends key-down, and if it is pressed while state is down, it sends key-up. There is no way to change this from Amiga software. However, the actual PC keyboard plugged into the MiST doesn't have this kind of state, so it isn't a problem to swap for example LCTRL and CAPSLOCK in firmware/core.
-- kolla
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

slingshot wrote: Sun Jan 03, 2021 1:58 pm
kolla wrote: Sun Jan 03, 2021 1:42 pm I am looking for "the latest" git repo of Minimig-AGA/MiST, there are so many "forks" on github now that it's a little hard to see what to clone down :)

(Wouldn't it be best if there was one source repo that woul stand out as "the official" for the releases in the mist-binary repo?)
https://github.com/robinsonb5/MinimigAGA_TC64
Phew, right - but mr. 5017 is ahead of what's released on the mist-binary repo, with his fancy 16bit RTG modes and wav player stuff... hehe :D
-- kolla
User avatar
retrofun
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 137
Joined: Sat Jan 12, 2019 3:12 pm

Re: Work on the Minimig core?

Post by retrofun »

kolla wrote: Sun Jan 03, 2021 5:51 pm Hm, maybe? But I see zero mention of the magic words "caps" in that patch, so atm it doesn't appear to do what I want :)
0x39 that you see several times in the diff is "caps"! Try it! :wink:
I've added some comments:
https://github.com/retrofun/mist-firmwa ... 3d04676cc3

CAPSLOCK and LCTRL are swapped and is working, including LED toggle on the keyboard (at least for me).
slingshot
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2027
Joined: Mon Aug 06, 2018 3:05 pm

Re: Work on the Minimig core?

Post by slingshot »

kolla wrote: Sun Jan 03, 2021 5:54 pm
Phew, right - but mr. 5017 is ahead of what's released on the mist-binary repo, with his fancy 16bit RTG modes and wav player stuff... hehe :D
WAW player stuff is in the released binary, 16bit RTG is not. Excuse me to not make a release from every commit :)
robinsonb5
Captain Atari
Captain Atari
Posts: 151
Joined: Sat May 16, 2015 3:02 pm

Re: Work on the Minimig core?

Post by robinsonb5 »

kolla wrote: Sun Jan 03, 2021 5:54 pm Phew, right - but mr. 5017 is ahead of what's released on the mist-binary repo, with his fancy 16bit RTG modes and wav player stuff... hehe :D
LOL! To be fair I don't think I ever got round to telling slingshot about the 16-bit mode (in terms of code it's a pretty trivial patch) - I had other tweaks I wanted to do first and then got sidetracked by other things / real life! But we have been coordinating in recent months and keeping our codebases as compatible as possible so that features from one side are easy to share with the other.

Speaking of forks, why *do* people fork a repo and then do nothing with it? There are 28 direct descendants of Rok's minimig-mist repo, of which maybe four or five have seen some active development. It's almost like people are using forks as bookmarks.
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

Well, I have many a time done fork by accident. :) And I am sure some do it to have a “backup” in case original repo vanishes for whatever reason.
-- kolla
robinsonb5
Captain Atari
Captain Atari
Posts: 151
Joined: Sat May 16, 2015 3:02 pm

Re: Work on the Minimig core?

Post by robinsonb5 »

kolla wrote: Sun Jan 03, 2021 9:49 pm Well, I have many a time done fork by accident. :)
I did once accidentally create a website.
(In the geocities days I was single-stepping through the process so I could talk someone else through it, and went one step too far!)
And I am sure some do it to have a “backup” in case original repo vanishes for whatever reason.
Yes, I hadn't considered that - I'm sure that's the main reason in many cases. Also I imagine people fork a repo, then clone a copy of the forked repo to their local drive, tinker with it and never push anything back.
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

retrofun wrote: Sun Jan 03, 2021 6:21 pm 0x39 that you see several times in the diff is "caps"! Try it! :wink:
I've added some comments:
https://github.com/retrofun/mist-firmwa ... 3d04676cc3

CAPSLOCK and LCTRL are swapped and is working, including LED toggle on the keyboard (at least for me).
Allright, then it’s exactly what I am looking for :)
-- kolla
Televicious
Atari maniac
Atari maniac
Posts: 93
Joined: Sun Sep 24, 2017 6:18 pm

Re: Work on the Minimig core?

Post by Televicious »

is there a new OSD button on minimig aga rtg? have the 11-22-20 version and updated everything. F12 and my gamepad OSD combo aren't working on it.
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

retrofun wrote: Sun Jan 03, 2021 4:24 pm
with the following settings in mist.ini:

Code: Select all

[minimig]
amiga_mod_keys=1
reset_combo=1
I've tried this now, building firmware from https://github.com/mist-devel/mist-firmware.git with your patch successfully applied, and above settings in mist.ini, but I see no change in keyboard layout... what can I be doing wrong?

From the diff I understand that amiga_mod_keys isn't a simple 0/1 switch...

Code: Select all

+		//  bit  0     1      2    3    4     5      6    7
+		//  key  LCTRL LSHIFT LALT LGUI RCTRL RSHIFT RALT RGUI
+		//       1     2      4    8    10    20     40   80
Care to elaborate how one is supposed to configure this so that alts and amiga keys swap, as well as caps and lctrl? :)

(https://github.com/retrofun/mist-firmwa ... a46e8.diff)
-- kolla
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

Televicious wrote: Thu Jan 07, 2021 11:26 pm is there a new OSD button on minimig aga rtg? have the 11-22-20 version and updated everything. F12 and my gamepad OSD combo aren't working on it.
It should, but maybe your RTG settings are so that OSD is not visible? That is possible, for me the OSD shows up right on the right edge of my screen when I run 1280x720-8bit.

Try opening a PAL/NTSC screen when accessing OSD, I typically use the SYS:Prefs/Overscan to open a PAL screen :)
-- kolla
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

kolla wrote: Fri Jan 08, 2021 8:20 am
retrofun wrote: Sun Jan 03, 2021 4:24 pm
with the following settings in mist.ini:

Code: Select all

[minimig]
amiga_mod_keys=1
reset_combo=1
From the diff I understand that amiga_mod_keys isn't a simple 0/1 switch...
Hm., but it is - my code reading skills were not good :)

But still it doesn't seem to work here, I will try to figure out where it fails.
-- kolla
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

kolla wrote: Mon Jan 11, 2021 9:17 am But still it doesn't seem to work here, I will try to figure out where it fails.
Ok, if I comment out the "if(mist_cfg.amiga_mod_keys) {" line and its corresponding "}", I do get what I want, so I guess it fails somewhere in the reading/parsing of config :)
-- kolla
User avatar
retrofun
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 137
Joined: Sat Jan 12, 2019 3:12 pm

Re: Work on the Minimig core?

Post by retrofun »

Code: Select all

[minimig]
amiga_mod_keys=1
reset_combo=1
This means that the settings are only enabled for the minimig core, not others (e.g. menu core). But I guess you've tried with the minimig core...

Remember to put core specific settings below the global [mist] section in mist.ini!
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

Yes, my MiST is Amiga exclusive :)

Just FYI it fails even if I set value to 1 in mist_cfg.c line 64 - I suppose those are default values?
-- kolla
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

Found the "bug", on my MiST.ini, I did not have a [minimig], instead I had a [minimig_config] :roll:

All well now!
-- kolla
User avatar
Higgy
Captain Atari
Captain Atari
Posts: 208
Joined: Tue Jan 24, 2017 1:38 pm

Re: Work on the Minimig core?

Post by Higgy »

Kolla - what are using for your Amiga experience? I remember some years back you and Sorgelig were discussing Keyrah and Arduino based keyboard adapters to use real Amiga keyboards.
I contacted Sorgelig but he does not seem to still have the Arduino sketch he used for his adapter.
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

Higgy wrote: Wed Jan 13, 2021 7:38 pm Kolla - what are using for your Amiga experience? I remember some years back you and Sorgelig were discussing Keyrah and Arduino based keyboard adapters to use real Amiga keyboards.
Right, for the MiSTer I did use an A1200 keyboard for a long while, having the MiSTer built into an A1200.net case, not using Keyrah, but this one...

https://web.archive.org/web/20200521075 ... rsion-kit/

However, it always felt awkward and somewhat clumsy, and when Corona kicked in I needed to save some space in my home office, I stumled on these keyboards (+ mouse), and despite low price, they're great, once keys have been remapped ;)

https://www.biltema.no/kontor-teknikk/d ... 2000040404
-- kolla
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

robinsonb5 wrote: Sun Jan 03, 2021 8:09 pm
kolla wrote: Sun Jan 03, 2021 5:54 pm Phew, right - but mr. 5017 is ahead of what's released on the mist-binary repo, with his fancy 16bit RTG modes and wav player stuff... hehe :D
LOL! To be fair I don't think I ever got round to telling slingshot about the 16-bit mode (in terms of code it's a pretty trivial patch) - I had other tweaks I wanted to do first and then got sidetracked by other things / real life! But we have been coordinating in recent months and keeping our codebases as compatible as possible so that features from one side are easy to share with the other.
So, I finally got around to install Quartus II 13.1 web edition and build the core myself, from your git repo (master branch) :)
I was of course hoping to get 16bit modes (using updated minimig.card also from your repo), but no success - I just get dark gray screens on RTG.
So I am curious, does it really work for you on MiST? :)
-- kolla
robinsonb5
Captain Atari
Captain Atari
Posts: 151
Joined: Sat May 16, 2015 3:02 pm

Re: Work on the Minimig core?

Post by robinsonb5 »

kolla wrote: Fri Jan 15, 2021 7:27 pm So, I finally got around to install Quartus II 13.1 web edition and build the core myself, from your git repo (master branch) :)
I was of course hoping to get 16bit modes (using updated minimig.card also from your repo), but no success - I just get dark gray screens on RTG.
So I am curious, does it really work for you on MiST? :)
Yes, I just tried it again to double-check and was able to test a high-colour screenmode in Picasso96Mode (defaults to 16-bit if both 15- and 16-bit are available), and was able to open DrawStudio on a 16-bit screen. Which program are you using to test?

(Note that you'll need to switch back to the old minimig.card if you go back to the old core - the new driver checks the hardware it's running on and refuses to run if the version's not right. This is to avoid confusion with the MiSTer RTG implementation which is different but puts its registers in the same place - we both have a "version" register at the same location, which we both check to make sure we're on the right hardware.)
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

PEBCAK as usual - I had somehow managed to copy out minimig.card from the dev branch intsead of master :)

16bit modes work fine now, allthough it seems impossible to make a 1280x720 one, though it's awesome that OSD is now centered on that resolution as well :)
-- kolla
robinsonb5
Captain Atari
Captain Atari
Posts: 151
Joined: Sat May 16, 2015 3:02 pm

Re: Work on the Minimig core?

Post by robinsonb5 »

kolla wrote: Sat Jan 16, 2021 4:59 pm PEBCAK as usual - I had somehow managed to copy out minimig.card from the dev branch intsead of master :)

16bit modes work fine now, allthough it seems impossible to make a 1280x720 one, though it's awesome that OSD is now centered on that resolution as well :)
Good to hear it's working now! Yeah, 16-bit needs twice the bandwidth so it only works for modes that have a pixel clock of 56MHz or less. 1280x720 uses 85Mhz if memory serves, while 1440x900 uses 113.5mz - so those modes are 8-bit only.
kolla
Captain Atari
Captain Atari
Posts: 349
Joined: Thu Sep 17, 2015 11:39 pm
Contact:

Re: Work on the Minimig core?

Post by kolla »

Ah, I see... so before I go nuts trying to create 1152x640, 1088x612 or 960x540 with P96Mode... would firmware changes be needed? :)
-- kolla
robinsonb5
Captain Atari
Captain Atari
Posts: 151
Joined: Sat May 16, 2015 3:02 pm

Re: Work on the Minimig core?

Post by robinsonb5 »

kolla wrote: Sat Jan 16, 2021 9:24 pm Ah, I see... so before I go nuts trying to create 1152x640, 1088x612 or 960x540 with P96Mode... would firmware changes be needed? :)
If your monitor can recognise those modes then you should be able to create them in P96Mode.
In 16-bit modes the pixel clock can be 113.44MHz / n, where n is an integer greater than or equal to 2. In 8-bit modes there are two pixels worth of data per fetch, so the pixel clock can be 2 * 113.44MHz / n, where n is still an integer greater than or equal to 2. Thus 113.44 is the maximum for 8 bit, and half that for 16-bit. (16-bit can't go any faster without having basically all the SDRAM bandwidth for itself, leaving nothing for the Amiga to use.)
The width has to be a multiple of 32, otherwise you'll see a skewed display - other than that it's pretty flexible.

Note, though, that if your monitor is a flatscreen and its misidentified the screenmode you're likely to get poor results. If it tries to sample 1024 pixels per line when the screenmode actually contains 1152 then it's going to look awful - so pay attention to what the monitor thinks its displaying. If it's guessing wrong, try flipping the sync polarity.
Post Reply

Return to “MiST”