[Coco] Trivia Fever
Bill Pierce
ooogalapasooo at aol.com
Mon Feb 24 02:00:44 EST 2014
Robert,
I would think if ccio has changed any through the years (most likely) then the addresses for the offsets used would need to be changed to match or find the "symbol" used for that offset value in the old os9defs and reassemble it with the newer os9defs using the symbols to get proper offsets in vtio. If it hasn't changed, then it should work.
It would be one of the only modules that hasn't been changed.... :-)
Also, if you're trying to run it in Vcc, level 1 will not run in Vcc. The keyboard gives no response for some reason in both L1v1 & L1v2. L1v2 will run on a real Coco 3 though.
The changing of the time could be a security check. That could have easily been done from the basic09 code had they not wanted to hide it. Maybe "Trivia" checks for that time then resets the clock again or fails if not found (??). Just a thought.
As for the "TRIVIA #40", isn't that just running it with 40k of memory? I can't remember if Basic09 requires the K as in #40k or would #40 be 40 - 256 byte pages? It's been a long time since I ran Basic09 for anything.
I got the same disassembly you got, I was just counting the wrong number of bytes in the offsets.
Bill Pierce
"Today is a good day... I woke up" - Ritchie Havens
My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Webmaster of The TRS-80 Color Computer Archive
http://www.colorcomputerarchive.com/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
E-Mail: ooogalapasooo at aol.com
-----Original Message-----
From: Robert Gault <robert.gault at att.net>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Sun, Feb 23, 2014 10:06 pm
Subject: Re: [Coco] Trivia Fever
Bill Pierce wrote:
>
> Rogelio,
> I just disassembled the "kbdhack" module and it links to CCIO, patches a few
bytes after saving the original values. Then it seems to set the clock with a
value of zero. Seeding the timer maybe?
> It would take a disassembly of L1V2 CCIO to tell what is being patched. I'm
pretty sure the v1 & v2 CCIOs are slightly different hence the failure. The
"kbdhack" seems to be the only mod.
> Of course I'm working from the disk images from the archive, so I don't know
how "accurate" they are as far as duplicating any possible "copy protection"
that may be on the original disks.
> What seems to be going on (from an old diassembly of L1 CCIO from the repo)
"kbdhack" if setting up a new IRQ and then resetting the time via F$STIME. So it
makes me wonder if the whole patch involves setting up the game timer using the
system clock.
> There's another patch section at the end of the listing but it's never called
and I'm wondering if this is the reverse code for resetting the patch after you
exit the game to return OS9 to normal, hence the "saving" of the original values
before patching. The IRQ patch may point to this routine so it runs on exit(??).
The address of this section is part of the patch.
>
> All-in-all, the whole thing is really small and just a few lines of code, so
it's not making any "major" changes.
> If this is all that's being done, there should be a way to modify it to work
on L1V2. It would take good disassemblies of both L1V1 & L1V2 CCIOs to adjust
the xx,y values being altered to point to the proper place. The original source
probably would have assembled properly for either version given the proper
OS9DEFS file as the source most likely referred to the symbols in the defs for
the patching if written properly
>
>
> Bill Pierce
Bill,
Here is my disassembly of kbdhack. Slightly different interpretation from yours.
Since we F$Link to CCIO it won't matter which version is present. In fact, we
could link to VTIO by changing L004B and kbdhack would still work.
Unfortunately Trivia is a packed Basic09 module so there is no way to tell what,
if anything, #40 is supposed to do. It is not the correct way to send parameters
to a B09 program.
Robert
nam KbdHack
ttl program module
* Disassembled 2014/02/22 16:06:46 by Disasm v1.5 (C) 1988 by RML
ifp1
use /dd/defs/defsfile
endc
tylg set Prgrm+Objct
atrv set ReEnt+rev
rev set $01
mod eom,name,tylg,atrv,start,size
u0000 rmb 1
u0001 rmb 275
size equ .
name equ *
fcs /KbdHack/
start equ *
leax >L004B,pcr CCIO not in Level2
* regA= type/language
lda #$E1
os9 F$Link
* regY=module entry point
lda $03,y copy lbra READ for CCIO
ldx $04,y
sta >L0064,pcr save the lbra READ from CCIO
stx >L0065,pcr
sty >L0062,pcr save CCIO entry address
leax >L0055,pcr message = TRIVIA #40
stx >L0060,pcr set pointer for message
leax >L0067,pcr address of kbdhack routine
lda #$7E jmp
sta $03,y make CCIO jmp to L0067 on a read
stx $04,y
leax >L004F,pcr date/time data
os9 F$STime start the clock
clrb
os9 F$Exit
L004B fcs /CCIO/
* 1984, Jan, 1, 1:00AM
L004F fcb $54,1,1,1,0
L0055 fcc /TRIVIA #40/
fcb $0D
L0060 rmb 2 pointer in TRIVIA #40 message
L0062 rmb 2 CCIO entry address
L0064 rmb 3 storage of original lbra READ in CCIO
* lbra READ in CCIO
* will now vector below
L0067 ldx >L0060,pcr get message pointer
lda ,x get character in message
leax $01,x update pointer
stx >L0060,pcr save pointer
cmpa #$0D end of message
bne L008C return to CCIO if not finished
pshs y,x,b,a save registers
ldy >L0062,pcr restore CCIO
lda >L0064,pcr
ldx >L0065,pcr
sta $03,y
stx $04,y
puls y,x,b,a recover registers
L008C clrb exit to CCIO
rts
emod
eom equ *
end
--
Coco mailing list
Coco at maltedmedia.com
http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list