Re: [M100] BASIC 10Liners

2018-03-06 Thread Gregory McGill
yeah I threw it on cloudt to try it :)

Greg

On Tue, Mar 6, 2018 at 7:31 PM, Kevin Becker  wrote:

> Was that on actual hardware?  I tried to tune it so that I could wail on
> the keys as fast as I could and didn't get off the black bar on both my
> real M102 and VirtualT set explicitly to 2.4Mhz.  Maybe it needs more
> tweaking though, lol.
>
>
>
> On Tue, Mar 6, 2018 at 9:35 PM, Gregory McGill 
> wrote:
>
>> cool.. i jumped around to the other side! :)
>>
>> Greg
>>
>>
>> On Tue, Mar 6, 2018 at 5:18 PM, John R. Hogerhuis 
>> wrote:
>>
>>>
>>> On Tue, Mar 6, 2018 at 3:43 PM Ken Pettit  wrote:
>>>

 On 3/6/18 2:19 PM, John R. Hogerhuis wrote:
 >
 > Ah. Well, CloudT dynamically inserts delays to simulate the Model T
 > processor speed. If you look at the number at the bottom of the screen
 > it should over around 2.4Mhz. But being written in Javascript and
 > running off timer event callbacks, I can't get cycle accuracy.
 >

 Ahh, that's how you are emulating the 2.4MHz speed.  I was wondering.
 What do you use to determine the number of cycles to dynamically delay?

>>>
>>>
>>> Well it’s basically on cpu cycles per instruction. There are definitely
>>> some inaccuracies beyond just the JavaScript event driven model (I don’t
>>> get to be the only code on my thread or get a guaranteed time slice).  But
>>> it ought to be close enough.
>>>
>>> The JUMP game seems to work off how fast inkey$ runs. I am guessing the
>>> issue is that CloudT does some queueing beyond what the model t provides
>>> due to some very fancy keyboard stuff going on in mobile browsers
>>> (predictive text and such). So keys batch up and allow the man run faster
>>> than he should.
>>>
>>> — John.
>>>
>>
>>
>


Re: [M100] BASIC 10Liners

2018-03-06 Thread Gregory McGill
cool.. i jumped around to the other side! :)

Greg


On Tue, Mar 6, 2018 at 5:18 PM, John R. Hogerhuis  wrote:

>
> On Tue, Mar 6, 2018 at 3:43 PM Ken Pettit  wrote:
>
>>
>> On 3/6/18 2:19 PM, John R. Hogerhuis wrote:
>> >
>> > Ah. Well, CloudT dynamically inserts delays to simulate the Model T
>> > processor speed. If you look at the number at the bottom of the screen
>> > it should over around 2.4Mhz. But being written in Javascript and
>> > running off timer event callbacks, I can't get cycle accuracy.
>> >
>>
>> Ahh, that's how you are emulating the 2.4MHz speed.  I was wondering.
>> What do you use to determine the number of cycles to dynamically delay?
>>
>
>
> Well it’s basically on cpu cycles per instruction. There are definitely
> some inaccuracies beyond just the JavaScript event driven model (I don’t
> get to be the only code on my thread or get a guaranteed time slice).  But
> it ought to be close enough.
>
> The JUMP game seems to work off how fast inkey$ runs. I am guessing the
> issue is that CloudT does some queueing beyond what the model t provides
> due to some very fancy keyboard stuff going on in mobile browsers
> (predictive text and such). So keys batch up and allow the man run faster
> than he should.
>
> — John.
>


Re: [M100] BASIC 10Liners

2018-03-06 Thread John R. Hogerhuis
On Tue, Mar 6, 2018 at 3:43 PM Ken Pettit  wrote:

>
> On 3/6/18 2:19 PM, John R. Hogerhuis wrote:
> >
> > Ah. Well, CloudT dynamically inserts delays to simulate the Model T
> > processor speed. If you look at the number at the bottom of the screen
> > it should over around 2.4Mhz. But being written in Javascript and
> > running off timer event callbacks, I can't get cycle accuracy.
> >
>
> Ahh, that's how you are emulating the 2.4MHz speed.  I was wondering.
> What do you use to determine the number of cycles to dynamically delay?
>


Well it’s basically on cpu cycles per instruction. There are definitely
some inaccuracies beyond just the JavaScript event driven model (I don’t
get to be the only code on my thread or get a guaranteed time slice).  But
it ought to be close enough.

The JUMP game seems to work off how fast inkey$ runs. I am guessing the
issue is that CloudT does some queueing beyond what the model t provides
due to some very fancy keyboard stuff going on in mobile browsers
(predictive text and such). So keys batch up and allow the man run faster
than he should.

— John.


Re: [M100] BASIC 10Liners

2018-03-06 Thread Ken Pettit


On 3/6/18 2:19 PM, John R. Hogerhuis wrote:


Ah. Well, CloudT dynamically inserts delays to simulate the Model T 
processor speed. If you look at the number at the bottom of the screen 
it should over around 2.4Mhz. But being written in Javascript and 
running off timer event callbacks, I can't get cycle accuracy.




Ahh, that's how you are emulating the 2.4MHz speed.  I was wondering.  
What do you use to determine the number of cycles to dynamically delay?


VirtualT works a bit differently.  It has two threads running:

1  Thread T (throttle) wakes up every 20ms (10ms for Windows) and 
calculates the number of emulated CPU cycles the emulation thread is 
allowed to execute.  This number will vary dynamically depending on the 
number of FLTK window updates during the previous 20/10ms period.  It 
then wakes up thread E and goes to sleep.


2.  Thread E (emulate) wakes up and executes the number of allowed CPU 
cycles for this timer period as calculated by Thread T then goes back to 
sleep.  So the throttled emulation (2.4MHz, 8Mhz, 20Mhz) modes actually 
execute 8085 code in short bursts every 10/20ms.


Ken




Re: [M100] BASIC 10Liners

2018-03-06 Thread John R. Hogerhuis
On Tue, Mar 6, 2018 at 3:12 PM, Kevin Becker  wrote:

> I only tried it in Safari but I can give it a go in Firefox and Chrome
> too.
>
>
Well I think I see the same behavior you're describing. I'm guessing it's
queuing keystrokes, not a Mhz issue.

-- John.


Re: [M100] BASIC 10Liners

2018-03-06 Thread Kevin Becker
I only tried it in Safari but I can give it a go in Firefox and Chrome too.

On Mar 6, 2018, at 5:19 PM, John R. Hogerhuis  wrote:



On Tue, Mar 6, 2018 at 1:06 PM, Kevin Becker  wrote:

> I just tried it again and I can easily run so fast that the player loops
> around the screen.  I suppose I could try to compensate for that in the
> code but I only have 10 lines. =)
>
>>
>>>

Ah. Well, CloudT dynamically inserts delays to simulate the Model T
processor speed. If you look at the number at the bottom of the screen it
should over around 2.4Mhz. But being written in Javascript and running off
timer event callbacks, I can't get cycle accuracy.

It may actually have nothing to do with cpu cycles but instead keyboard
emulation.

What browser are you using?

-- John.


Re: [M100] BASIC 10Liners

2018-03-06 Thread John R. Hogerhuis
On Tue, Mar 6, 2018 at 1:06 PM, Kevin Becker  wrote:

> I just tried it again and I can easily run so fast that the player loops
> around the screen.  I suppose I could try to compensate for that in the
> code but I only have 10 lines. =)
>
>>
>>>

Ah. Well, CloudT dynamically inserts delays to simulate the Model T
processor speed. If you look at the number at the bottom of the screen it
should over around 2.4Mhz. But being written in Javascript and running off
timer event callbacks, I can't get cycle accuracy.

It may actually have nothing to do with cpu cycles but instead keyboard
emulation.

What browser are you using?

-- John.


Re: [M100] BASIC 10Liners

2018-03-06 Thread Jim Anderson
> -Original Message-
> 
> I must have missed the email.  New member creation must be approved,
> otherwise we would have 321 users with names like joe.joe@joe.com
> posting all manner of things into the library.
> 
> I need to login to the Lizardhill maintenance page and switch back to
> PHP 5 for now.  My Safari browser isn't even pulling up the Personal
> Libraries page at all right now.

No rush - I don't have any masterpieces to upload :)

I think I submitted a request through a form on the website, but I could be 
mis-remembering.







jim


Re: [M100] BASIC 10Liners

2018-03-06 Thread Ken Pettit

Hi Jim,

I must have missed the email.  New member creation must be approved, 
otherwise we would have 321 users with names like joe.joe@joe.com 
posting all manner of things into the library.


I need to login to the Lizardhill maintenance page and switch back to 
PHP 5 for now.  My Safari browser isn't even pulling up the Personal 
Libraries page at all right now.


Ken

On 3/6/18 1:51 PM, Jim Anderson wrote:

-Original Message-
I created a member library at Club100 but

How did you do that?  I put in a request to have a member library months ago, 
and nothing ever happened (I only just remembered now when I read this).







 jim




Re: [M100] BASIC 10Liners

2018-03-06 Thread Jim Anderson
> -Original Message-
> I created a member library at Club100 but

How did you do that?  I put in a request to have a member library months ago, 
and nothing ever happened (I only just remembered now when I read this).







jim


Re: [M100] BASIC 10Liners

2018-03-06 Thread Kevin Becker
I just tried it again and I can easily run so fast that the player loops
around the screen.  I suppose I could try to compensate for that in the
code but I only have 10 lines. =)


On Tue, Mar 6, 2018 at 4:02 PM, Kevin Becker  wrote:

> That was my original plan but when I was testing in in CloudT the timing
> was way off.  The code increments a counter while looping for key presses
> to determine how fast you are running so it's pretty sensitive to differing
> clock speeds. I tuned it on my real Model 102 and VirtualT locked to 2.4MHz
> gives similar results but CloudT was running either too fast or too slow, I
> can't remember which now.
>
> On Tue, Mar 6, 2018 at 3:56 PM, John R. Hogerhuis 
> wrote:
>
>> You could try it like this
>>
>> Browse Chrome or Safari to
>>
>> http://bitchin100.com/CloudT
>>
>>
>> Open another tab to
>>
>> https://github.com/ksbex/basic-longjump/raw/master/JUMP.BA
>>
>> This should download the JUMP.BA file
>>
>> In the CloudT tab, select Choose File
>>
>> Navigate to your Downloads directory and pick JUMP.BA
>>
>> Notice at the bottom of your CloudT window that "JUMP.BA" is now on your
>> Cassette file queue
>>
>> Enter BASIC
>>
>> Type CLOAD
>>
>> Type SAVE"JUMP"
>>
>> Type RUN
>>
>>
>


Re: [M100] BASIC 10Liners

2018-03-06 Thread Kevin Becker
That was my original plan but when I was testing in in CloudT the timing
was way off.  The code increments a counter while looping for key presses
to determine how fast you are running so it's pretty sensitive to differing
clock speeds. I tuned it on my real Model 102 and VirtualT locked to 2.4MHz
gives similar results but CloudT was running either too fast or too slow, I
can't remember which now.

On Tue, Mar 6, 2018 at 3:56 PM, John R. Hogerhuis  wrote:

> You could try it like this
>
> Browse Chrome or Safari to
>
> http://bitchin100.com/CloudT
>
>
> Open another tab to
>
> https://github.com/ksbex/basic-longjump/raw/master/JUMP.BA
>
> This should download the JUMP.BA file
>
> In the CloudT tab, select Choose File
>
> Navigate to your Downloads directory and pick JUMP.BA
>
> Notice at the bottom of your CloudT window that "JUMP.BA" is now on your
> Cassette file queue
>
> Enter BASIC
>
> Type CLOAD
>
> Type SAVE"JUMP"
>
> Type RUN
>
>


Re: [M100] BASIC 10Liners

2018-03-06 Thread John R. Hogerhuis
You could try it like this

Browse Chrome or Safari to

http://bitchin100.com/CloudT


Open another tab to

https://github.com/ksbex/basic-longjump/raw/master/JUMP.BA

This should download the JUMP.BA file

In the CloudT tab, select Choose File

Navigate to your Downloads directory and pick JUMP.BA

Notice at the bottom of your CloudT window that "JUMP.BA" is now on your
Cassette file queue

Enter BASIC

Type CLOAD

Type SAVE"JUMP"

Type RUN


Re: [M100] BASIC 10Liners

2018-03-06 Thread Gregory McGill
looks great Kevin!

I'll have to set up the 100 and try it out :)

On Tue, Mar 6, 2018 at 11:47 AM, Kevin Becker  wrote:

> I finished my game a while ago but finally got around to writing up the
> readme for my submission.  I created a member library at Club100 but I'll
> wait until the hosting issues are resolved before uploading it there.  In
> the meantime I put it on Github if anyone is interested.
>
> https://github.com/ksbex/basic-longjump
>
> My original plan was for a very minimal text adventure but I couldn't make
> it fit. So instead I recreated a game I had written for my TRS-80 PC-3 that
> we would pass around in math class.  The teacher must've been suspicious
> about us pounding away on this weird looking calculator but never said
> anything.
>
>
>
>
>