1

Hi

Just playing with PedroM on an emulator while I wait for my real TI-92+ to work its way from America to here in England

I'm wondering how to set the path for binaries in PedroM

attempted to create a text file 'path' with system (also tried system\) on a line, which seems to be how it should be done

both tried using side and a simple echo system > path (which I would assume do the same thing)

but on attempting to run binaries placed in there it's still not seeing them

libraries placed there do seem to be found without anything in the path at all so I'm a bit mystified as to why it isn't working.

Also, has development on PedroM entirely stopped now? looks like there's not been a new release in almost 10 years. Was pondering writing a basic interpreter for it (I've previous written one for AVR chips) in order to make it a little more useful standalone but I wonder if anyone is still using/working on it?

Also, side seems to suggest an on board assembler exists (it is configured to call one) but I can't seem to find any sign of it, was this a planned addition that was never released or a third party tool I need to find elsewhere?

Thanks

--
Adam (mog)
avatar

2

Folco a été invité sur ce sujet.


He could probably help you smile
avatar
Proud to be CAKE©®™


GCC4TI importe qui a problème en Autriche, pour l'UE plus et une encore de correspours nucléaire, ce n'est pas ytre d'instérier. L'état très même contraire, toujours reconstruire un pouvoir une choyer d'aucrée de compris le plus mite de genre, ce n'est pas moins)
Stalin est l'élection de la langie.

3

Hi Mog,

I can’t answer about path, I have to check.
I think libraries can be located anywhere, I have to check (you can see how the PreOS dynamic linker search for them, maybe it used SymFindFirst/SymFindNext).
I still use PedroM, writing an assembler from ages grin
If you plan to develop in assembly, I can share my patched PedroM, which fixes a bug in kernel::LibsExec.

4

Mog Kupo (./1) :
I'm wondering how to set the path for binaries in PedroM
Pedrom is far from a complete shell, I not sure there is a PATH system variable

Mog Kupo (./1) :
Also, has development on PedroM entirely stopped now? looks like there's not been a new release in almost 10 years. Was pondering writing a basic interpreter for it (I've previous written one for AVR chips) in order to make it a little more useful standalone but I wonder if anyone is still using/working on it?
Pedrom is not actively developed anymore but the source is available. Pphd (the creator of Pedrom) show up on this forum from time to time. He might accept your contributions.

Mog Kupo (./1) :
Also, side seems to suggest an on board assembler exists (it is configured to call one) but I can't seem to find any sign of it, was this a planned addition that was never released or a third party tool I need to find elsewhere?
side was an external editor designed to work with "as" (68k assembler) and "cc"(K&R C compiler). Side was integrated into Pedrom without these tools, but I believe you can still install them separately. There is also a better onboard C compiler : "GTC", but If i remember correctly it is not available officially on Pedrom (license problem).
avatar

5

PedroM supports FlashApps ?

6

It does not. If I remember correctly, to work around this problem, Pollux (the GTC author) made a special version Pedrom with GTC directly included, but he could not distribute it because the GTC license is not compatible with the Pedrom license.
avatar

7

Ah, thank you everyone for your responses

Glad to see there's activity in this community though I'm joining rather late in the day

I think there is a path system variable, it's mentioned in the documentation but it's not clear how to set it, it just says it should be a list of strings... Unless it was documented but never actually implemented.

What is this bug in LibExec you mention? I'll likely be building the OS myself as I'll have to build my interpreter into it but it'd certainly be helpful to know what I need to fix.

I've not written anything as yet (plus my 68000 experience is extremely limited, did a little on the Amiga (devpac) but I was more a Z80/6502 man back in the day, though I imagine I'll be able to pick it up easily enough), reasonably experienced with C though and have the dev environment set up (I was quite surprised to find an old Amiga assembler being used for most apps on this platform!)

Thanks

--
Adam (Mog)
avatar

8

If the doc mention a list of strings, the correct syntax should be : {"system"}→path . You have to use the STO key to type the arrow.
With echo system >path , you were creating a text variable

Pedrom use the same file system than AMS (the official TI OS) where files are handled as variables on command line.
Variables have different types:
- expression : 10→x (ams support more complex expressions like : x^2+4x+7→polynom)
- string : "foo"→bar
- list : {1,2,3}→mylist
- matrix : [[1,2,3][4,5,6]]→mymat
- text : text, usually created with the text editor
- program : TI Basic program, created with the program editor
- asm : 68k binary program
- ...
avatar

9

(The "🡢" character shows up as "01F862" here. Try this one instead : "→")
avatar
Zeroblog

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo

10

Hi!

Ahh, my real TI-92 plus is finally here having arrived yesterday (and I've made my own serial cable as I am not paying 25 quid for 3 resistors and 3 diodes)

Tried setting the path that way (though think that is one of the ways I tried to set it before) and no dice, guess it's in the docs but was never implemented (or the binaries I have are older than the docs)

Is the C compiler someone built into PedroM the GTC compiler by any chance? And if so, while it can't be distributed all in one, perhaps it can be distributed the way the console ROM hacks (translation etc.) are distributed? with the standard PedroM OS image (ideally without the CAS) and then a binary patch containing GTC so the two things are not distributed together but you can use an patcher to apply the second to the first? Might that not avoid the legal licensing issues...

I've been having some real difficulties with PedroM refusing to run certain apps with memory errors and so on, not sure if Falco's libexec patch will fix any of these...

Scott Adams text adventure interpreter seems affected (Shows the UI to select a game then resets with the Protected Memory error when I attempt to run one) but the Quill interpreter works fine.
The Chip-8 library also seems to work only some of the time (will work 0-1 times then reboots with System Error: Corrupted heap)...
C64 emulator attempts to boot but can't seem to see the ROM, Spectrum emulator actually does boot but ignores the parameter specifying which game to load, Gameboy emulator largely works but the configuration page doesn't (though that's not required to play the games)

These things all work in AMS (except the Chip-8 library which seems to require an older kernel than PreOS)

Are there any solutions to any of this or am I just not going to see any at this late stage -.-

Also, Falco, if you have a patched image for the 92+ with your bugfix and ideally without the CAS eating a massive chunk of flash I'd really appreciate a copy of that, the building of it seems nowhere near as simple as I thought and I'm clearly not going to get my head around this new platform quickly.

Thanks everyone

--
Adam (mog)

(sometimes I think things were a lot easier on my original ZX81, okay it was incredibly limited but at least I could fully understand it and what the ROM was doing)
avatar

11

GTC is open source, at least to some extend:

Godzil/gtcGitHubPaul Froissard's (Pollux) GTC - a TI-68K C compiler - Godzil/gtc


I’ve collected the different source bundle Paul released and made that repository. You should be able to build the Pc and TI version of it as far as I can say.
avatar
Proud to be CAKE©®™


GCC4TI importe qui a problème en Autriche, pour l'UE plus et une encore de correspours nucléaire, ce n'est pas ytre d'instérier. L'état très même contraire, toujours reconstruire un pouvoir une choyer d'aucrée de compris le plus mite de genre, ce n'est pas moins)
Stalin est l'élection de la langie.

12

Oh GTC is available on GPL licence. I used to believe that it was based on a compiler with an incompatible licence (commercial usage restriction).
So it should be possible to merge it in Pedrom.
avatar

13

I don’t know further than what Paul’s left in the source archive. So yeah sounds it is GPL
avatar
Proud to be CAKE©®™


GCC4TI importe qui a problème en Autriche, pour l'UE plus et une encore de correspours nucléaire, ce n'est pas ytre d'instérier. L'état très même contraire, toujours reconstruire un pouvoir une choyer d'aucrée de compris le plus mite de genre, ce n'est pas moins)
Stalin est l'élection de la langie.

14

Mog Kupo (./1) :
I'm wondering how to set the path for binaries in PedroM
attempted to create a text file 'path' with system (also tried system\) on a line, which seems to be how it should be done
both tried using side and a simple echo system > path (which I would assume do the same thing)
but on attempting to run binaries placed in there it's still not seeing them
The correct syntax is : {"system"}→system\pathIf it doesn't work, it is a bug because it is implemented (see src/System.asm function FindSymInPath).


Folco (./3) :
I think libraries can be located anywhere, I have to check (you can see how the PreOS dynamic linker search for them, maybe it used SymFindFirst/SymFindNext).
PedroM will look in the current folder and in the "system" folder for libraries

Mog Kupo (./10) :
I've been having some real difficulties with PedroM refusing to run certain apps with memory errors and so on, not sure if Falco's libexec patch will fix any of these...
This will likely be a bug in the implementation of some romcalls. It could also some be some bugs in the application (just like recently fixed CF bug but less likely).

Mog Kupo (./10) :
Scott Adams text adventure interpreter seems affected (Shows the UI to select a game then resets with the Protected Memory error when I attempt to run one) but the Quill interpreter works fine.
The Chip-8 library also seems to work only some of the time (will work 0-1 times then reboots with System Error: Corrupted heap)...
C64 emulator attempts to boot but can't seem to see the ROM, Spectrum emulator actually does boot but ignores the parameter specifying which game to load, Gameboy emulator largely works but the configuration page doesn't (though that's not required to play the games)
Are there any solutions to any of this or am I just not going to see any at this late stage -.-
There is no easy solution.
The solution is to debug the called romcalls to see where it happens, when it happens and what went wrong (everything in asm 68k).
And then provide Patch.
I am not sure if I'll have the motivation to do it.

Mog Kupo (./10) :
Also, Folco, if you have a patched image for the 92+ with your bugfix and ideally without the CAS eating a massive chunk of flash I'd really appreciate a copy of that, the building of it seems nowhere near as simple as I thought and I'm clearly not going to get my head around this new platform quickly.
To build without CAS, just edit the main Makefile and change CAS=1 into CAS=0
Then in a shell, run make
It just needs a bash shell and make and tigcc/gcc4ti installed (you can install msys2 on windows or linux on windows)

15

Hi Mog,

Here is the discussion about the kernel::LibsExec bug : topics/155985-bug-de-libsexec
The post ./20 contains the fixed version.
But don't worry, the problems you are facing are not related to this ^^

Can you get a working version by yourself, or do you want I share mine ?

16

Folco (./15):
Hi Mog,

Can you get a working version by yourself, or do you want I share mine ?

Ahh, it'd be helpful if you could share a fixed firmware image...

I still don't have a suitable build environment (as I only now saw the above message), though I have other issues now...

Have you ever had it freeze up when the archive space is getting full, then on being reset half the archived files have disappeared?

That happened earlier to me when I was trying it on my real hardware, it's like the garbage collection is collecting things other than garbage...
avatar

17

And just had a possibly related issue where I unarchived and deleted a meg of files but the free space didn't increase at all, the files are gone but still the archive space is indicated used.

Really wondering if something is amiss with this version, it's the one prebuilt in the download at ticalc.org, banner says "PedroM v0.83 [20101103 17.58]"
avatar

18

Mog Kupo (./16) :
Have you ever had it freeze up when the archive space is getting full, then on being reset half the archived files have disappeared?
That happened earlier to me when I was trying it on my real hardware, it's like the garbage collection is collecting things other than garbage...

I confirm that EM_GC is buggy and may lost data on Garbage Collection or even freeze
I'll provide a fix

Mog Kupo (./17) :
And just had a possibly related issue where I unarchived and deleted a meg of files but the free space didn't increase at all, the files are gone but still the archive space is indicated used.

I have reproduced the issue.
I'll provide a fix

19

Here is a patch for both:
--- a/src/Flash.asm
+++ b/src/Flash.asm
@@ -563,13 +563,13 @@ EM_survey:
                        moveq   #1,d1                           ; Calculate
                        and.w   d0,d1                           ; d1 = 1 if odd, 0 if even
                        add.w   d1,d0                           ; Even upper address
-                       add.l   d0,a0                           ; Next entry
                        cmp.w   #ARC_ST_DELETED,(a0)
                        bne.s   \NoDel
                                add.l   d0,d4           ; Add it to FreeAfterGC
                                bra.s   \NextNoDel
 \NoDel:                        add.l   d0,d3                   ; Add it to InUse
-\NextNoDel:            cmp.l   a1,a0                           ; In the same sector ?
+\NextNoDel:            add.l   d0,a0                           ; Next entry
+                       cmp.l   a1,a0                           ; In the same sector ?
                        bcs.s   \SectorLoop                     ; Next Entry in Sector 
 \NextSector                    ; Next Sector
                                move.l  a1,a0                   ; New Start
@@ -923,7 +923,8 @@ EM_GC:
                                beq.s   \Failed                 ; Failed to erase it
                                ; Pop all handles
 \RestoreLoop                   move.w  (a7)+,d7                ; Handle
+                                        move.l  a3,a4           ; Save end of sector
                                        jsr     EM_findEmptySlot        ; It could not failed since we have empty a sector
                                        lea     -ARC_ENTRY.HeaderSize(a0),a3    ; Dest
                                        move.w  d7,a0
@@ -937,7 +938,8 @@ EM_GC:
                                        lsl.w   #2,d0
                                        move.l  a1,0(a0,d0.w)   ; Save new addr of the handle
                                        move.w  d7,d0
+                                        move.l  a4,a3           ; Restore end of sector
                                        bra.s   \RestoreLoop
 \NextSector            move.l  a3,a2                   ; New Start
                        adda.l  #$10000,a3              ; New End

20

Good lord, that was very quick, thankyou

I have the build environment working now (had to set it up on another machine, hence it took a bit)

I'll have a go building with that and the other fix now

Much appreciated!

(as for my original path error, that was due to failure to read on my part, read a () when actually a {}, everything working now, just wasn't familiar with all the data types it uses)
avatar