New game uploaded: Core War

All aspects of programming on the Commander X16.
rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

New game uploaded: Core War

Post by rje »




Core War




View File






This is a proof of concept of a Core War VM for the X16.

It implements all ICWS'88 opcodes (plus a couple extra); as proof of concept it runs many of the "historical" redcode programs from that period.  It has a PETSCII arena view which follows colorized redcode programs.  Up to 8 programs may run at a time, and each may have up to 8 processes.

It does not handle operand expression math.

The project is here: https://github.com/bobbyjim/x16-corewar


title screen.png






  • Submitter




    rje




  • Submitted


    06/10/21




  • Category







 
rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

New game uploaded: Core War

Post by rje »


I just spent a morning writing a kind of test framework for debugging the opcode handling.

I just re-learned that C functions on the X16 need to be relatively simple; the fewer params passed, the better.

No worries.

 

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

New game uploaded: Core War

Post by rje »


I've been thinking about different ways of using banked RAM for the ARENA.

(1) Just slop it into banks.  This is probably what I'd do.  Just occupy as many banks as I want, and have appropriate boundary checking etc.

(2) Use Bank 1 as an index.  If I keep the core size to <= 8192, then Bank 1 can indicate which bank each cell is located in.  This is more or less a way of skipping one operation in #1 above, but it creates an indirect dereference and in the end it doesn't sound like it's worth the effort.  I mean, if the relationship is a simple div to begin with, why store an indirect ref in a table?

 

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

New game uploaded: Core War

Post by rje »


I've been thinking about how to EDIT core warriors.  I wonder if I can use our text-editor utility...

 

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

New game uploaded: Core War

Post by rje »


So far, I've debugged MOV in two modes, ADD (and SUB) in three modes, and started on MUL and DIV.

It's slow going.

 

User avatar
svenvandevelde
Posts: 488
Joined: Wed Dec 23, 2020 6:30 am
Location: Belgium, Antwerpen

New game uploaded: Core War

Post by svenvandevelde »



On 6/11/2021 at 6:04 PM, rje said:




I just spent a morning writing a kind of test framework for debugging the opcode handling.



I just re-learned that C functions on the X16 need to be relatively simple; the fewer params passed, the better.



No worries.



 



It depends which c compiler you use. 

KICKC home page by Jesper Gravgaard.
My KICKC alpha with Commander X16 extensions.
rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

New game uploaded: Core War

Post by rje »


Added a CLI to help me debug a bit better.

 

 

User avatar
svenvandevelde
Posts: 488
Joined: Wed Dec 23, 2020 6:30 am
Location: Belgium, Antwerpen

New game uploaded: Core War

Post by svenvandevelde »



17 hours ago, rje said:




Added a CLI to help me debug a bit better.



 



 



What is a CLI?

KICKC home page by Jesper Gravgaard.
My KICKC alpha with Commander X16 extensions.
Ed Minchau
Posts: 508
Joined: Sat Jul 11, 2020 3:30 pm

New game uploaded: Core War

Post by Ed Minchau »



18 minutes ago, svenvandevelde said:




What is a CLI?



Command Line Interface. 

Elektron72
Posts: 137
Joined: Tue Jun 30, 2020 3:47 pm

New game uploaded: Core War

Post by Elektron72 »



18 minutes ago, svenvandevelde said:




What is a CLI?



CLI stands for Command-Line Interface.

Post Reply