• Welcome to Dark Bit Factory & Gravity.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Wenlock

#1
Yabasic / PSP YABASIC
May 09, 2021
Hi

First time in ages, been playing with the PSP YABASIC emulator. Some programs run ok enough but some are too slow.  It does have a bug or two, anything that uses Print will crash and it doesn't handle an empty folder as selecting with no files displayed is also a crash.

Been fun though. Oh, I did try the Scrolling Shooter, looks cool but way too slow on PSP. Have to type it on PS2 some time.

Hope everyone is safe and well. 😄
#2
Oops!  He's got the same code in both videos.  Yet the games do differ.

Wenlock
#3
Just spotted on youtube : https://www.youtube.com/watch?v=HNTHgKkrVx4

Two programs, telekin and fps 1d

Edit: Looks like he's confused the gameplay and code????

Wenlock
#4
Works for me. As long as I don't have any other data and want to restore to other points.

It was the biggest annoyance in CoCo Basic, only Restore, no Restore <line number> like some other Basics.

Incidentally, if you run this on a phat PS3 you can test PS3 controllers too.

Wenlock
#5
Yup, I turned my PS2 into a test pattern generator, just press the up and down buttons on the d-pad to cycle through the patterns.

Wenlock



rem Colour Bars program.
rem By Wenlock Burton  17 July 2008
Rem Actually written on a PS3
'V2.0 rewritten on a flaky old PS2 in June 2015


label init
wi=640 : hi=512
sel=8 :rem display menu on startup
open window wi,hi


label main
repeat
setdrawbuf dd
dd=1-dd
setdispbuf dd
window origin "lb"
setrgb 0,0,0,20
setrgb 1,0,255,255

'New selection routine

'Read and update sel

     a=peek("port1")
     if a=0 hold=0

  if a>0 and hold=0 then
  if and(a,64)>0 then sel=sel+1:hold=1
  fi
  if sel>8 then sel=1
  fi
  if and(a,16)>0 then sel=sel-1:hold=1
  fi
  if sel<1 then sel=8
  fi
  fi

'Display selected test:

  if sel=1 then gosub cbar
  fi
  if sel=2 then gosub greyscale
  fi
  if sel=3 then gosub Red
  fi
  if sel=4 then gosub Green
  fi
  if sel=5 then gosub Blue
  fi
  if sel=6 then gosub White
  fi
  if sel=7 then gosub crosshatch
  fi
  if sel=8 then gosub list
  fi

until (1=2)



label Red
window origin "lb"
setrgb 0,255,0,0
clear window
return

label Green
window origin "lb"
setrgb 0,0,255,0
clear window
return

label Blue
window origin "lb"
setrgb 0,0,0,255
clear window
return

label White
window origin "lb"
setrgb 0,255,255,255
clear window
return


label cbar
window origin "lb"
rem dark blue bg
setrgb 0,0,0,40
rem cyan text, 90% intensity
setrgb 1,0,240,240
clear window

rem Draw colour bars
restore
for x=1 to 640 step 80
read r,g,b
setrgb 1,r,g,b
fill rect x,1 to x+80,512
next x


for r=220 to 224
rem circle
circle 320, 240, r
next r
rem ident
text 100, 50, "VK3YWB"
return

label crosshatch
window origin "lb"
rem dark blue bg
setrgb 0,0,0,40
setrgb 1,255,255,255
clear window
rem horiz lines
for y=1 to 512 step 29.9
line 0,y to 640,y
next y
rem vert lines
for x=0 to 639 step 29
line x,0 to x,512
next x
return

label greyscale
setrgb 0,0,0,40
rem cyan text, 90% intensity
setrgb 1,0,240,240
clear window

for x=1 to 640 step 80
b=int(x/2.4)
setrgb 1,255-b,255-b,255-b
fill rect x,1 to x+80,512
next x

rem circle
for r=220 to 224
circle 320, 240, r
next r
rem ident
text 100, 50, "VK3YWB"
return


label list

clear window
setrgb 1,255,255,255
text 240,470, "Screen Test Program"
text 210,450, "List of available patterns"
setrgb 1,255,0,255
text 20,390, "1) Colour Bars"
setrgb 1,180,180,180
text 20,360, "2) Greyscale"
setrgb 1,255,0,0
text 20,330, "3) Red Raster"
setrgb 1,0,255,0
text 20,300, "4) Green Raster"
setrgb 1,0,0,255
text 20,270, "5) Blue Raster"
setrgb 1,255,255,255
text 20,240, "6) White Raster"
setrgb 1,125,125,125
text 20,210, "7) Crosshatch"
setrgb 1,180,180,180
text 45,100, "Use the D-Pad Left and Right buttons to select patterns"
return


Rem RGB values for colour bars
data 255,255,255 : rem White
data 255,255,0   : rem Yellow
data 0,255,255   : rem Cyan
data 0,255,0     : rem Green
data 255,0,255   : rem Magenta
data 255,0,0     : rem Red
data 0,0,255     : rem Blue
data 50,50,50    : rem Black
#6
Yabasic / Controller Diagnostic
June 09, 2015
Here's a little program I wrote a few years ago to test PS2 controllers, handy for detecting stuck or dead buttons.

Wenlock



'*** PS Controller diagnostic by Wenlock Burton 2008
'
'*** Displays buttons pressed on controller 1 and 2
'
' proc_buttons takes buttons and returns names in button$

open window 640,512
setrgb 0,0,20,20
setrgb 1,0,255,255
curbuf=0
buttons=0
buttons1=0
buttons2=0
button$="                       "
button1$="                       "
button2$="                       "
cbuttons=0
fgred=25: fggreen=255: fgblue=255
cbred=105: cbgreen=105: cbblue=105

clear window
gosub disp_result
gosub flip_screen

label loop
gosub read_buttons

rem Process Controller 1 buttons
buttons=buttons1
gosub proc_buttons
button1$=button$

rem process Controller 2 buttons
buttons=buttons2
gosub proc_buttons
button2$=button$

gosub disp_result
gosub flip_screen
goto loop

label flip_screen
setdispbuf curbuf
curbuf=1-curbuf
setdrawbuf curbuf
return

label read_buttons
  cbuttons=0
  buttons1=0
  buttons2=0
label read_kbd
  cbuttons=buttons1+buttons2
  if cbuttons<1 then
    buttons1=peek("port1")
    buttons2=peek("port2")
  else goto read_kbd
  fi
return

label proc_buttons
button$=""
  if and (buttons,1)=1 then button$="Select "
  fi
  if and (buttons,2)=2 then button$=button$+"L3 "
  fi
  if and (buttons,4)=4 then button$=button$+"R3 "
  fi
  if and (buttons,8)=8 then button$=button$+"Start "
  fi
  if and (buttons,16)=16 then button$=button$+"Up "
  fi
  if and (buttons,32)=32 then button$=button$+"Right "
  fi
  if and (buttons,64)=64 then button$=button$+"Down "
  fi
  if and (buttons,128)=128 then button$=button$+"Left "
  fi
  if and (buttons,256)=256 then button$=button$+"L2 "
  fi
  if and (buttons,512)=512 then button$=button$+"R2 "
  fi
  if and (buttons,1024)=1024 then button$=button$+"L1 "
  fi
  if and (buttons,2048)=2048 then button$=button$+"R1 "
  fi
  if and (buttons,4096)=4096 then button$=button$+"Triangle "
  fi
  if and (buttons,8192)=8192 then button$=button$+"Circle "
  fi
  if and (buttons,16384)=16384 then button$=button$+"Cross "
  fi
  if and (buttons,32768)=32768 then button$=button$+"Square "
  fi
return

label disp_result
clear window
  gosub cbars
setrgb 1,fgred, fggreen, fgblue
text 86,50,"Wenlock's Playstation Controller Diagnostic"
text 100,400,"Controller 1 buttons - "+button1$
text 100,420,"Controller 2 buttons - "+button2$
buttons=0
button$=""
button1$=""
button2$=""
return

label cbars
rem White bar
setrgb 1,cbred,cbgreen,cbblue
fill rectangle 0,0 to 80,512
rem Yellow bar
setrgb 1,cbred,cbgreen,0
fill rectangle 80,0 to 160,512
rem Cyan bar
setrgb 1,0,cbgreen,cbblue
fill rectangle 160,0 to 240,512
rem Violet bar
setrgb 1,cbred,0,cbblue
fill rectangle 240,0 to 320,512
rem Green bar
setrgb 1,0,cbgreen,0
fill rectangle 320,0 to 400,512
rem Red bar
setrgb 1,cbred,0,0
fill rectangle 400,0 to 480,512
rem Blue bar
setrgb 1,0,0,cbblue
fill rectangle 480,0 to 560,512
rem Black bar
setrgb 1,0,0,0
fill rectangle 560,0 to 640,512
for r=220 to 224
  rem circle
  circle 320, 240, r
next r
setrgb 1,25,255,255
return
[/font]
#7
Yabasic / Re: Tank Zone Game
June 06, 2015
Just typed it on my old PS2.  Cool!  Think theres still a little debugging to do though. 

7 June: Debugged last night.  Cool.

Yabasic rocks

Wenlock
#8
Yabasic / Trickys old site
October 25, 2014
hi,

I found Trickykyboard's old Geocities site archived on Oocities.

There's possibly a few programs that aren't in Jim's archive there.

Calmone for instance.

http://www.oocities.org/trickykeyboard/calm.txt

Wenlock
#9
I doubt I'd do it as it only works in the emulator, got the code and WILL have a look on the emulator.

Wenlock
#10
Why can't I download the PSV file?

Oh, wait it was hiding in a ZIP file!
#11
Yabasic / More typing done
May 22, 2012
Hi, just typed three more games, still having fun but had to change my setup at bit as I got a nice 23 inch LCD monitor.

It doesn't have composite/component inputs, so I connect the PS2 to a DVD maker on the laptop, run VLC media player and move ti to the monitor, then put it in fullscreen.  I use the laptop screen to display the listing.

I might have typed all the demos, but there's still a good few games to go.

Cool!

Wenlock
#12
Cool, have to type it in.
#13
Yabasic / Re: Pool
January 01, 2012
Nice idea!

I changed bdecay to ballmov/180 instead of ballmov/90 and that looked more realistic!

Typing a few more games in, 40C tomorrow, so I'll inside with the aircon on high and type more YABASIC.

Wenlock
#14
Yabasic / Pool
December 27, 2011
Got it up and running on the PS2, a really good effort and I think it looks like there were plans to do more than was actually in the code.

The only thing I thought wasn't quite right was that the balls seem to stop a bit too quickly.

Wenlock
#15
Yabasic / Re: Freecell
October 15, 2011
Got F1 running on the PS3 now, and PS2 when I copy it to a memory card.

Now for something else.

F1 works pretty well considering the limitations of YABASIC.  Nice one.

Wenlock
#16
Yabasic / Re: Freecell
October 10, 2011
Finally got Freecell finished last night, I'm not a good player of Freecell, but I did test it out.  Seems to be all debugged.  Windiff is a big help in finding typos.

I've copied it to a PS2 memory card so I can run it on the PS2.  Must have a look at my PS2, it won't recognise CDs and only plays certain DVDs.  Loads YABASIC and Scooby Doo First Frights every time but little else.

Apparently the laser height can get a bit out, and you may be able to adjust it by shifting one of the gears a tooth or two.

Looks like it's time to try the F1 code, I captured that some time ago, so I should have it in the YABASIC folder.

Wenlock
#17
Yabasic / Re: Freecell
August 30, 2011
Ouch, sounds like it doesn't have an efficient way of handling things.  Of course we never had that sort of problem with 8 bit computers and their 64k memory maps.  Although there were a few recommendations to have the subroutines at the top of the listing so the BASIC interpreter could access them faster.

Wenlock
#18
Yabasic / Re: Freecell
August 29, 2011
This was written by Tony Ronkko (tronkko), last version was 2004.

I've seen it running on the emulator, but wanted to see it on a real PS2 (or even the PS3).

Must have been a huge project with 6000 lines of code.

Wenlock
#19
Yabasic / Freecell
August 28, 2011
Almost finished it, I'm down to the data lines and so far at point where the program parses and the progress bar gets to 20% before it runs out of data.

It's been a lot of typing, but worth it.  Though this one is several times the size of anything I ever typed on the Color Computer.

Those were the days, most of what we ran was what we typed in from magazine listings.

Wenlock
#20
Looks cool, can't wait to to get it typed on the PS3.

I've done YAPOKER and am 1/4 way through FREECELL.

YABASIC roolz!