Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : PicoRR: Vibe Virtual Model Railroad

Posted: 02:28pm
06 Mar 2026
Copy link to clipboard
lizby
Guru

Vibe Virtual Model Railroading

I wanted an application to exercise and test PicoDB . About 8 weeks ago, someone mentioned an interest in model railroad control. After I finished PicoDB, I thought that might be just the ticket. I had an HO gauge layout when I was a teenager, but have hardly given a thought to it in 60 years.

I started work on it with Gemini on February 14. The exercise has been a success--the virtual model train works, and PicoDB serves it (and we found and fixed 4 obscure bugs in PicoDB).

The program, PicoRR.bas, is 2058 lines long. The PicoDB library is 2545 lines. That's 4600+ lines of MMBasic code from Gemini since January 13--50 days, 92 lines a day (but with 2 sets of guests visiting and a porch built on our shed which subtracted about 10 days total).

Here's a youtube video of 4 trains running. The frame rate is only 1-2 frames per second, but if this were translated to an 8-foot by 6-foot layout, the speeds would be pretty much in range: PicoRR Demo  (doesn't hurt to run it an 1.5 speed).

Here's the script which drove the video:
s10+ve3 4,delay 3,ve3 0s10-ve3 -3
delay 3,ce3s9+s8+s4+ve3 25
at e3 inner-e,s8-s9-s4-
at e3 inner-w,s16+s14+s13+
s6+s3+ve1 35,at e3 Mainline-E,s16-
s14-s15+s11+,ve1 45
at e1 Mainline-W,s6-s3-s15-s11-s13-
s7+s3+,ve2 20
at e1 Mainline-N, delay 2
s12+
at e3 Mainline-W,s17+s7-s8+
delay 4,ve4 7,delay 15,s8-
ve3 35,s17+
at e1 Mainline-S, delay 3,s17-s18+
at e2 Inner-W, s4+s2+s1+s3+s7-ve4 20
s12-s13+ve3 25, ve1 25
at e1 Mainline-N,delay 3, s13-s12+
s17+ve3 35,ve1 35
at e3 Mainline-W,S18-
at e1 Mainline-S,ve1 2,ve3 2
delay 5,s17-s18+ve1 25, ve3 25
s13+s12-
Loop 16


This is running on Peter's Pico2 HDMI PCB:



You drive the trains by typing commands (on PC/laptop keyboard--I don't have a keyboard attached to the PCB) at the "DISPATCH>" prompt on the Screen/LCD. For instance, s6+ve1 20 will flip switch 6 out of spur2 and start up the train behind Engine E1.

Here's the quick help ("?" at the "DISPATCH>" prompt) for dispatch commands at the keyboard.

=======================================================================
                   MODEL RAILROAD OS - HELP MENU
=======================================================================

--- DISPATCH COMMANDS ---
Commands can be chained together using commas (e.g., S1+, VE1 10, CE3)
Switch commands can be auto-chained (e.g., S5+S3+S4-)

V[E#] [speed]   : Set velocity. Positive=Forward, Negative=Reverse.
                 Use + or - to increment/decrement from current speed.
                 Ex: VE1 15  (Moves Engine 1 forward at speed 15)
                 Ex: VE1 -5  (Slows Engine 1 down by 5)
                 Ex: V0      (GLOBAL EMERGENCY STOP. Halts all trains)
S[#][+/-]       : Throw switch # to Diverging (+) or Straight (-).
                 Ex: S5+     (Throws switch 5)
                 Ex: S5+S3-  (Throws 5 diverging, 3 straight)
U[E#] [qty]     : Uncouple [qty] cars from Engine # and drop them on the
                 current track segment. If [qty] is omitted, drops ALL.
                 Ex: UE4 2   (Drops the last 2 cars from E4's consist)
                 Ex: UE4     (Drops all cars, leaving only the engine)
C[E#] [qty]     : Couple Engine # to cars parked on its current track.
                 Ex: CE3 1   (Couples exactly 1 car to E3)
                 Ex: CE3     (Couples ALL cars on the track to E3)
A[Loc][R/L][E#] : Fast-Assemble a consist at [Loc] facing [R]ight or [L ]eft.
                 Ex: ASpur1RE3B1  (Puts E3 and B1 on Spur1 facing Right)
RR              : Rotate the Roundhouse turntable 180 degrees.
H, ?, !H        : Display this help menu.

--- SCRIPTING COMMANDS ---
(Used inside .scr files, or processed via the pre-processor)
DELAY [sec]     : Pauses the script for [sec] seconds.
                 Ex: DELAY 5
AT [E#] [Loc]   : Pauses script until Engine # enters [Loc] (SegID or Friendly).
                 Ex: AT E3 Spur1
LOOP [n]        : Jumps script execution back to line [n] (default 1).
                 Ex: LOOP 8

--- META / SYSTEM COMMANDS ---
!!              : PAUSE / RESUME. Instantly freezes/unfreezes physics and scripts.
!RECORD [name]  : Begins buffering live commands to a .scr file.
                 Ex: !RECORD myrun.scr
!STOP           : Stops recording and saves the buffer to the file.
!PLAY [name]    : Compiles and executes a script file.
                 Ex: !PLAY myrun.scr
!SNAP [name]    : Save a screenshot to the SD card. Defaults to l.bmp.
                 Ex: !SNAP yard.bmp
!LAYOUT [#]     : Hot-swap the track geometry to Layout #.
                 Ex: !LAYOUT 3
!SHOW [C/F]     : Toggle overlay labels on the layout.
                 Ex: !SHOW F (Toggles Friendly Names)
                 Ex: !SHOW C (Toggles Car IDs)
!TEST [Code]    : Executes raw MMBasic code or internal diagnostics.
                 Ex: !TEST EXECUTE Print V(1)
=======================================================================

There are 3 layouts available at present:



Fuller documentation is in the zip file, which contains everything needed to run on a Pico2 HDMI, 640x480 Mode 3. I think it will work with VGA, but haven't located the boards I know I have somewhere. I have it displaying, but not yet running, on LCD 320x240 and 480x320.

The library (which contains the PicoDB database engine) needs to be saved with LIBRARY SAVE.

There are two driving files: roster.csv (which defines engines and cars), and segments.csv (defines track segments and switches):

Roster:
CarID,CarType,PixLen,ColorCode,Location,Sequence,Layout
E1,Modern Eng,20,8,Spur2,1,*
P1,Passenger,24,3,Spur2,2,*
P2,Passenger,24,3,Spur2,3,*
P3,Passenger,24,3,Spur2,4,*
P4,Passenger,24,3,Spur2,5,*
E2,30s Engine,16,12,Spur3,1,*
C1,Centerbeam,22,7,Spur3,2,*
R1,Reefer,16,5,Spur3,3,*
G1,Gondola,16,2,Spur3,4,*
H1,Hopper,14,4,Spur3,5,*
T1,Tank Car,15,15,Spur3,6,*
B1,Boxcar,16,10,Spur3,7,*
E3,Yard Eng,10,9,Spur6,1,*
E4,Modern Eng,20,8,Spur4,1,3
B2,Boxcar,16,10,Spur4,2,3
B3,Boxcar,16,10,Spur4,3,3
T2,Tank Car,15,15,Spur5,101,3
B4,Boxcar,16,10,Spur5,102,3


Segments:
LayoutID,SegID,Type,Len,X1,Y1,X2,Y2,Radius,Next1,Next2,Next3,Friendly
1 ,L3,S,60.00,20.00,0.00,80.00,0.00,0.00,2,3,,
1 ,L2a,C,31.42,80.00,20.00,270.00,360.00,20.00,3,L2b,,
1 ,L2b,S,35.00,100.00,20.00,100.00,55.00,0.00,L2a,L2c,,
1 ,L2c,C,31.42,80.00,55.00,0.00,90.00,20.00,L2b,4,,
1 ,L1,S,60.00,80.00,75.00,20.00,75.00,0.00,4,1,,
1 ,L4a,C,31.42,20.00,55.00,90.00,180.00,20.00,1,L4b,,
1 ,L4b,S,35.00,0.00,55.00,0.00,20.00,0.00,L4a,L4c,,
1 ,L4c,C,31.42,20.00,20.00,180.00,270.00,20.00,L4b,2,,
1 ,Diag1a,S,57.60,80.00,0.00,44.00,45.00,0.00,3,7,,
1 ,Diag1b,S,9.60,44.00,45.00,38.00,52.50,0.00,7,6,,
1 ,Diag1c,S,9.60,38.00,52.50,32.00,60.00,0.00,6,5,,
1 ,Diag1d,S,19.20,32.00,60.00,20.00,75.00,0.00,5,1,,
1 ,Diag2a,S,38.40,20.00,0.00,44.00,30.00,0.00,2,8,,
1 ,Diag2b,S,57.60,44.00,30.00,80.00,75.00,0.00,8,4,,
1 ,Spur1,S,37.50,6.00,45.00,43.50,45.00,0.00,,7,,spur3
1 ,L10,S,31.50,6.00,52.50,37.50,52.50,0.00,,6,,spur2
1 ,L9,S,25.50,6.00,60.00,31.50,60.00,0.00,,5,,spur1
1 ,L12b,S,25.50,6.00,30.00,31.50,30.00,0.00,,9,,spur4
1 ,L12,S,11.50,32.00,30.00,43.50,30.00,0.00,9,8,,
1 ,Lad1,S,9.60,26.00,22.50,32.00,30.00,0.00,L13,9,,
1 ,L13b,S,13.50,6.00,22.50,19.50,22.50,0.00,,10,,spur5
1 ,L13,S,6.00,20.00,22.50,26.00,22.50,0.00,10,Lad1,,
1 ,Lad2,S,5.50,14.00,15.00,19.50,22.50,0.00,Roundhouse,10,,spur6
1 ,Roundhouse,S,8.00,6.00,15.00,14.00,15.00,0.00,,Lad2,,
1 ,1,SW,0.00,20.00,75.00,0.00,0.00,0.00,L4a,L1,Diag1d,
1 ,2,SW,0.00,20.00,0.00,0.00,0.00,0.00,L4c,L3,Diag2a,
1 ,3,SW,0.00,80.00,0.00,0.00,0.00,0.00,L2a,L3,Diag1a,
1 ,4,SW,0.00,80.00,75.00,0.00,0.00,0.00,L2c,L1,Diag2b,
1 ,7,SW,0.00,44.00,45.00,0.00,0.00,0.00,Diag1a,Diag1b,Spur1,
1 ,6,SW,0.00,38.00,52.50,0.00,0.00,0.00,Diag1b,Diag1c,L10,
1 ,5,SW,0.00,32.00,60.00,0.00,0.00,0.00,Diag1c,Diag1d,L9,
1 ,8,SW,0.00,44.00,30.00,0.00,0.00,0.00,Diag2b,Diag2a,L12,
1 ,9,SW,0.00,32.00,30.00,0.00,0.00,0.00,L12,L12b,Lad1,
1 ,10,SW,0.00,20.00,22.50,0.00,0.00,0.00,L13,L13b,Lad2,
1 ,X1,X,0.00,50.00,37.50,0.00,0.00,0.00,,,,
2 ,L2a_Ext,C,47.12,80.00,20.00,225.00,360.00,20.00,Diag1_C_S2,L2b,,
2 ,L2b,S,35.00,100.00,20.00,100.00,55.00,0.00,L2a_Ext,L2c_Ext,,
2 ,L2c_Ext,C,47.12,80.00,55.00,0.00,135.00,20.00,L2b,Diag2_S3_C,,
2 ,L4c_Ext,C,47.12,20.00,20.00,315.00,180.00,20.00,Diag2_S8_S4,L4b,,
2 ,L4b,S,35.00,0.00,20.00,0.00,55.00,0.00,L4c_Ext,L4a_Ext,,
2 ,L4a_Ext,C,47.12,20.00,55.00,180.00,45.00,20.00,L4b,Diag1_S1_S7,,
2 ,Diag1_S1_S7,S,10.22,34.14,69.14,38.72,60.00,0.00,L4a_Ext,5,,
2 ,Diag1_S7_S6,S,8.39,38.72,60.00,42.48,52.50,0.00,5,6,,
2 ,Diag1_S6_S5,S,8.39,42.48,52.50,46.24,45.00,0.00,6,7,,
2 ,Diag1_S5_C,S,8.39,46.24,45.00,50.00,37.50,0.00,7,Diag1_C_S2,,
2 ,Diag1_C_S2,S,22.42,50.00,37.50,65.86,5.86,0.00,Diag1_S5_C,L2a_Ext,,
2 ,Diag2_S3_C,S,22.42,65.86,69.14,50.00,37.50,0.00,L2c_Ext,Diag2_C_S8,,
2 ,Diag2_C_S8,S,8.39,50.00,37.50,46.24,30.00,0.00,Diag2_S3_C,8,,
2 ,Diag2_S8_S4,S,26.98,46.24,30.00,34.14,5.86,0.00,8,L4c_Ext,,
2 ,Spur1,S,39.74,6.00,45.00,45.74,45.00,0.00,,7,,spur3
2 ,L10,S,35.98,6.00,52.50,41.98,52.50,0.00,,6,,spur2
2 ,L9,S,32.22,6.00,60.00,38.22,60.00,0.00,,5,,spur1
2 ,L12,S,13.74,32.00,30.00,45.74,30.00,0.00,9,8,,
2 ,L12b,S,25.50,6.00,30.00,31.50,30.00,0.00,,9,,spur4
2 ,Lad1,S,9.60,26.00,22.50,32.00,30.00,0.00,L13,9,,
2 ,L13,S,6.00,20.00,22.50,26.00,22.50,0.00,10,Lad1,,
2 ,L13b,S,13.50,6.00,22.50,19.50,22.50,0.00,,10,,spur5
2 ,Lad2,S,9.60,14.00,15.00,20.00,22.50,0.00,Roundhouse,10,,spur6
2 ,Roundhouse,S,8.00,6.00,15.00,14.00,15.00,0.00,,Lad2,,,
2 ,7,SW,0.00,46.24,45.00,0.00,0.00,0.00,Diag1_S5_C,Diag1_S6_S5,Spur1,
2 ,6,SW,0.00,42.48,52.50,0.00,0.00,0.00,Diag1_S6_S5,Diag1_S7_S6,L10,
2 ,5,SW,0.00,38.72,60.00,0.00,0.00,0.00,Diag1_S7_S6,Diag1_S1_S7,L9,
2 ,8,SW,0.00,46.24,30.00,0.00,0.00,0.00,Diag2_C_S8,Diag2_S8_S4,L12,
2 ,9,SW,0.00,32.00,30.00,0.00,0.00,0.00,L12,L12b,Lad1,
2 ,10,SW,0.00,20.00,22.50,0.00,0.00,0.00,L13,L13b,Lad2,
2 ,X1,X,0.00,50.00,37.50,0.00,0.00,0.00,,,,
3 ,T101,S,60.00,20.00,0.00,80.00,0.00,0.00,12,13,,Mainline-N
3 ,T102,C,31.42,80.00,20.00,270.00,360.00,20.00,13,T103,,M-NE
3 ,T103,S,35.00,100.00,20.00,100.00,55.00,0.00,T102,T104,,Mainline-E
3 ,T104,C,31.42,80.00,55.00,0.00,90.00,20.00,T103,14,,M-SE
3 ,T105a,S,6.00,80.00,75.00,74.00,75.00,0.00,14,18,,
3 ,18,SW,0.00,74.00,75.00,0.00,0.00,0.00,T105a,T105b,S18_Div,
3 ,T105b,S,48.00,74.00,75.00,26.00,75.00,0.00,18,17,,Mainline-S
3 ,17,SW,0.00,26.00,75.00,0.00,0.00,0.00,T105c,T105b,S17_Div,
3 ,T105c,S,6.00,26.00,75.00,20.00,75.00,0.00,17,11,,
3 ,S18_Div,C,5.24,74.00,55.00,90.00,105.00,20.00,18,S18_Diag,,
3 ,S18_Diag,S,4.20,68.82,74.32,64.77,73.23,0.00,S18_Div,S18_Rev,,
3 ,S18_Rev,C,5.24,59.59,92.55,270.00,285.00,20.00,Siding_S_Mid,S18_Diag,,
3 ,Siding_S_Mid,S,19.18,59.59,72.55,40.41,72.55,0.00,S18_Rev,S17_Rev,,Siding-S
3 ,S17_Rev,C,5.24,40.41,92.55,255.00,270.00,20.00,S17_Diag,Siding_S_Mid,,
3 ,S17_Diag,S,4.20,35.23,73.23,31.18,74.32,0.00,S17_Rev,S17_Div,,
3 ,S17_Div,C,5.24,26.00,55.00,75.00,90.00,20.00,S17_Diag,17,,
3 ,T106,C,31.42,20.00,55.00,90.00,180.00,20.00,11,T107,,M-SW
3 ,T107,S,35.00,0.00,55.00,0.00,20.00,0.00,T106,T108,,Mainline-W
3 ,T108,C,31.42,20.00,20.00,180.00,270.00,20.00,T107,12,,M-NW
3 ,11,SW,0.00,20.00,75.00,0.00,0.00,0.00,T106,T105c,Xover15_11,
3 ,12,SW,0.00,20.00,0.00,0.00,0.00,0.00,T108,T101,S12_Div,
3 ,13,SW,0.00,80.00,0.00,0.00,0.00,0.00,T102,T101,S13_Div,
3 ,14,SW,0.00,80.00,75.00,0.00,0.00,0.00,T104,T105a,Xover16_14,
3 ,T1,S,54.00,23.00,4.90,77.00,4.90,0.00,2,3,,Inner-N
3 ,T2,C,31.42,77.00,24.90,270.00,360.00,20.00,3,T3,,I-NE
3 ,T3,S,25.20,97.00,24.90,97.00,50.10,0.00,T2,T4,,Inner-E
3 ,T4,C,31.42,77.00,50.10,0.00,90.00,20.00,T3,4,,I-SE
3 ,T6,C,31.42,23.00,50.10,90.00,180.00,20.00,1,T7,,I-SW
3 ,T7,S,25.20,3.00,50.10,3.00,24.90,0.00,T6,T8,,Inner-W
3 ,T8,C,31.42,23.00,24.90,180.00,270.00,20.00,T7,2,,I-NW
3 ,1,SW,0.00,23.00,70.10,0.00,0.00,0.00,T6,T5c,T12a,
3 ,2,SW,0.00,23.00,4.90,0.00,0.00,0.00,T8,T1,T13a,
3 ,3,SW,0.00,77.00,4.90,0.00,0.00,0.00,T2,T1,T9,
3 ,4,SW,0.00,77.00,70.10,0.00,0.00,0.00,T4,T5a,T14,
3 ,T9,S,42.33,50.00,37.50,77.00,4.90,0.00,T12d,3,,XR-NE
3 ,T14,S,42.33,50.00,37.50,77.00,70.10,0.00,T13b,4,,XR-SE
3 ,7,SW,0.00,44.04,44.69,0.00,0.00,0.00,T12d,T12c,T15,
3 ,6,SW,0.00,38.09,51.88,0.00,0.00,0.00,T12c,T12b,T16,
3 ,5,SW,0.00,32.13,59.08,0.00,0.00,0.00,T12b,T12a,T17,
3 ,T15,S,38.54,5.00,44.69,43.54,44.69,0.00,,7,,spur3
3 ,T16,S,32.59,5.00,51.88,37.59,51.88,0.00,,6,,spur2
3 ,T17,S,22.63,9.00,59.08,31.63,59.08,0.00,,5,,spur1
3 ,T19,S,11.54,32.00,30.45,43.54,30.45,0.00,9,8,,
3 ,8,SW,0.00,44.04,30.45,0.00,0.00,0.00,T13b,T13a,T19,
3 ,9,SW,0.00,32.00,30.45,0.00,0.00,0.00,T19,T18,T20,
3 ,T18,S,26.50,5.00,30.45,31.50,30.45,0.00,,9,,spur4
3 ,T20,S,13.57,20.00,23.41,31.50,30.45,0.00,10,9,,
3 ,10,SW,0.00,20.00,23.41,0.00,0.00,0.00,T20,T21,T22,
3 ,T21,S,14.50,5.00,23.41,19.50,23.41,0.00,,10,,spur5
3 ,T22,S,9.05,14.00,16.48,19.50,23.41,0.00,R1,10,,spur6
3 ,R1,S,5.00,9.00,16.48,14.00,16.48,0.00,,T22,,
3 ,X1,X,0.00,50.00,37.50,0.00,0.00,0.00,,,,
3 ,T5a,S,5.00,77.00,70.10,72.00,70.10,0.00,4,16,,
3 ,16,SW,0.00,72.00,70.10,0.00,0.00,0.00,T5b,T5a,Xover16_14,
3 ,T5b,S,44.00,72.00,70.10,28.00,70.10,0.00,16,15,,Inner-S
3 ,15,SW,0.00,28.00,70.10,0.00,0.00,0.00,T5b,T5c,Xover15_11,
3 ,T5c,S,5.00,28.00,70.10,23.00,70.10,0.00,15,1,,
3 ,Xover16_14,S,9.38,72.00,70.10,80.00,75.00,0.00,16,14,,
3 ,Xover15_11,S,9.38,28.00,70.10,20.00,75.00,0.00,15,11,,
3 ,S12_Div,C,5.24,20.00,20.00,270.00,285.00,20.00,12,S12_Diag,,
3 ,S12_Diag,S,4.20,25.18,0.68,29.23,1.77,0.00,S12_Div,S12_Rev,,
3 ,S12_Rev,C,5.24,34.41,-17.55,105.00,90.00,20.00,S12_Diag,Siding_Mid,,
3 ,Siding_Mid,S,31.18,34.41,2.45,65.59,2.45,0.00,S12_Rev,S13_Rev,,Siding1
3 ,S13_Rev,C,5.24,65.59,-17.55,90.00,75.00,20.00,Siding_Mid,S13_Diag,,
3 ,S13_Diag,S,4.20,70.76,1.77,74.82,0.68,0.00,S13_Rev,S13_Div,,
3 ,S13_Div,C,5.24,80.00,20.00,255.00,270.00,20.00,S13_Diag,13,,
3 ,T12a,S,14.31,23.00,70.10,32.13,59.08,0.00,1,5,,XR-NW
3 ,T12b,S,9.35,32.13,59.08,38.09,51.88,0.00,5,6,,XR-NW
3 ,T12c,S,9.33,38.09,51.88,44.04,44.69,0.00,6,7,,XR-NW
3 ,T12d,S,9.34,44.04,44.69,50.00,37.50,0.00,7,T9,,XR-NW
3 ,T13a,S,33.10,23.00,4.90,44.04,30.45,0.00,2,8,,XR-SW
3 ,T13b,S,9.23,44.04,30.45,50.00,37.50,0.00,8,T14,,XR-SW


With the library saved and PicoRR.bas loaded, press F2 to run (which loads up the database manager in the user program); type "make"<Enter> and the csv files will be processed to create the fixed format roster.dat and segments.dat, as well as indexes.

Then F2 to run the user program (PicoRR), and, for instance, "3" to select layout3. At the "DISPATCH>" prompt, "?" will show you the layout.hlp document.

~
PicoRR.zip
Edited 2026-03-07 00:39 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on FOTS
 
Posted: 03:37am
08 Mar 2026
Copy link to clipboard
Grogster
Admin Group


Nice work!
 
Posted: 12:29pm
08 Mar 2026
Copy link to clipboard
mozzie
Senior Member

G'day Lizby,
A truly incredible piece of programming  

I cannot quite believe what can be achieved by some of the members of this forum with intelligent programming, MMBasic and a $5.00 micro-controller.

Regards,
Lyle.
 
Posted: 07:15pm
08 Mar 2026
Copy link to clipboard
lizby
Guru

Last night I asked Gemini to start to implement sprites instead of drawing all those boxes (and then the tracks underneath them when the cars moved)--all as an option in addition to the existing features. Car and engine sprites were just to be circles, which made placement easy. The mode was to be set/reset with !sprites.

I thought this might take some time (days?), but in a few hours, it was to the point of just needing tweaks. Speed jumped from 1-2 frames per second (which was good enough) to 6-7fps with engines E1 and E2 moving with cars. This morning, all settled and here's the video:

PicoRR with sprites

This is the script its running:
!show c,!sprites
s6+s3+s15+s11+ve1 20
at e1 Mainline-W
s7+s6-ve2 15,sv+s1+s2+s4+
at e2 Inner-E
s15-s11-s7-


Updated PicoRR V2 (Library and related files unchanged):

PicoRR V2.zip
 
Posted: 02:28am
11 Mar 2026
Copy link to clipboard
lizby
Guru

I just found Mick's PicoStick VGA (for which I ordered the PCBs from JLCPCB on July 22,  2022) put a Pico2 in it and flashed the latest, downloaded all the PicoDB and PicoRR files, and it runs with no changes.
 
Posted: 08:24am
11 Mar 2026
Copy link to clipboard
Mixtel90
Guru


A blast from the past. :)
I bet that makes a nice little unit now, it's not one that I ever built :) .

The Pico 2 is a definite upgrade. Would it be worth thinking about a VGA222 version?

EDIT:
I'm almost certain that it's possible to build it for VGA222 if you don't mind soldering 1206 resistors.  :)  I have an almost complete design now.
GP14 was spare, is now the LED data pin.
GP15/GP16 work out well for the synchs
GP17-GP22 are right for the video.
GP22 was only on an expansion port.
Edited 2026-03-11 21:00 by Mixtel90
 
Posted: 01:06pm
11 Mar 2026
Copy link to clipboard
lizby
Guru

  Mixtel90 said  a nice little unit now


Yes, indeed. It is so small it was easy for me to lose ;-/

RGB222 would be awesome with this 40-pin Pico2 with 16MB PSRAM ($5.96 each for 2 with free shipping):
RP2350A 16MB PSRAM
 
Posted: 02:23pm
11 Mar 2026
Copy link to clipboard
Mixtel90
Guru


It doesn't actually say it has PSRAM. It says 8M or 16M flash.
There's no schematic either.

The Pimoroni Pico Plus 2 should work, in theory. It costs a lot more though. It'a RP2350B based.
.
Edited 2026-03-12 00:53 by Mixtel90
 
Posted: 03:23pm
11 Mar 2026
Copy link to clipboard
lizby
Guru

Oops. Anyone see a standard-size 40-pin RP2350A board with PSRAM?
 
Posted: 06:54pm
17 Mar 2026
Copy link to clipboard
lizby
Guru

PicoRR works with Mick's GAP2V1 HDMI/DVI PCB for the WeAct RP2350B module with the Adafruit DVI Breakout module (There's now a GAP2V2 )



The PCBs from JLCPCB arrived yesterday afternoon. I soldered sockets and plugged in a working WeAct module. No joy and no voltage on the modules 3V3 pin. I PMed Mick and he said the layout was designed for the regulator, and the EN pin on the WeAct was tied to GND. I snipped off the EN pin, plugged it in, and it came alive.

I still had to supply 5V to the DVI module, so I ran a wire this morning. Voila, output to my HDMI monitor.

The Adafruit module will fit under the WeAct, but I put this one on the underside of the board. The only additional thing I want on this board is the RTC. I ran a wire, but it's not seen. I haven't traced that down yet.

I may also want to repurpose the CP2102 for an HC-06 bluetooth module.





This is a beast of a PicoMite. 15MB on drive A:, 6 megabytes of RAM/heap.
  Quote  PicoMiteHDMI MMBasic RP2350B Edition V6.02.01RC5
Copyright 2011-2026 Geoff Graham
Copyright 2016-2026 Peter Mather

Total of 6 Mbytes PSRAM available

> option list
PicoMiteHDMI MMBasic RP2350B Edition V6.02.01RC5
OPTION SYSTEM I2C GP26,GP27
OPTION FLASH SIZE 16777216
OPTION LIBRARY_FLASH_SIZE  2E000
OPTION COLOURCODE ON
OPTION KEYBOARD US
OPTION PICO OFF
OPTION RESOLUTION 640x480 @ 252000KHz
OPTION HDMI PINS  6, 4, 2, 0
OPTION PSRAM PIN GP0

> memory
Program:
 81K (44%) Program (2309 lines)
103K (56%) Free

Library:
 50K (27%) Library
134K (73%) Free

Saved Variables:
 16K (100%) Free

RAM:
  0K ( 0%) 0 Variables
  4K ( 0%) General
6370K (100%) Free
> ?mm.info(heap)
6475008
> chdir "rr"
> files
A:/rr
  <DIR>  .
  <DIR>  ..
00:59 01-01-2024      38518  l.bmp
00:04 01-01-2024        832  layout.def
00:15 01-01-2024       1895  layout.hlp
00:04 01-01-2024      88286  library.bas
00:16 01-01-2024        585  m1.scr
00:17 01-01-2024        113  m2.scr
00:18 01-01-2024       2315  native.hlp
00:07 01-01-2024        571  roster.csv
00:05 01-01-2024       1116  roster.dat
00:04 01-01-2024        720  roster_Location.ndx
00:04 01-01-2024        288  roster_Sequence.ndx
00:05 01-01-2024      88502  rr1e6.bas
00:03 01-01-2024       9787  segments.csv
00:05 01-01-2024      21285  segments.dat
00:18 01-01-2024       2315  sql.hlp
2 directories, 15 files, 14757888 bytes free
>


~
Edited 2026-03-18 04:56 by lizby
 
Posted: 09:42pm
18 Mar 2026
Copy link to clipboard
PeteCotton
Guru


Absolutely brilliant!
 
Posted: 01:13am
19 Mar 2026
Copy link to clipboard
lizby
Guru

Well, the bad with the good.

I wanted to add a new layout that I had found an image of:



I spent a little time with Gemini and a then little time with Chat trying to get them to produce the segments.csv file that I needed. They were terrible at it--I couldn't even get them to make sure that each segment was connected at both ends to another segment. (I did think that I might have been able to teach Chat to do it.)

So I produced the file by hand--not an easy task. An approximation--topologically ok.



I got it to where it would render, but trains would jump around crazily. So I realized that the original layouts (produced by Gemini through my describing them--much simpler than this one) all had their x1,y1 ends with lower x (or y if x1=x2) first. I had not done them this way by hand, and just randomly as was easiest. Each segment has a Next1 and a Next2 (and switches a Next3) indicating the segments the current one is attached to. So I went through and swapped Next1 and Next2 until they aligned with x1,y1 and x2,y2. The trains all ran fine.

Then I tried the A command (for assemble--build a connected train). And here's where the bad part began. It assumed that the segments were always drawn from the left to the right (or from upper to lower for vertical segments).

I went through several attempts yesterday to get Gemini to get it right. Today, it was a miserable 6 hours and still no success. This is the first time when I really could have done it faster myself--if I had written all the code and understood it.

I don't know where the problem lies. My feeling is that less compute is going into the answers than was the case 4-8 weeks ago. gadgetjack has speculated that AI coding is not good if you're not paying for it. My guess, and it's only a guess, is that you're not going to do as well as I had come to expect if you don't own the compute yourself--either because you're paying more than the $20 subscription, or because you have what it takes to run Claude Code locally.

I have my machine set up, but haven't started to use it. I was hoping to get this step working before making a big change to teach it what it needed to know (and to begin to teach myself what I will need to know).

So I still see the potential as huge. It just may not be as available as it first appeared to be. With so much effort going into building the models, and such explosive growth among users, I suspect that users are going to be shortchanged for some years until the availability of compute and memory increase significantly.
 


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026