Page 2 of 3

Posted: Fri Mar 05, 2010 12:18 pm
by orion70
Great job matsondawson! Will it work with a text adventure? :D

Posted: Fri Mar 05, 2010 3:24 pm
by matsondawson
Kweepa wrote:Anyone found working examples on the forum?

I was really hoping this would work:
http://sleepingelephant.com/ipw-web/bul ... 1&start=16
It's got a couple of {wht} type things, but that doesn't seem to be the problem...
Yup, I've been trying to get that to work, it's something to do with rnd(.) returning really small values (*10^-3). If I replace it with rnd(1) it works.

The CPU code is really old though so it's not surprising me.
If someone found me the random number generator function I could probably track down the instruction that doesn't work.

Edit: Cool!, the bug exists in my Java code too. Makes it a whole heap easier to debug.

Posted: Fri Mar 05, 2010 10:10 pm
by matsondawson
Ok, the problem wasn't with the cpu code, I think it was the initial state of the vias. RND(.) means to seed the random number generator from the clocks, and the T1 clock doesn't seem to be initialised on startup. So I've inited the clocks to something other than 0, and it works now.

I still have to fix the petsci conversion though as the javascript regexp replace functions get buggered when you exceed char code 127.

Posted: Fri Mar 05, 2010 10:12 pm
by matsondawson
orion70 wrote:Great job matsondawson! Will it work with a text adventure? :D
It should, but it may take a long time to push it into the emulator. I should really just write a Basic program to PRG converter and direct load it to ram.

Posted: Fri Mar 05, 2010 10:17 pm
by matsondawson
BTW, you may need to update your bookmark link from the site again as the original link doesn't prevent the Vic20 emulation code from being cached. Meaning you won't get updated code as I push it through.

Posted: Fri Mar 05, 2010 10:38 pm
by matsondawson
Schema wrote:Very slick!

I noticed it always puts the output in the first Code block in the thread, is this deliberate or a limitation?
It should output under whichever link you click on, unless you've already clicked on a link which will probably output in whatever you first clicked on, if it outputs at all. That's just because it's work in progress though. I'm thinking of removing inline and just having it float in-front of the code until you close it.

Posted: Sat Mar 06, 2010 4:53 am
by matsondawson
I've added a new bookmark for executing prg links in-line at http://www.mdawson.net/denial/bookmark.php

It will find any links containing a file ending in .prg and change them to execute links.

Currently only unexpanded PRGs will work, I'll work on auto detecting memory requirements tomorrow.

If it isn't working check the link is still valid, is a direct link and doesn't require memory expansion.

Posted: Sat Mar 06, 2010 3:28 pm
by matsondawson

Posted: Sat Mar 06, 2010 5:25 pm
by Kweepa
Wow, more and more awesome!
Would it be possible to change the aspect ratio to make the text more readable?

Posted: Sat Mar 06, 2010 9:46 pm
by matsondawson
Kweepa wrote:Wow, more and more awesome!
Would it be possible to change the aspect ratio to make the text more readable?
I've changed the aspect back to 1.6ish for PRGs, and made the emulator window float with a close button and joykeys checkbox.

You'll need to update your bookmark to see the changes though.

Hopefully it's the last time your bookmarks will need updating as I've moved common code out of the link now.

I need to redo the basic link at a later date.

It's kinda fun to work through Roberts prgs, http://robert.hurst-ri.us/files/ if anyone wants to try. I think only the quikman+ one doesn't work as the + sign isn't encoded in the anchor (it means space in href land).

Posted: Sat Mar 06, 2010 11:07 pm
by Kweepa
matsondawson wrote: I've changed the aspect back to 1.6ish for PRGs, and made the emulator window float with a close button and joykeys checkbox.
Super, thanks!
Do the adventures work for you? They run but produce some unpredictable output, such as repeated intro messages, "TOO DARK TO SEE", and so on.

Posted: Sun Mar 07, 2010 11:34 am
by orion70
I can't say how surprised I am, as my jaw hit the floor...

Image

Posted: Sun Mar 07, 2010 12:24 pm
by rhurst
Cool stuff ... one funny thing with joy keys enabled, when you hold the down arrow long enough, the browser window also scrolls. Perhaps it is not eating keyboard event entirely? Regardless, it's a software marvel -- many thanks!

Posted: Sun Mar 07, 2010 1:44 pm
by matsondawson
Kweepa wrote:
matsondawson wrote: I've changed the aspect back to 1.6ish for PRGs, and made the emulator window float with a close button and joykeys checkbox.
Super, thanks!
Do the adventures work for you? They run but produce some unpredictable output, such as repeated intro messages, "TOO DARK TO SEE", and so on.
Heh, I thought that it was just a crap adventure game! It might be because there a few things to do to make it run, but I haven't put a restore key in so I cant test it yet.

http://www.zimmers.net/anonftp/pub/cbm/ ... s/00README

btw: sys 64802 seems to work now.

Posted: Sun Mar 07, 2010 2:42 pm
by matsondawson
rhurst wrote:Cool stuff ... one funny thing with joy keys enabled, when you hold the down arrow long enough, the browser window also scrolls. Perhaps it is not eating keyboard event entirely? Regardless, it's a software marvel -- many thanks!
Which browser is doing that? As I am preventing keys from bubbling, and disabling default key events.