|
Post by Pinacolada on Jan 18, 2007 15:34:35 GMT -5
I thought maybe someone might be interested in a project I've been working on for the last, oh, 12 years or so. Yes, I'm a very lazy on-and-off programmer. It's a text adventure with the future capability to add to the game, like Multi-User Dungeons on the Internet, but (for now) it'll be a single-player game, such as on a bulletin board system. Later on I'd like to add the capability of transferring modules/areas people create between people, but that's a pie in the sky idea at this point. Dracosilv of #c64friends set up a Yahoo group a couple years ago, and you can find it here: tech.groups.yahoo.com/group/TLOS_TADA/I don't have time right now to go into an exposition of the game, but it's packed away in the "tada-files-6-9-2006.zip" file in the Files section, if you join the group, or have any interest in this. I am working on a rather large update, but will have to shrink it down to fit within the 10 MB limit file upload at this point (basically gzipping the .d64 images, or doing away with disk images and just have each separate file in a directory in *.prg or *.seq format, depending on how you prefer to access them). Anyway, it's sort of a pet project of mine, and some folks have been looking at it and playing with the various modules I've programmed... tell me what you think, either in this thread or on the group.
|
|
|
Post by Robin Harbron on Jan 27, 2007 19:50:08 GMT -5
Hi Ryan, I'm interested in any C-64 game project, but you haven't made it easy to try it out I joined the group, and then dug around in the file, but didn't find anything to actually play with... did I miss something? I'd recommend putting together a single .d64 demo on a publically accessible web-site so more people will check out what you're up to. It looks like you've done an impressive amount of work, that's for sure!
|
|
|
Post by Pinacolada on Jan 29, 2007 16:22:23 GMT -5
Hiya Robin. I seem to recall I showed you some of these files eons ago. Yeah. I'm thinking this was just a plain old bad idea, right now at least. 1) You have to sign up to Yahoo Groups. 2) There's no "cohesiveness" to the project yet, this is very very pre-alpha. Always has been. 3) No "complete" documentation that makes sense to anyone but me, although I'm working on it. 4) No possibility yet of running just a single file and having it work together with any of the other modules yet, other than running individual programs (whose level of completeness and bug-free-ness is not apparent from the filename, except maybe the so-called 'version number' I've tacked on the end) So, all in all, might be just a big waste of time. Between school and work and stuff, I'll try to work on the documentation more. I did make rather large strides in the past week -- so it seemed to me -- but there's much to be done yet. I'll try to make a note to myself insofar as which modules you can actually RUN, and expect to get some meaningful information out of them. (For example, first you would have to run the player log creator -- which version? which disk image? Then you can run the new player creation module. Which is the most recent version here? Then how do you get to the adventuring part? Not that there's much there yet either -- you have to generate the map file, and there's bugs in the routines which display the room description text, etc. etc.) Fighting? Forget it. Not written yet, for the most part. The "kernel" doesn't even load in other modules yet. They're all stand-alone so far. So from an end-user perspective, the whole thing just sucks rocks so far. Sorry. :/ Maybe time would be better spent making the modules link to one another and reduce the "stand-alone-ness"... even if it's just a "This module is not implemented yet." message. But thanks for joining the group, and I'll try to come up with better/more documentation/general info as time permits. Yeah, it is a heck of a lot of work and it's been a long road, and some days I just wonder if anyone will even bother to play except me. Oh yeah. Regarding free web space... er, I guess I'll have to poke around for some. GeoCities isn't free anymore, apparently. *sigh* Nope, I'm just stupid. Got a web site there: www.geocities.com/sym_rsherwoodI'll slap together a web page and add a redirect in the group sometime this week(...end), if I can.
|
|
|
Post by Pinacolada on May 21, 2007 15:33:48 GMT -5
Well, some progress has been made: the module loader works! I'm currently trying to relocate code (or will try, later) but right now having fun (?) disassembling code and trying to get a feel for how it works, what workspace it uses, and where it might fit. That way I'll have the following: - the module loader
- an "input from disk file" routine
- and my INSTRing routine (which is slightly buggy, source code below for any ideas?)
all in memory in one nice chunk. The problem with the INSTRing code is this: it returns the position of a one-character match perfectly, in the integer variable I% (which must be pre-defined in BASIC first). But with multiple character matches, it returns the last position of where the string was matched. So it's like there's an INC going on where there shouldn't. I've stared at it til my eyes are bugging out. I apologize for all the silliness in the code, it was my feeble attempt at having some idea where the code was going without doing a step-through (which, again, since I'm such a n00b maybe I ought to)... I've used TurboAssembler to write this. .org $c000
; transfer string to ml ; sys49152,"source","search" ; returns i% (must be predefined) ; where "search" found in "source" ; mostly by pinacolada
jsr chkcom jsr frmeval jsr frestr
; store length/address of 1st string
sta srcstrlen ;this sty srcstraddr ;all stx srcstraddr+1 ;works
; 256*y+x=string address
jsr chkcom jsr frmeval jsr frestr
; 2nd string
sta matchstrlen sty matchstraddr stx matchstraddr+1
jmp init ; print string about it
lda #<s_source ;string_source ldy #>s_source jsr strout lda #<s_stringlen ; string_stringlen ldy #>s_stringlen jsr strout
lda #0 ldx srcstrlen jsr linprt ; print value
jsr printcr
lda #<s_source ldy #>s_source jsr strout lda #<s_stringaddr ldy #>s_stringaddr jsr strout
lda srcstraddr ldx srcstraddr+1 jsr linprt
jsr printcr
lda #<s_match ldy #>s_match jsr strout lda #<s_stringlen ldy #>s_stringlen jsr strout
lda #0 ldx matchstrlen jsr linprt
jsr printcr
lda #<s_match ldy #>s_match jsr strout lda #<s_stringaddr ldy #>s_stringaddr jsr strout
lda matchstraddr ldx matchstraddr+1 jsr linprt
jsr nextstage jsr printstage jsr printcr
init: ldy #$00 sty matchbuf sty matchcount sty srcoffset sty matchoffset lda srcstraddr sta $fc lda srcstraddr+1 sta $fb lda matchstraddr sta $fe lda matchstraddr+1 sta $fd jmp firstchar jsr printcr lda #"0" sta stage jsr printstage;stored addresses
jsr nextstage jsr printstage firstchar: jsr get_match_char bcs nomatch jmp get_next_source_char
get_match_char: clc;flag for end of string ldy matchoffset cpy matchstrlen bne get_match_char2 sec rts
get_match_char2: lda ($fd),y sta matchbuf inc matchoffset ;got match char rts
get_next_source_char: ldy srcoffset cpy srcstrlen;gone past end? beq nomatch lda ($fb),y;load source char cmp matchbuf beq match_made ;match not made between ;matchbuf and srcoffset... inc srcoffset jmp get_next_source_char ;try again
match_made: ;jsr nextstage ; jsr printstage
match_made_2: ;matchbuf=srcoffset inc matchcount lda matchcount cmp matchstrlen ;end of match string? beq perfect
jsr get_match_char ;jmp get_next_source_char
inc matchoffset ldy matchoffset cpy matchstrlen beq perfect ; now add matchcount+matchoffset so we ; don't end up with i% being past ; point of match tya clc adc matchcount lda ($fd),y cmp matchbuf beq match_made_2 ; jmp notyet2
notyet: ldy #$00 sty matchoffset sty matchcount
notyet2: inc srcoffset ldy srcoffset cpy srcstrlen bne get_next_source_char
nomatch: lda #$00 sta $fb jmp perfect2
perfect: lda #$00 sta $fb inc srcoffset ; move into range of 1-n lda srcoffset ; -matchcount for 1st char found perfect2: sta $fc
intvar: ; thanks to jim radiks & steve bell ; for this routine lda $2d sta $bb lda $2e sta $bc
str1: ldy #$00 lda ($bb),y cmp #$c9;i + bit 7 set=integer bne str2 iny lda ($bb),y cmp #$80;bit 7 set=integer beq str3
str2: clc lda $bb adc #$07 sta $bb lda $bc adc #$00 sta $bc jmp str1
str3: iny lda $fb sta ($bb),y iny lda $fc sta ($bb),y rts
printcr: lda #$0d jmp $ffd2
printstage: lda stage jmp $ffd2
nextstage: inc stage rts
; variables
srcstrlen: .byte 0 srcstraddr: .byte 0,0 matchstrlen: .byte 0 matchstraddr: .byte 0,0 stage: .byte "0"
srcoffset: .byte 0 matchoffset: .byte 0 matchbuf: .byte 0 matchcount: .byte 0
;constants
s_source:.byte "source \0" s_match:.byte "match \0"
s_stringaddr:.byte "string address is: \0" s_stringlen: .byte "string length is: \0"
chrget =$73 ;115 strout =$ab1e frmeval=$ad9e ;44446 chkcom =$aefd ;44797 ptrget =$b08b ;45195 frestr =$b6a3 ;46755 linprt =$bdcd ;48589 chrout =$ffd2
Example of use: 5 m$="M.GORGON|++#*" 10 sys 49152,m$,"|" 20 if i%=0 then print "no monster attributes":end 30 print "monster attributes:"mid$(m$,i%+1) (The stuff after the pipe is a list of attributes monsters have. No pipe, no attributes. Hopefully it's somewhat explanatory.) Ummm, maaaaybe I'll have a workable "package" by the end of the week. Basically, load "t.main" and it reserves memory for the module loading process, loads "t.startup" which searches through the player log for PINACOLADA, then loads that character's stats. You could load up "tep" (tada.editor.player) to have a look at the stats, and change the name. The game is supposed to load the new player module, but it's too large at present (need to move some of the text displayed by the program to external files to cut down on space), but it'll happen, slowly. I've got sort of an indexed REL file happening with room descriptions, that'll be applied towards the chunks of text, too. Anyway... yay.
|
|
|
Post by nikoniko on May 21, 2007 22:29:29 GMT -5
Seems overly complex for what you're trying to do, if I'm understanding your purpose correctly. I posted an alternate INSTR routine over at your thread on Commodore 128 Alive. The listing's not pretty, but I think the routine itself should get the job done with a minimum of hassle.
|
|
|
Post by Pinacolada on May 22, 2007 12:36:03 GMT -5
Thanks again, nikoniko I will have a look at that. The code isn't so bad, let's see if this ML beginner can understand it with your comments, that's the test
|
|
|
Post by Pinacolada on May 30, 2007 12:07:30 GMT -5
Okay, I got the shorter code typed in. I discovered that I needed to prefix some of the labels with #, otherwise it was storing the contents of the wrong memory addresses. I also discovered you've got to use zero-page locations for LDA (MAIN),Y type opcodes (indirect indexed, I guess it's called?). Had to make slight alterations to label names to accomodate TurboAssembler. I need to read my copy of Machine Language for Beginners more closely... but I do have it working now, with hard-coded MAIN and KEY values! I'll post the source later. Next step: to integrate the MAIN and KEY strings into the SYS call itself. Got the core of it in my previous code.
|
|
|
Post by Pinacolada on May 31, 2007 15:26:47 GMT -5
;"instring.s" *= $2000 2000 4c 14 20 jmp s1 ; constants main = $fb key = $fd strout = $ab1e
; variables 2003 54 48 49 53 20 49 53 20 41 20 54 45 53 54 mainstring .text "this is a test" mainlength = *-mainstring
2011 20 49 53 keystring .text " is" keylength = *-keystring
;begin
2014 a9 03 s1 lda #<mainstring 2016 85 fb sta main 2018 a9 20 lda #>mainstring 201a 85 fc sta main+1
201c a9 11 lda #<keystring 201e 85 fd sta key 2020 a9 20 lda #>keystring 2022 85 fe sta key+1
2024 a2 00 ldx #0
2026 a9 0e s2 lda #mainlength 2028 c9 03 cmp #keylength 202a 90 1c bcc s8 ;bcs was bcc 202c a0 00 ldy #0 202e b1 fd s3 lda (key),y 2030 d1 fb cmp (main),y 2032 d0 09 bne s6 2034 c8 iny 2035 c0 03 cpy #keylength 2037 90 f5 bcc s3 2039 e8 inx 203a 4c 4a 20 jmp store 203d e6 fb s6 inc main 203f d0 02 bne s7 2041 e6 fc inc main+1 2043 e8 s7 inx 2044 c6 0e dec mainlength 2046 d0 de bne s2 2048 a2 00 s8 ldx #0
204a 86 fb store stx $fb 204c 60 done rts
|
|
|
Post by Pinacolada on Jun 12, 2007 12:30:47 GMT -5
Well, yay! I got everything relocated and working... so now I have a chunk of code working at $C000 which handles the instring function, the module loading, and the disk input. So I'm happy.
Working with Peter Schepers' 64COPY too, fiddling around with subdirectories/partitions on .D81 images. Managed to find a bug in that when you create a partition, the header block is filled with $00 instead of $A0... I'll email him about that at some point.
Got a working monster list file, with a few flags from the original game which I don't understand, I'll figure 'em out someday.
Working on finishing the player log editor... closing on 80 blocks. o.o
|
|
|
Post by Pinacolada on Jun 27, 2007 11:44:04 GMT -5
|
|
|
Post by Robin Harbron on Jun 27, 2007 15:50:01 GMT -5
Looks interesting and complicated so far What should I do? I wandered around a bit
|
|
|
Post by Pinacolada on Jul 2, 2007 11:44:44 GMT -5
Mostly just peek at different programs. You can edit stats with the latest-numbered version of "tep" (73? I miss being able to just peek inside disk images at will while in school) on module-workdisk.d81.
That might be a good idea actually; keep a running tally of which file is the latest, on which disk image...
Over the weekend I put some more work into the file structure, and plan to put more actual documentation in each directory. Also put a lot of work into creating a map of the actual level 1 that came with The Land of Spur, which you can walk around in. There's actually two different data formats (the second I devised for the "single player MUD" option, after you finish the main game and want to add to the game), but I'll stick with the first version for levels 1-6.
Room descriptions need to be converted over from the Apple files.
Marvel at the changelog! Heh.
You can look at room descriptions for now, toggle a few options on and off... get a help menu... things are slowly, slowly coming together.
Yeah, there's a lot to the conversion process, figuring out what the variables all mean in the original game (something else I'm working on) and converting it to the way I do things in TADA; I didn't have any documentation for a long time and was just going off my rusty memory and a few text captures. Now that I have the source code of "The Land of Spur" things are making sense, bit by bit.
Maybe that'd be a good project: list things people can do with this archive...
What all did you look at? What can I do to make things more clear? What questions do you have? I'm too close to the subject, I think. Things which are obvious to me aren't going to be to someone who hasn't seen this stuff before.
|
|
|
Post by Pinacolada on Jul 18, 2007 13:50:23 GMT -5
Okay. nikoniko provided some web space, and I've been trying to document things a bit better. New address: furthervoyages.com/pc/Check out the file "latest files.txt" in the archive. ~ Pina
|
|