Enjoy programming more!
Kidspod is a post site which supports young programmers.
First step to join us.
Register as a member
For members

2025/06/09 05:07:08

MixJuice GET URL : kidspod.club/mj/2237

Files browser for model P

With the new model, we now have access to 100 save positions natively, but it quickly becomes overwhelming. I made a simple file browser to get on save 0, so while booting and holding BTN1 you can get in directly.

How it works:
-Left and Right will change pages, allowing you to navigate in increments of 20 saves toward the top.
-Up and Down allow you to choose a specific save state within a page.
-To load and run your selection, press Space.

Improvements for future versions:
-Implement a better way to control btn() refresh rate for smoother page transitions.
-Add functions for copying and deleting files.
-Add a key combo option to list and load a save instead of running it immediately.

  • 1
  • 2
  • 1
  • 2

SOURCE CODE

10 'FILES BROWSER
20 CLV:N=1:Y=2
30 BEEP:CLS:LC0,1:FILES N,N+19
40 LC0,0:?"욘욑FILES욑BROWSER욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑욙";
50 LC0,21:?"욚욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑욑VER욑1.0욑욑욛";
60 FOR J=1TO20:LC0,J:?"욒 ";:LC31,J:?"욒";:NEXT
70 IF BTN(LEFT) AND N>1 IFBTN(LEFT)=0 N=N-20:GOTO30 ELSE GOTO70
80 IF BTN(RIGHT) AND N<81 IF BTN(RIGHT)=0N=N+20:GOTO30 ELSE GOTO80
90 IF BTN(UP)ANDY>1 Y=Y-1
100 IFBTN(DOWN)ANDY<20 Y=Y+1
110 LC1,Y:?"잡";:WAIT6
120 LC24,0:?"욑욑욑";:LC24,0:?N+Y-1;
130 IF BTN(SPACE) AND N+Y-1<100 CLS:LRUN N+Y-1
200 GOTO 60

COMMENT