Some Programming Challenges

Started by airship, September 14, 2007, 03:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Golan Klinger

Quote from: adminThe Queen said she wants her slippers back.......
I told you about our liaison in confidence. Not cool, man. ;)
Call me Golan; my parents did.

airship

There's a reason I posted here, Golan. I would have been VERY surprised if you DIDN'T know him! :D
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

Golan Klinger

I heard back from Ken and he says that he no longer has the code and that it didn't work all that well to begin with (he didn't elaborate). So, who wants to take a crack at this? I would but I've got too many projects on the go and I'm on a new diet which precludes my having anything to do with pi. :)
Call me Golan; my parents did.

airship

I thought it was a cool idea when I came up with it independently (albeit 5 years AFTER he did!), and when I saw his post I got REALLY excited. But I lack the ML skills. I'm still struggling with adapting MicroChess for the 1541, and it's been months. :(
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

airship

Well, it'll be a bloody miracle if I ever actually get any real work done on my 1541 MicroChess project, but with winter coming up, who knows? I might get inspired. So here's the plan:

C64/1541 Parallel Computer

PHASE I
Goal: IA, C64 control program communicates with a single 1541 and displays results; IB, 1541 plays MicroChess.
   1x 1541
   1x C64
   1x C64 Control Program
   1x 1541 MicroChess Program

PHASE II
Goal: IIA, C64 control program communicates with 8x 1541s and displays results; IIB, 1541s play MicroChess against each other.
   8x 1541 Disk Drives (software address changes)
   8x IEC drive cable wiring harness

PHASE III
Goal: Same as Phase II, but all hardware stripped down and in single case.
   7x Stripped 1541 Disk Drive Controller boards (hardware modified to buss addresses 9-15)
   Custom multiple drive board power supply
   Drive board wiring harness
   Custom Case

PHASE IV
Goal: IVA, C64 control program becomes general-purpose; IVB, 1541s given expanded memory & general-purpose software capability.
   8x RAMBoard clones (8k)
   8x custom 1541 ROMs (drive mech. control code removed, Kernal-type routines added)

Essentially, by the end of it all, the 1541s would have been converted into general-purpose 6502 single-board computers with 8k of RAM and custom 8K ROMs, with a C64 acting as a general-purpose control computer.

Personally, I will consider it a major success if I even get Phase I completed in my lifetime.

Sometimes I wish I weren't so inherently lazy. :(
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

hydrophilic

I'm suprised you're still contemplating the "Chess Drives."  I'm more suprised you haven't got Phase I complete.  With MicroChess already written, I can only guess that the problem is communicating with the Commodore 64/128.  My idea would be, after loading the code into drive RAM (and running any needed set-up), to issue a M-E command for the drive to execute a turn, then M-R the result.  Take the result and M-W to a second drive and repeat withe the other drive (M-E with new data then M-R to get its result).

Of course this entails 2 drives and your Phase I only has 1 drive... if you insist on 1 drive then I think you'd need to put MicroChess in the 64/128 as well.  I'd try it in VICE with 2 drives... your call.

I haven't analysed the MicroChess program (although I have had a glance or two at it).  Anyway, my concern is that without some randomization routine, all the games would be exactly the same...

airship

QuoteI'm surprised you're still contemplating the "Chess Drives."  I'm more surprised you haven't got Phase I complete.  With MicroChess already written, I can only guess that the problem is communicating with the Commodore 64/128.

Your assumption is wrong. My problems are (1) too much sick time this past year, and (2) inherent laziness. That's why I generally promote myself as an 'idea man'.

But I'm determined to get this done. My big problem is finding enough contiguous zero page locations for MicroChess in the 1541 memory map. The drive routines use a LOT of zero page locations. I think I can make the code fit in RAM easily enough, but even that will take some squeezing.

Plus my brain keeps wandering to things like user interface and storing tables on disk. I keep trying to push them out so I can get the nuts and bolts working. It'll happen this winter or I will quit this board in utter disgrace and live the life of a hermit.

I really want to be able to demo this at a Commodore show next year, if possible. (There, I've said it in public; no turning back now!)

QuoteMy idea would be, after loading the code into drive RAM (and running any needed set-up), to issue a M-E command for the drive to execute a turn, then M-R the result.  Take the result and M-W to a second drive and repeat with the other drive (M-E with new data then M-R to get its result).

Exactly what I intend to do. But you can actually simulate this step by doing the read and write to the SAME drive. After all, it's just sitting idle waiting for a response anyway, right? :)
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

airship

#57
Re challenge #4: http://www.csbruce.com/~csbruce/cbm/transactor/v7/i2/p072.html

This article describes a ML routine, callable by SYS, that transfers the 40-column graphics screen to either the left or right side of the 80-column screen, and vice-versa.

Is there anything they DIDN'T do in the Transactor???

Edit: Like wise for #3: http://www.csbruce.com/~csbruce/cbm/transactor/v9/i1/p020.html

I swear I read all these articles once upon a time. I think I even put them into a book. Didn't I? So why don't I remember?!?  ???
Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

airship

Believe it or not, I've finally got a clean source file that assembles into an executable C64 version of MicroChess on Merlin 128. It actually plays chess. Yea!

Next is to trim it down to the bare bones. I'm going to make it put its results into three memory locations I can PEEK in immediate mode, and make it read my input from two immediate POKEs. Once that works, I can easily translate that primitive I/O scheme into M-R and M-W commands for the 1541.

Should be easy to keep this trimmed version as my C64-player code for testing and, if I want, eventual incorporation into the final version.

Turns out there's also a command to make MicroChess switch sides. I can use that to make any drive play white or black, and even queue up drives to take the next available player position of either color. But that'll be a few versions down the line.

C'mon long, snowy Iowa winter! :)

Serving up content-free posts on the Interwebs since 1983.
History of INFO Magazine

RobertB

Quote from: airship on September 04, 2008, 07:20 AM
Believe it or not, I've finally got a clean source file that assembles into an executable C64 version of MicroChess on Merlin 128. It actually plays chess. Yea!
Congratulations!  :-)

          Looking forward to the completed version,
          Robert Bernardo
          Fresno Commodore User Group
          http://videocam.net.au/fcug