Core Wars - has anyone got this type-in?

Looking for a Dragon or CoCo game not already in the archive - Then request it here and hopefully it will either be uploaded to the archive or another member can upload it to this forum.
Post Reply
devo
Posts: 30
Joined: Mon May 13, 2013 10:19 am
Location: Canberra, Australia

Core Wars - has anyone got this type-in?

Post by devo »

Hi, Dragon User Magazine #41 carried an article on Core Wars. There is a Basic programme and a Hex listing. Does anyone have these as cas/asc/bin?
See https://archive.org/stream/dragon-user- ... 5/mode/1up
Thanks
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: Core Wars - has anyone got this type-in?

Post by snarkhunter »

Hello,

You should be able to find all of this within the content of attached ".vdk" (zipped). Including the source for Diskdream, but I cannot remember which file it is. The sample "CW" programs from the article are also included (i.e. Imp, Dwarf, Gemini & Capturer).

Hope it helps. Unfortunately, there's also plenty of Corewars-related "work in progress" stuff on the same disk. Sorry. But basically, what you want should be the following:
COREWARS.BAS
CORECODE.BIN
The four ".DAT" program compiled data
DISKDREAM in order to "load" the latter into memory and make them available to the "fight engine".

Kind regards,
Lionel
Attachments
OTHER03B.zip
Disk containing "Corewars" (from Dragon User)
(40.36 KiB) Downloaded 360 times
devo
Posts: 30
Joined: Mon May 13, 2013 10:19 am
Location: Canberra, Australia

Re: Core Wars - has anyone got this type-in?

Post by devo »

Thank you very much for these, you've saved me a lot of typing. Looking forward to trying them out. :)
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: Core Wars - has anyone got this type-in?

Post by snarkhunter »

... You're most welcome!
But fact is: I cannot remember how the whole thing is supposed to work any longer...

I believe the ".DAT" files might be just "text" files containing the instructions for each of the concerned programs, meant to be loaded within the main "CW" engine, then "compiled" from there.

I believe I may have done some "tweaking" with the original code since I cannot remember the original software managing any disk I/O. So I may just have added some code to request a file name, then a starting position in pseudo-memory, where the program would then be compiled at.

I haven't tried these old things again since I created this disk. And guess what: That was quite a long time ago...

I guess it will just take loading and running "COREWARS.BAS" to find out.
I might try anytime soon if I can spare some minutes to do so. But it's likely you will have already found out in the meantime!

I remember trying to implement the same on my first Amiga, a few years later. And it proved a bit more difficult since I did not have the knowledge to properly handle a graphic display of the core's content. So I remember I had to use rather "dirty" ways (such as bypassing the system in order to manually manage a graphics "text-like" display). Everything had to be managed from the assembler and there was no user-interface available. And all the CW instructions, I had to understand then manually recreate in 68000 assembly. Which earned me some extra technical knowledge as a side-effect! But at least it worked, in spite of being a bit on the "raw" side of programming.

... I'm not even sure the original code from Dragon User was absolutely bug-free!

Kind regards,
Lionel
Last edited by snarkhunter on Wed Jun 17, 2015 7:11 pm, edited 1 time in total.
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: Core Wars - has anyone got this type-in?

Post by snarkhunter »

... Ok, after messing around with the software and trying to figure out the included commands, I think it's slowly coming back.

Hit "L" to (L)oad a program from disk. The following prompt will be displayed: "

Then you only need to type in the selected program's name (such as "IMP", for instance).
No need to type in the closing quotation mark since it will be automatically added when pressing <Enter>.

When it is loaded (the program's code will then be displayed), you will have to (C)ompile it (hit "C"): You will then be requested to enter the "Starting Location" (i.e. load) and "exec" addresses for your program. Please remember that the core's size is 192. Make sure the loaded programs will not overlap one another, since I doubt there is any such control included!

Then hit "E" to start (E)xecuting the loaded programs: You will now be requested to enter the number of players (hopefully, there will have been one program loaded per player!), their name(s), the number of "execute" steps you want (so that you will not face a neverending simulation). Then the display should switch to PMode4. I think pressing any key will now execute the next program instruction (i.e. for each loaded program, in turn).

Kind regards,
Lionel
devo
Posts: 30
Joined: Mon May 13, 2013 10:19 am
Location: Canberra, Australia

Re: Core Wars - has anyone got this type-in?

Post by devo »

I have got my first core war running on Xroar as I write this. Very impressive when one considers what is going on in the background. I realised that the vdk disk needs a Dos - I am using Dragon Dos 4 rom. I can appreciate the effort you must have put into this all those years ago. Next I'll be taking a look at the disassembly to learn how it works.
User avatar
snarkhunter
Posts: 241
Joined: Fri Apr 03, 2009 7:16 pm
Location: France

Re: Core Wars - has anyone got this type-in?

Post by snarkhunter »

devo wrote:Next I'll be taking a look at the disassembly to learn how it works.
This is a very good idea indeed: This will teach you a real lot about the way "disassembler" software actually works. Basically, it's about parsing the input (i.e. telling the operands from the opcode), then analysing each single instruction in turn and simulating the outcome (managing data, addressing modes, instructions, etc). I remember getting a much better understanding of assembly code after typing in and using this "game"...

This is a very nice kind of training for would-be programmers. And still useful even for some experienced ones (high-level programming logic being so very different from low-level philosophy).

Have fun! And do not hesitate to involve several "CW" programs at the same time (but don't let the simulated software run too fast, then, if you want to stand any chance of understanding what will be going on inside the Core!).
devo wrote:I realised that the vdk disk needs a Dos
... Most certainly! I remember that, from the day I got my disk drive (back in the Fall of 1986, I'd say), I suddenly became obsessed with getting any software to work with disks or finding software that was disk-compliant! And achieving this proved not such an easy task. Especially with software using most of Dragon's standard RAM. It's easier to tackle under emulation since one may easily "upgrade" to a 64, but things were not so easy with real hardware, back in the 80's...
Post Reply