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 : PETSCII ROBOTSfor PICOMITE beta
Page 2 of 4 | |||||
Author | Message | ||||
homa Guru Joined: 05/11/2021 Location: GermanyPosts: 351 |
Hi guys, very good job! I got the game working right away with the good instructions from here and the patch history on my PicoMiteVGA MMBasic Version 5.08.08b3 OPTION SYSTEM I2C GP14,GP15 OPTION COLOURCODE ON OPTION KEYBOARD GR OPTION CPUSPEED (KHz) 252000 OPTION DISPLAY 20, 40 OPTION SDCARD GP13, GP10, GP11, GP12 OPTION AUDIO GP4,GP5', ON PWM CHANNEL 2 OPTION RTC AUTO ENABLE OPTION MODBUFF ENABLE got it running. That really rocks :-) I haven't found any bugs so far (played for 1/2h), but I don't know the original either. I'm going to show it to my son later, can't wait to see his reaction! Keep up the good work. Matthias Edited 2023-12-04 05:17 by homa |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4239 |
Minor changes - Toms suggestions 1,2,3 are implemented - Test playing (see photo) found one new bug (to be investigated still). pet25h.zip The bug centers around the question whether a box can be blown with a canister or not. Well.. it appears there are 2 different boxes (tiles &h29 and tiles &hC6). I have to investigate whether their attributes are different. So maybe identical looking boxes can have different capabilities. That will be for a next revision, when I have more time to investigate. Volhout P.S. all test players (4 different in total) liked the game, and spend together hours playing. Edited 2023-12-04 07:31 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
This Information, together with a List of possibliy options in the .config file would have been helpful, before the g Version had been published. Now stitting with my PicoGame Board and have to guess, how the Settings should be to fix, what wasn't broken before. This is something I can figure out, but frustrating for me and the Testers. Even if i set the String to "PicoGAME VGA" (why to hell ist this Case sensitive?) my controller wouldnt work. So, I'll stay out of it until that's thought through to the end, skip the 25g Version and use the older 25e working version for comparing the Game with the dos Version. Edited 2023-12-04 17:00 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4239 |
Hi Martin, Tom, Kevin, On the PicomiteVGA and PicoGameVGA platforms you can make the newer versions run without anything on A:/ if using the keyboard. It is just the controller stuff that Tom is working on that needs the config file in A:/. Stay with keyboard for now. Tom also found a timing issue with his controller implementation (in his list issue 4) that he still is looking into. That issue was fixed by me, but apparently got back (in other words...my fix was not a good fix). For Tom: The "kill_kb" in below code fixed it in the earlier version Martin, If you desire so, I will look into the current version to see what line to comment out, so you can use your controllers. By the way, pet25h.bas re-introduced an old bug in my damage routine (now you can shoot plants again, which was an earlier bug in pet17x), so my investigation of the tile attributes is really needed to get damage compliance. But pet25h has Tom's suggested information strings, adapted for length... Volhout Edited 2023-12-04 18:41 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
Hi Martin, I'm sorry you are having teething troubles with my changes / don't like them, there is a reason I am posting them (and instructions to make use of them) in the development thread rather than the beta thread. Some background, restricting myself to consideration of the PM as a games platform, apologies for repeating myself: 1. The PicoMite / PicoMiteVGA is not a single hardware configuration, in addition to the vanilla devices there are two additional, what we might generously call, "standard" configurations the "Game*Mite" and the "PicoGAME VGA - PCB v2" with the latter being able to use a combination of {S}NES gamepads and Atari joysticks. I don't think Peter's SMD PicoMite VGA or any of the other designs have a game port as standard, I may be wrong. In addition I expect we will see one or more PicoMite VGA boards with a Wii controller socket at some point relatively soon. 2. The firmware cannot distinguish between the PCB variations, so either we have custom firmwares for each (the first public iteration of the Game*Mite did this, the next one won't) or users edit each program, or we need a common software solution. 3. Whilst in theory a program could prompt the user and poll to determine the controller configuration (https://github.com/thwill1000/mmbasic-lazer-cycle does this) in practice I think it is "bad form" to be, in the case of the NES controllers, arbitarily pulsing GPIO pins in the hope that there is an NES controller attached, and not, for example a "garden watering system". 4. I believe there is a possible "solution" where we agree that all variations would use a voltage divider on one of the analog inputs with different values for different variations (but what about the vanilla devices), but that ties up a pin and I doubt we'll ever agree to it. Likewise I exclude any solution that requires specific code to be present in the LIBRARY. The common software solution I am persuing (after several false starts over the last couple of years) is the existence of a configuration file on "A:/" (so it is device specific; I regularly swap "B:/" SD card between a Game*Mite and a PicoGAME VGA). - This file is called "A:/.spconfig" or if missing "A:/.config" ... why the two? ... because I didn't want to take the liberty of declaring "ownership" of" "A:/.config". - It uses simple .ini syntax with support for # and ; as comment characters, double-quoted keys and values, but no sections. - You can read it (or any similar .ini file) with this code: ' 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 - In this file the optional "device" property can be used to identify "Game*Mite" or "PicoGAME VGA" and the option "default-controller" (to be renamed "controller" in next iteration) can identify "nes-a" or "atari-a". e.g. Game*Mite configuration: device = "Game*Mite" PicoGAME VGA configuration for NES gamepad: device = "PicoGAME VGA" ; NES is the default controller PicoGAME VGA configuration for Atari joystick: device = "PicoGAME VGA" default-controller = "atari-a" A program aware of this could then configure itself with something like: Select Case sys.get_config$("device", Mm.Device$) Case "Game*Mite" ' Do Game*Mite stuff' Case "PicoGAME VGA" ' Do PicoGAME VGA stuff' Select Case sys.get_config$("default-controller", "nes-a") Case "nes-a" ' Do NES gamepad stuff. Case "atari-a" ' Do Atari joystick stuff. Case Else Error "Unsupported controller: " + sys.get_config$("default-controller") Case "PicoMite" ' Do PicoMite stuff' Case "PicoMite VGA" ' Do PicoMite VGA stuff' Case Else Error "Unsupported device: sys.get_config$("device", Mm.Device$) End Select YMMV . It was, in the development thread. It depends on your definiton of "broken", I would argue that requiring an end-user to adjust each program separately to accomodate their hardware is if not "broken" then at least "frayed around the edges". It doesn't have to be case-sensitive, but since most checks for MM.DEVICE$ already are I figured it would be logical to do the same. So, I'll stay out of it until that's thought through to the end ... I'm sorry about that, but it can't be fixed without your help diagnosing the issue, i.e. it WORKSFORME. After line 23: Const CTRL_DRIVER$ = init_controller$() What is the value of CTRL_DRIVER$ Best wishes, Tom Edited 2023-12-04 20:50 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
So everyone has to search in the development thread to eventually find the Informations? device = "PicoGAME VGA" ; NES is the default controller I had "picogame vga" and it was an unknown device. And no, if there is no entry for Controller, it is set to "NONE" Edited 2023-12-04 21:21 by Martin H. 'no comment |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6797 |
I suppose .config / .spconfig could have all the current devices listed by default, the default device automatically set to "none" and the user simply un-comments the line for their device? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9121 |
I'm not a game player and have only used Petscii as a test of the firmware but FWIW I think the game should be completely self-contained and any selection of controller should be part of the program initialisation. It should not be based on some ever changing set of H/W platforms. If this means that pin selection should be part of the program then so be-it. Its not that hard and once written could be used in multiple games. The firmware has to do it often enough Edited 2023-12-04 21:55 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
In my defence I never posted my changes to THIS thread. Which is analagous to this being a mistake: IF MM.DEVICE$ = "picomite" THEN ... Anyway I have no issue with changing the code to be case-insensitive if it bothers you. Does that mean the value of CTRL_DRIVER$ is "ctrl_none$" or something else ? Add diagnostics to init_controller$() to see what path the code is following. Yes ... except who/what are you relying upon to install that template in the first place? I see this as no different to the initial setting of OPTIONs when comissioning a PicoMite{VGA} device and you don't have to do it at all if you only want to use the keyboard. IMO it's not that simple. Programs/games need some hints otherwise they would have to provide a potentially unbounded list of controllers some of which would cause the program to ERROR. Also some devices (Game*Mite or an imaginary PicoGAME VGA "console") might not have a keyboard so they need a global setting for what controller to drive their "menu" from. EDIT: Also some authors might want to provide controller support without going to the trouble of having controller configuration UI ... Lazer Cycle is > 60% controller configuration, settings menu and high-score table . Best wishes, Tom Edited 2023-12-04 22:25 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6797 |
Tom has put a lot of work into this, and I like the idea of a config file, but it could work a bit differently. Rather than return the platform name, return the control pins. Something like #"NES", gp1, gp2, gp3 # data, latch, clock - 8-bit #"SNES" gp1, gp2, gp3 # data, latch, clock - 16-bit #"NESB", gp4, gp5, gp22 # data, latch, clock - 8-bit on PicoGAME v2 port B #"SNESB", gp4, gp5, gp22, # data, latch, clock - 16-bit on PicoGAME v2 port B #"WII" "NONE" The merely looks for the first uncommented line to find the default controller for that machine. This allows, for example, all boards using the first line to use the same configuration, no matter what the board actually is. The string argument tells the program how many arguments to look for and *how* to use the specified pins. ===================== (this cross-posted with Tom's reply. :) ) Edited 2023-12-04 22:28 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4239 |
@Martin, The mistery is solved. Playing with the DOS version I discovered the mechanism with the boxes. - first damage to closed boxes changes them to open boxes (the exception) - damage to all objects with "damage" bit set in attributes are destroyed. This is implemented in pet25i.bas Also outdoor you can assign damage now (burning some trees that block your way). pet25i.zip FWIW: I have no opinion in the controller setup discussion. My intention was to run it on VGA with keyboard, and as long as the game does that, you are free to implement whatever is best for the general adoptation into the community. Similar for LCD support. My eyes can not see the details on a small LCD, so I will never play this game on a 2.8" LCD. I need my 17" screen .... Regards, Volhout Edited 2023-12-04 22:29 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6797 |
If the program searched its own path for a .sconfig file first then the default controller for that game could be used. :) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
As compelling as this idea is, I'm not convinced you want to be doing this in the general case. IMO the last thing you want in a controller driver (called really often) is a bunch of expensive variable lookups for the pin allocations (even though currently both the PETSCII controls and my own library has this, eventually to be removed). Of course if we had firmware support (I AM NOT ASKING FOR IT, perhaps in the future when the smoke has settled and implemented by me) then this could work ... perhaps. Best wishes, Tom Edited 2023-12-04 22:54 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9121 |
I could consider firmware support if someone can define the (small) set of controllers that should be supported AND SEND ME WORKING EXAMPLES. The advantage of the Wii Classic is that it just uses I2C on the SYSTEM I2C pins but new devices like the OV7670 camera require 13 pins and these are defined in the DEVICE CAMERA OPEN command. I've also added a generic DEVICE() function which can be used (currently only DEVICE(WII param used). Nothing difficult about DEVICE SNES OPEN and DEVICE(SNES param) but I will need proper info Edited 2023-12-04 23:09 by matherp |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
I recognise that Peter and could provide that information today (well except I'm supposed to be doing real-work) for NES/SNES/Atari, but I think there is still some thrashing out to do and IMO we would still need to agree a standard mechanism to identify the Game*Mite, PicoGAME VGA and other derived platforms. Plus there is always the issue of being able to adapt to none-standard controllers like the Game*Mite. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9121 |
OPTION platform aaaaaaa ? mm.info(platform) |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4040 |
OPTION platform aaaaaaa ? mm.info(platform) That would be ideal, I just (appearances to the contrary) don't like to ask. I'm guessing that OPTIONs are not the finite resource that they were on the CMM2 ? Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9121 |
I've currently got 12 bytes free. I could add another 256 but then any OPTION DISK SAVE files would be invalid - perhaps I should anyway before releasing 5.07.08 as that OPTION is only in the beta/RC versions |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6797 |
I'm going to have to be careful here. :) PicoGAME v4 (there is no v3) has a WII Classic controller and a NES/SNES, but pin 1 of the (only) D connector is Latch2 for a second NES/SNES. It's mapped as a Port A NES socket by defat. Just a thought about using two NES controllers. I assumed that simply reading it twice, but with a different latch pin would be fine, but you could read two at once. Merely have two data inputs, one from each controller. Carry out a single read operation but store the data pin into its own variable (read then shift). You've read two controllers in about the same time as reading one. I've not tried this yet but I can't see any problems. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4239 |
OPTION PLATFORM x$ x$ length 12 Volhout PicomiteVGA PETSCII ROBOTS |
||||
Page 2 of 4 |
Print this page |