jc13 Posted April 17, 2018 Share Posted April 17, 2018 (edited) If that's something you can add via a plugin fairly easily, then I think it would be nice to have it as an option, but I totally agree with you about the detection of the hardware. I was just reading through your docs on the plugin structure, and while I would love to figure this out myself, it would take me forever to wrap my head around it. Sorry - I'm editing this one to death... Edited April 18, 2018 by jc13 Quote Link to comment Share on other sites More sharing options...
jc13 Posted April 18, 2018 Share Posted April 18, 2018 Jon - I decided I'd have a go at modifying your default plugin to enable/disable v-gate, and started with just trying to figure out how to get your original source assembled (compiled?). I'm still very new at this, but do you have any pointers for me on getting the environment set up? Do you do your coding and cross assemble on your PC or use AMAC in Altirra? Thanks, John Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted April 18, 2018 Share Posted April 18, 2018 (edited) Cross-compilation. The plugin source is intended for the MADS assembler, and I'd strongly recommend testing Plugins in Altirra before committing them to real hardware (since a bad plugin can completely brick the system). Personally I use WUDSN IDE in conjunction with MADS, and Altirra's drive 2 is a virtual drive pointing to the fixed MADS target folder. So I can hit Ctrl-Shift-F9 in Eclipse, then hop over to Altirra, log drive 2 in SDX, type UFLASH.XEX and then navigate straight to the file I just assembled. If all is well, I'll save the modified emulator ROM via File->Save Firmware->Save Ultimate 1MB Flash. If the system locks up, I'll figure it out with the debugger and then just shut down and restart the emulator (thereby reverting to the unmodified U1MB ROM). The plugin equates have changed in firmware version 2.0, and the documentation unfortunately refers to this unreleased revision, so it might be best to wait a few days until I can get this build released (moreover, I made a further change since the current documentation was uploaded: there are now absolute vectors for the printfmsg and confirm functions, so plugins can easily interact with the user and display status messages; I found this useful after writing a test plugin intended to probe behaviour of extended memory and Shadow RAM while the config was unlocked). It's basically being held up by a raft of improvements to the SIDE loader which will hopefully justify the delay. Since you're interested in plugin development (which is great to hear), I'll be sure to update the skeleton code and other example sources before everything is released. Of course, once someone else starts writing plugins, shortcomings in the API are bound to be uncovered, but hopefully things are reasonably flexible as they are. Edited April 18, 2018 by flashjazzcat 3 Quote Link to comment Share on other sites More sharing options...
jc13 Posted April 18, 2018 Share Posted April 18, 2018 Thanks for the info - I'll see how far I can get. Quote Link to comment Share on other sites More sharing options...
jc13 Posted April 18, 2018 Share Posted April 18, 2018 Well, I got far enough to actually get the example defaultplugin.s code to assemble once I figured out how to do an ICL, but I'm sure I don't have something set up correctly. The file the assembler is creating is an XEX, and has some extra bytes up front and it looks like the string padding (and EOF padding) is not quite the same as the default.plg. Thanks for the info about the changes in the new code - I'm not planning to actually flash anything just yet (baby steps ). Any other hits as to where I've gone wrong? My assembled version of the source... Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00000000 FF FF 00 FB 34 FB 55 4C 50 4C 55 47 49 4E 00 17 ÿÿ.û4ûULPLUGIN.. 00000010 53 74 65 72 65 6F 2F 43 6F 76 6F 78 00 00 00 00 Stereo/Covox.... 00000020 01 00 53 43 23 FC 22 FC 42 FC 41 FC 44 65 76 69 ..SC#ü"üBüAüDevi 00000030 63 65 20 43 6F 6E 74 72 6F 6C 00 40 FB 8F FC 01 ce Control.@û.ü. 00000040 75 FB 4C FB 01 FA D7 59 FB 01 01 53 74 65 72 65 uûLû.ú×Yû..Stere 00000050 6F 20 50 6F 6B 65 79 00 45 6E 61 62 6C 65 2F 64 o Pokey.Enable/d 00000060 69 73 61 62 6C 65 20 73 74 65 72 65 6F 20 61 75 isable stereo au 00000070 64 69 6F 00 01 9C FB 81 FB 01 FB D7 87 FB 01 02 dio..œû.û.ûׇû.. 00000080 43 6F 76 6F 78 00 45 6E 61 62 6C 65 2F 64 69 73 Covox.Enable/dis 00000090 61 62 6C 65 20 43 6F 76 6F 78 00 06 C9 FB A8 FB able Covox..Éû¨û 000000A0 01 FC D7 B1 FB 01 04 44 65 76 69 63 65 20 32 00 .ü×±û..Device 2. 000000B0 45 6E 61 62 6C 65 2F 64 69 73 61 62 6C 65 20 44 Enable/disable D 000000C0 65 76 69 63 65 20 32 00 06 F6 FB D5 FB 01 FD D7 evice 2..öûÕû.ý× 000000D0 DE FB 01 08 44 65 76 69 63 65 20 33 00 45 6E 61 Þû..Device 3.Ena 000000E0 62 6C 65 2F 64 69 73 61 62 6C 65 20 44 65 76 69 ble/disable Devi 000000F0 63 65 20 33 00 04 00 00 07 FC 03 F8 D7 00 00 00 ce 3.....ü.ø×... 00000100 00 02 16 FC 1B FC 41 75 64 69 6F 20 68 61 72 64 ...ü.üAudio hard 00000110 77 61 72 65 00 4D 6F 6E 6F 00 53 74 65 72 65 6F ware.Mono.Stereo 00000120 00 60 A9 F6 A2 FB A0 01 20 15 C0 2C F9 D7 30 0F .`©ö¢û . .À,ù×0. 00000130 AD F8 D7 8D FA D7 A9 40 A2 FB A0 01 4C 15 C0 60 .ø×.úש@¢û .L.À` 00000140 60 4C 45 FC 4E F9 D7 A9 00 8D 81 D3 20 61 FC F0 `LEüNùש...Ó aüð 00000150 01 60 A9 01 8D 81 D3 20 61 FC F0 F5 38 6E F9 D7 .`©...Ó aüðõ8nù× 00000160 08 78 A9 00 8D F8 D7 8D 1E D2 8D 08 D2 A9 01 8D .x©..ø×..Ò..Ò©.. 00000170 0E D2 8D 00 D2 8D 09 D2 2C 0E D2 D0 FB 2C 1E D2 .Ò..Ò..Ò,.ÒÐû,.Ò 00000180 F0 03 EE F8 D7 A9 10 8D 0E D2 28 AD F8 D7 60 ð.îøש...Ò(.ø×` Original default.plg included with the firmware download... Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 00000000 55 4C 50 4C 55 47 49 4E 00 17 53 74 65 72 65 6F ULPLUGIN..Stereo 00000010 2F 43 6F 76 6F 78 00 00 00 00 01 00 53 43 23 FC /Covox......SC#ü 00000020 22 FC 42 FC 41 FC 44 65 76 69 63 65 20 43 6F 6E "üBüAüDevice Con 00000030 74 72 6F 6C 00 FF FF FF FF FF FF FF FF FF FF FF trol.ÿÿÿÿÿÿÿÿÿÿÿ 00000040 01 75 FB 4C FB 01 FA D7 59 FB 01 01 53 74 65 72 .uûLû.ú×Yû..Ster 00000050 65 6F 20 50 6F 6B 65 79 00 45 6E 61 62 6C 65 2F eo Pokey.Enable/ 00000060 64 69 73 61 62 6C 65 20 73 74 65 72 65 6F 20 61 disable stereo a 00000070 75 64 69 6F 00 01 9C FB 81 FB 01 FB D7 87 FB 01 udio..œû.û.ûׇû. 00000080 02 43 6F 76 6F 78 00 45 6E 61 62 6C 65 2F 64 69 .Covox.Enable/di 00000090 73 61 62 6C 65 20 43 6F 76 6F 78 00 06 C9 FB A8 sable Covox..Éû¨ 000000A0 FB 01 FC D7 B1 FB 01 04 44 65 76 69 63 65 20 32 û.ü×±û..Device 2 000000B0 00 45 6E 61 62 6C 65 2F 64 69 73 61 62 6C 65 20 .Enable/disable 000000C0 44 65 76 69 63 65 20 32 00 06 F6 FB D5 FB 01 FD Device 2..öûÕû.ý 000000D0 D7 DE FB 01 08 44 65 76 69 63 65 20 33 00 45 6E ×Þû..Device 3.En 000000E0 61 62 6C 65 2F 64 69 73 61 62 6C 65 20 44 65 76 able/disable Dev 000000F0 69 63 65 20 33 00 04 00 00 07 FC 03 F8 D7 00 00 ice 3.....ü.ø×.. 00000100 00 00 02 16 FC 1B FC 41 75 64 69 6F 20 68 61 72 ....ü.üAudio har 00000110 64 77 61 72 65 00 4D 6F 6E 6F 00 53 74 65 72 65 dware.Mono.Stere 00000120 6F 00 60 A9 F6 A2 FB A0 01 20 15 C0 2C F9 D7 30 o.`©ö¢û . .À,ù×0 00000130 0F AD F8 D7 8D FA D7 A9 40 A2 FB A0 01 4C 15 C0 ..ø×.úש@¢û .L.À 00000140 60 60 4C 45 FC 4E F9 D7 A9 00 8D 81 D3 20 61 FC ``LEüNùש...Ó aü 00000150 F0 01 60 A9 01 8D 81 D3 20 61 FC F0 F5 38 6E F9 ð.`©...Ó aüðõ8nù 00000160 D7 08 78 A9 00 8D F8 D7 8D 1E D2 8D 08 D2 A9 01 ×.x©..ø×..Ò..Ò©. 00000170 8D 0E D2 8D 00 D2 8D 09 D2 2C 0E D2 D0 FB 2C 1E ..Ò..Ò..Ò,.ÒÐû,. 00000180 D2 F0 03 EE F8 D7 A9 10 8D 0E D2 28 AD F8 D7 60 Òð.îøש...Ò(.ø×` 00000190 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000001A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000001B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000001C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000001D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000001E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000001F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000200 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000210 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000220 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000230 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000240 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000250 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000260 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000270 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000280 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000290 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000002A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000002B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000002C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000002D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000002E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000002F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000300 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000310 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000320 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000330 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000340 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000350 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000360 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000370 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000380 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 00000390 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000003A0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000003B0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000003C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000003D0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000003E0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 000003F0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ Quote Link to comment Share on other sites More sharing options...
jc13 Posted April 20, 2018 Share Posted April 20, 2018 I know this isn't the right thread for this, but just to close it out, I was able to get the defaultplugin.s to compile with the following options added to the source: // at the beginning icl "plugin.inc" // includes the include file opt f+ h- // emit file as a single block -- omit DOS executable file headers //at the end .align $300,$ff // fills the remainder of the 1k space with $FF Probably not the right way, but it works... 3 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted April 20, 2018 Share Posted April 20, 2018 Yeah - that'll do it. If the resulting binary is identical the to published one, you're good. I'll try to take more care when preparing the examples in the update. It's just difficult to think of everything. The plugins are BIOS version dependent and this is enforced by UFLASH (the plugin specifies the minimum required main BIOS version and won't flash to anything older), but since I changed the layout a little, I broke forward compatibility as well this time, so care should be exercised. Fortunately no-one else wrote any plugins yet, so I saw no harm in making a clean break of it. I'm working flat-out on numerous fronts at the moment but I updated the screen shots in the manual the other day and with luck I'll spend time on Sunday getting things prepared for release. 2 Quote Link to comment Share on other sites More sharing options...
jc13 Posted April 20, 2018 Share Posted April 20, 2018 No worries - I tend to get stuck on to something and can't let it go until I figure it out. I'm still very green with the coding - just happy to get it to assemble properly. It's going to be a while before I'm able to do anything remotely useful . Thanks for all your help and work on all this! Quote Link to comment Share on other sites More sharing options...
TheMontezuma Posted April 20, 2018 Share Posted April 20, 2018 Fortunately no-one else wrote any plugins yet, so I saw no harm in making a clean break of it. I'm working flat-out on numerous fronts at the moment but I updated the screen shots in the manual the other day and with luck I'll spend time on Sunday getting things prepared for release. I also had plugin development (resetting a cart bank feature) on my list, but luckily I haven't started yet. I will better wait you for your release of the firmware and documentation. Please keep us updated. Quote Link to comment Share on other sites More sharing options...
TheMontezuma Posted April 20, 2018 Share Posted April 20, 2018 (edited) I'd strongly recommend testing Plugins in Altirra before committing them to real hardware (since a bad plugin can completely brick the system). And how to set the U1MB emulation in Altirra up? I have selected "Ultimate1MB" in the "Memory Config" (menu System). Then Altirra shows: "Altirra Ultimate1MB recovery BIOS Insert BIOS flash disk, press key" Which disk do I need? EDIT: I got the solution in the Altirra Help: "Altirra does not come with the U1MB firmware, which must be obtained separately. However, it does contain a recovery image with a minimal BIOS and OS that can be used to run the flasher disk to load the real hardware. Alternatively, if the image is available in raw image form it can be bound directly through the System | Firmware | ROM images menu item." Edited April 20, 2018 by TheMontezuma 3 Quote Link to comment Share on other sites More sharing options...
jc13 Posted April 20, 2018 Share Posted April 20, 2018 No worries - I tend to get stuck on to something and can't let it go until I figure it out. I'm still very green with the coding - just happy to get it to assemble properly. It's going to be a while before I'm able to do anything remotely useful . Thanks for all your help and work on all this! Things suddenly started to click and I was successful in modifying the default plugin (Device 2) to enable/disable v-gate on the Sophia and I didn't break anything else! Thanks to FJC, Simius and Mytek for the info and work on this stuff. Brings me back to my youth! 5 Quote Link to comment Share on other sites More sharing options...
flashjazzcat Posted April 21, 2018 Share Posted April 21, 2018 Nice work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.