Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

VIC-20: Should the compiled program be RUN'able more than once?

A topic by JavaJack created 41 days ago Views: 55 Replies: 5
Viewing posts 1 to 4

(BTW thanks for improving arrays in procs and lfsr_range in 1.3.)

VIC-20: Should the compiled program be RUN'able more than once?

I'm not sure if this is a VICE emulator thing or a Crustybasic thing.

The first load/run was initiated by drag/dropping the .prg onto the emulator window. (It's just testing my array shuffle routine.)

The second run was me just typing 'run' and hitting enter (the program does not run a second time.)

**** cbm basic v2 ****
3583 bytes free
ready.
load"ninja",8,1
searching for ninja
loading
ready.
run:
1 1 1 1 2 2 2 3 3 4 4
1 3 1 2 2 1 3 4 1 4 2
ready.
run
ready.

For what it's worth, If I LOAD the program the hard way, I can LIST it ("10 SYS4112") before I run it. After running it, I can no longer LIST it.

(2 edits) (+1)

Hey JavaJack, 

No problem, glad to fix them, anything you find I'll add to the next release for sure.  The input bug you had reported should be fixed as well (the overly repeating keystrokes).

As for running more than once, depending on the program, I noticed it will return to a prompt on the vic-20, it usually depends on what the program does. I will look into this and report back with a more definitive answer.

(+1)

I've been able to narrow down the cause, I've been a little too aggressive with the zero page and depending on what calls are made, it blows away that 1 line stub.  I've fixed it and it will be in the next release, thanks for the report! 

Just curious, were you doing PEEKs in that program by any chance?  If you can share the listing, I'd be curious (and can use it as a regression test).

I'm on my other PC at the moment, but yeah, it waits for a keypress then peeks 162 (jiffy clock) to seed the LFSR with what I hope is something random. Not sure if this is the wisest or most idiomatic approach but it seemed to work.

that seems totally fine, it was definitely a compiler optimization bug w/ PEEK, but it's fixed.   :)