Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : PICO PETSCII
Page 30 of 38 | |||||
Author | Message | ||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
Oh no... Sorry Martin... Could you please try to re-make your changes. I will stop any work from my side until I see your fixes, and use that as new baseline. This is probably result of going back and forth with the pet24cMod.bas and pet24eMod.bas around Kevin's changes. I sincerely appologize. Different topic: I posted the picomite robots effort on the 8-bit guy's facebook, and asked the elementary questions. Let's hope he sees it, and responds favourably. Regards, Volhout EDIT: Martin: I am not sure what I missed. I just did a compare, and think all your changes are in for the NES controller. Did you enable nesPG1=1....? Edited 2023-11-17 18:56 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
will see if I also remove the Conntroll item in the Menu as long as there is no function behind it. I am not @ Facebook and this is a private group so i can't watch it. He might be interested in Different topic: In the DOS Version Flowerpots can be destroyed with Time-Bomb, There are situations/Rooms where the flowerpot is in the way, which can be removed in the DOS version with the Time-Bomb. otherwise you can't reach certain parts of the rooms Edit: i took the entrys of a older version, this brings the Controller to life again.. 'system setup ----------------------------------------------------- Option default integer Const Game_Mite=1-(MM.Device$="PicoMiteVGA") Const nesPG1=1 'alternate controllers If Game_Mite Then sc$="f":init_game_ctrl ' Init Controller on Game*Mite Else sc$="n":MODE 2 EndIf If nesPG1 Then Const a_dat=2 'GP1 Const a_latch=4 'GP2 Const a_clk=5 'GP3 Const pulse_len!=0.012 '12uS SetPin a_dat, din: SetPin a_latch, dout: SetPin a_clk, dout EndIf but the changes I've done in the Startmenu are gone, so with controller it is nearly impossible to change Map or Difficulty Edited 2023-11-17 19:15 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
Hi Martin, - I will look at the flower pots. Look simple enough (one IF/THEN). But only after you have blessed/adapted the current version. I don't want to go back and forth anymore....only forward... - About CONTROLLER: I could think about automatic detect of a limitted set of options. Petrs "WII classic" is easy (I2C is present or not). Difference between NES and SNES can be done when pressing a non-NES key on the SNES (you can clock NES with 16 clocks, I have proven that). Detecting parallel keys (Game_Mite) can be done when pressing a key that is not in the PicoGameVGA controller IO. So the controller selection would be text instructions for each controller type so it can be auto detected. So you may not need a menu. Just "once" text at startup. And save the type for further use. Volhout Edited 2023-11-17 19:20 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
yes, a kind of Config.txt 'no comment |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
for now, i just reinserted the NES Control and the Menu changes(again) so that we have a common ground pet24fn.zip 'no comment |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4043 |
Hey folks, I'll start by saying that if you are happy to wait a few weeks for the madness (at home) to die down then I'll be happy to sort the controller things out as my contribution to the project. However if you are impatient then I'll offer these two thoughts instead: 1. I think you do need to have some idea of what hardware configuration you are running on before starting to poll GPIO (especially sending latch and clock pulses for {S}NES) because the nature of the PicoMite is that random bits of user hardware might be attached. This in particular means being able to identify the Game*Mite and the PicoGAME VGA which you can't do with Mm.Device$. To this end the next version of the Game*Mite software (which will no longer be using custom firmware since Peter merged my changes with the mainline) makes use of the following code: Const sys.DEVICE = sys.get_config$("device", Mm.Device$) ' Reads property from config (.ini) file. ' ' @param key$ case-insensitive key for property to lookup. ' @param default$ value to return if property or file is not present. ' @param file$ file to read. If empty then read "A:/.spconfig", or ' if that is not present "A:/.config". Function sys.get_config$(key$, default$, file$) sys.get_config$ = default$ If file$ = "" Then Const file_$ = Choice(Mm.Info(Exists File "A:/.spconfig"), "A:/.spconfig", "A:/.config") Else Const file_$ = file$ EndIf If Not Mm.Info(Exists File file_$) Then Exit Function Local key_$ = LCase$(key$), s$, v$ Open file_$ For Input As #1 Do While Not Eof(#1) Line Input #1, s$ If LCase$(Field$(Field$(s$, 1, "=", Chr$(34)),1, "#;", Chr$(34))) = key_$ Then v$ = Field$(Field$(s$, 2, "=", Chr$(34)), 1, "#;", Chr$(34)) If Left$(v$, 1) = Chr$(34) Then v$ = Mid$(v$, 2) If Right$(v$, 1) = Chr$(34) Then v$ = Mid$(v$, 1, Len(v$) - 1) sys.get_config$ = v$ Exit Do EndIf Loop Close #1 End Function And the Game*Mite comes with a default "A:/.spconfig" containing: device = "Game*Mite" And I would propose on the PicoGAME VGA "A:/.spconfig" would contain: device = "PicoGAME VGA" You can then use sys.DEVICE in place of Mm.Device$ where the distinction for Game*Mite and PicoGAME VGA matters. 2. My controller library https://github.com/thwill1000/mmbasic-sptools/blob/develop-tree-shake/src/splib/ctrl.inc already contains code for: - NES + SNES gamepads on the PicoGAME VGA - Atari joysticks on the PicoGAME VGA - NES + SNES gamepad on the CMM2 DX - Atari joystick on the CMM2 DX - Wii Classic and Nunchucks on the CMM2 - Game*Mite - INKEY$, KEYDOWN and ON PS2 driven keyboard reading - Controller polling/identification, see the ctrl.poll_multiple$() function If you want to see an example of all this in use (for up to four simultaneous players) then checkout the lazer-cycle source-code: https://github.com/thwill1000/mmbasic-lazer-cycle. Keep up the good work, Tom Edited 2023-11-17 20:40 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
I got my flu shot this morning. I hope the side effects are limited. But it may be that I can't be very productive on weekends. Let's wait and see 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
@Martin, I am going through your changes, and do not understand at all...? 1/ you removed OPTION DEFAULT INTEGER. Why...? Now the whole game is running in floating point..? This could have significant impact. 2/ you moved "DIM col(15) and fill" to the beginning, where it was part of init_map_support that is called right at the start (before that only some GPIO stuff happens for controllers). This should not have any impact. 3/ you replaced the call to "SUB config_NES" with the content of that function that is line for line compatible. This should not have any impact. 4/ You reverted the change in the startmenu that made the ticker tape (top banner) roll slower. You did not like that one ? I found it more readable when slower. OK, lets keep the faster ticker tape... Please check if attached works equally well.. (and destroys pot plants). Volhout pet24fnh.zip Edited 2023-11-17 20:55 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
That shouldn't have happen.. i just copied parts of the older version, where Menu and Controller were working, over your source .. So that hat overwritten the 2 pixel scrolling banner, sorry for that. Also that would have exedently overwitten the default integer, please reenter. 'no comment |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
After watching that 8-bit Guy clip he gives me the impression that he's going to love seeing it running on a PicoMite! He doesn't charge for ports that he's had no hand in anyway and he seems to get a kick out of seeing it running on all sorts of odd computers (Oric Atmos? - can't be too odd, I have one. :) ). The PicoMite VGA version is looking *very* nice now. :) I really should try running it - on the "I promise not to hurt you" level, of course. (My latest Covid and flu jabs didn't bother me at all, Martin. Here's hoping yours is ok too. :) ) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
again right at the Start [281] Pulse a_latch, pulse_len! Error : Pin 0/NULL is not an output" so it calls the controller routine before its initialisation, thats why i moved the initialisation, which just sets up the Variables and the PINs for the Controller, to the start of the Program. somehow i forgets the settings when they are setup within the sub . Edited 2023-11-17 22:03 by Martin H. 'no comment |
||||
Bleep Guru Joined: 09/01/2022 Location: United KingdomPosts: 509 |
Hi Martin & Harm, I tend to use a diff program like 'Meld' on linux or 'BeyondCompare' on windows, these make it very easy to see what has changed, some even allow you to move changes between different versions very easily. They can be particularly useful when going back to previous versions to see what changes you have made. Regards, Kevin. Edited 2023-11-17 22:31 by Bleep |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
If found the culprit.... In lines 1773...1776 replace the keyword CONST with DIM Apparently a CONST variable defined in a SUB is a local variable, not a global variable. So it cannot be used outside that SUB. I am not sure if this is a feature....or a bug.... It is not in the PicomiteVGA user manual. I'll have to ask Peter... Regards, Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4043 |
I believe it is a (mis)feature, or "broken by design". Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
Hi Tom, For now I will make this change permanent (CONST->DIM). Then Peter has choice of fixing or not. And we can continue with the development. I hope we now have a new baseline, that will satisfy everyone. pet24g.zip This should be identical to pet24fnh.bas with - CONST changed to DIM in the SUB config_NES - the slow ticker in teh startup screen Regards, Volhout P.S. Martin, thank you for your patience. I really appreciate it. Edited 2023-11-17 23:07 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1114 |
Works, thank you edit : short tested pet24g .. looks good so far on VGA and Game*mite and I can now blast the Flowerpot on L2, 2nd floor Edited 2023-11-18 01:22 by Martin H. 'no comment |
||||
karlelch Senior Member Joined: 30/10/2014 Location: GermanyPosts: 172 |
Dear all, out of personal curiosity and because I was utterly confused about the different versions at setting (at least, at the beginning), I tried to keep up with the versions of petxx in a private (=publicly inaccessible) GitHub repository. This allows for easy tracking of changes (and may avoid confusion like the one in the past couple of posts). If this would be of help to anyone, I could give that person private access (all I'd need would be this persons GitHub user name). As this is, of course, your (beautiful!) work, I won't make it publicly visible. Best Thomas |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
Hi Thomas, The GIT history will be quite amusing to see. Sine I have never written a game before, there has been quite a lot of going back and forth, not something like consistent growth. Volhout PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9124 |
Standard MMbasic across all versions so will not change From the manual entry for the CONST command |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4246 |
Thanks Peter ! I was confused, but now I know how it works it is logical. PicomiteVGA PETSCII ROBOTS |
||||
Page 30 of 38 |
Print this page |