A text adventure game for the CX16

DarwinNE

New Member
Sep 19, 2019
13
16
3
I should really start playing around with cc95. Is there a somewhat useful toolchain for Windows, yet? (Of course, ideally I'd love to see it running directly on the CX16.)
I could compile greg-king5's branch from the command line with standard Unix-like programming tools (e.g. Make, gcc, etc): https://github.com/greg-king5/cc65/tree/commander-x16

I think you can compile cc65 on Windows with tools such as MinGW and it should work.
 
  • Like
Reactions: Swift34

Wertyloo

Member
Sep 15, 2019
76
11
8
i think, talking anything about hw-spec.-bound of the x16 NOW is a moot point:
we need wait for the 1st STABLE hw-implementation to come out
until then you can spam with your wishlist the poor dev.s on the facebook group...! :)
 

DarwinNE

New Member
Sep 19, 2019
13
16
3
If you liked "Two Days to the Race," I have completed another game featuring Emilia Vittorini (still under beta testing):


A version for the CX16 is available too.

Today is August 27th, 1904. Nine months ago, you, Emilia Vittorini, joined the Italian Archeological Expedition in Egypt led by Ernesto Schiaparelli, the director of the Egyptian Museum of Turin. You are now back in Genova, Italy: your steam ferry arrived three days ago with 25 wooden boxes containing Queen Nefertari Meritmut's grave goods, a real treasure! They left Genova by train, heading towards Turin, yesterday evening. While they were in transit, you were invited to a sumptuous reception organised by a wealthy art lover, Eugenio Collovati, count of Raligotto, but it would be hard to say that you appreciated the evening.

But the reception was yesterday: now, you must catch the train to Turin and check that the treasure arrived safely. I will be your eyes and ears. Good luck.


I already received many feedbacks, but the game still requires some polishing, especially in the second and third part. If you want to play it and spot typos, bugs, grammar errors or strange and "non English" expressions, drop me a PM, it will be much appreciated.
 
  • Like
Reactions: x7c

Aramis

New Member
Jan 29, 2020
18
4
3
C-like languages are high-level ones, meaning as you use built-in libraryes like malloc, you would only see 1 continous memory space
its hide from you how its "memory-page-ing" under the roof
I don't think cc65 is optimized for the banks. At least not yet.

Still...
If not using peekpoke.h...
*(byte*) 0x9f61 = BankNumber;

Should clear the delay hurdle.

If one wants to make it a bit more guaranteed - since they think 8, let's make it 9-10 cycles to settle in

__asm__ ("PHA"); /* push accumulator to stack */
__asm__ ("LDA #%b", BankNo);
__asm__ ("STA #$9f61");
__asm__ ("PLA"); /* 4 ticks to restore accumulator */
__asm__ ("NOP"); /* 2 more ticks */
__asm__ ("NOP"); /* 2 more ticks */
__asm__ ("NOP"); /* 2 more ticks */

this gets you absolutely clear... but if you have other calcs to do... the NOPs are redundant
 

BruceMcF

Active Member
May 19, 2019
208
63
28
Still...
If not using peekpoke.h...
*(byte*) 0x9f61 = BankNumber;

Should clear the delay hurdle.

If one wants to make it a bit more guaranteed - since they think 8, let's make it 9-10 cycles to settle in
Who is "they" who thinks there is an 8 cycle delay? The VIA is a 14MHz part at 5v, why would it need 8 cycles at 8.33MHz for outputs written to an output latch to "settle down"? It still sounds like this is based on datasheet timings from 1MHz or 2MHz parts, as when a SuperCPU is running on the C64 bus.
 
May 22, 2019
656
312
63
Who is "they" who thinks there is an 8 cycle delay? The VIA is a 14MHz part at 5v, why would it need 8 cycles at 8.33MHz for outputs written to an output latch to "settle down"? It still sounds like this is based on datasheet timings from 1MHz or 2MHz parts, as when a SuperCPU is running on the C64 bus.
We've already had this discussion in another thread. He based his statement on old information.

The first data sheet I found said that the VIA's cycle time was 1 microsecond, but on the newer VIAs, it's really one clock cycle. (125ns at 8MHz, 500ns at 2MHz, and so on.)


However, note that these times are noted as the minimum time. I imagine that by the time you did anything else (PLA being a good example), that the lines would have settled.

So we should not need to wait after changing banks. Still, I'd probably front load the VIA writes, just in case. (Put them as early as possible in the routines I use for accessing data in another bank.)
 
Last edited:
  • Like
Reactions: Aramis

rje

Member
Nov 6, 2019
40
13
8
One goal I have is to write an RPG using a text interface, kind of like a MUD, but without the MU part. =)
H'm... it would be nice to have a single-player Tradewars 2002-like game on the CX16... hmmmmmmmmmmm
 
May 22, 2019
656
312
63
H'm... it would be nice to have a single-player Tradewars 2002-like game on the CX16... hmmmmmmmmmmm
Tradewars is a little different than what I'm thinking, but I'm also working on something like that.

One of the games I have in mind is a casual game where you fly from planet to planet selling and buying commodities and special items. Along the way, you might be attacked by pirates or stopped by system patrol.

The pirates will fight you for your cargo. If you surrender, they'll just take your cargo and go. if you put up a fight, they might destroy your ship, ending the game.

The system patrol will scan you for contraband. if you're carrying any (or if you miss a saving roll when attempting to hide your stash), they will fine you and seize your contraband.

part of the goal with this game is to make it run on a variety of systems. I want it to run on both 40 and 80 column Commodore computers (and look appropriate for that system), as well as CP/M (Altair 8800), and Tandy 100 and 200 computers.

I've got it about half done, but life has been hammering me on all sides. You'd think being stuck at home with the Coronavirus thing would give me more time to code, but it seems like the opposite is true, as I spend more time on food prep, cleaning, and helping with the church than I normally would.
 

rje

Member
Nov 6, 2019
40
13
8
Tradewars is a little different than what I'm thinking, but I'm also working on something like that.

One of the games I have in mind is a casual game where you fly from planet to planet selling and buying commodities and special items. Along the way, you might be attacked by pirates or stopped by system patrol.

The pirates will fight you for your cargo. If you surrender, they'll just take your cargo and go. if you put up a fight, they might destroy your ship, ending the game.

The system patrol will scan you for contraband. if you're carrying any (or if you miss a saving roll when attempting to hide your stash), they will fine you and seize your contraband.

part of the goal with this game is to make it run on a variety of systems. I want it to run on both 40 and 80 column Commodore computers (and look appropriate for that system), as well as CP/M (Altair 8800), and Tandy 100 and 200 computers.

I've got it about half done, but life has been hammering me on all sides. You'd think being stuck at home with the Coronavirus thing would give me more time to code, but it seems like the opposite is true, as I spend more time on food prep, cleaning, and helping with the church than I normally would.
Same here... I've got a Traveller trader game, in BASIC, "half done". You can jump from system to system, you can buy and sell cargo. It has a nifty cheapo "window" system for viewing various data... But the crew don't actually do anything, and I only barely started on the combat engine. The problem is, BASIC programs kind of crush out my energy once they reach a certain size... for me that size appears to be 24K. Good programming practices help, but the problem remains. C64List might have helped even more...

I started moving everything to C after that, but as I said, I was drained by then. Should've learned my lesson about writing in BASIC.
 
May 22, 2019
656
312
63
Yeah, you need a different kind of discipline for writing BASIC code. I have started breaking down subroutines into line number blocks, and keeping track of the numbers offline.

I also now write my code without line numbers and use a tool to generate them. That really simplifies line number management.
 
  • Like
Reactions: rje

rje

Member
Nov 6, 2019
40
13
8
Yes, subroutines with number blocks, yes. "Keeping track of the numbers offline" <-- a key element I had omitted.

I also now write my code without line numbers and use a tool to generate them. That really simplifies line number management.
C64List does that... and more. Including labels, and managing "in-line" assembly. Very helpful.