Jump to content
rje

New game uploaded: Core War

Recommended Posts

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.

 

Share this post


Link to post
Share on other sites

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?

 

Share this post


Link to post
Share on other sites

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

 

Edited by rje

Share this post


Link to post
Share on other sites

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.

 

  • Like 2

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites
1 hour ago, svenvandevelde said:

What is a CLI?

Sorry about that -- yeah a "command line".

I have to do the hard work and get the opcodes all working properly... then I can put the arena / core into banked RAM.

Share this post


Link to post
Share on other sites

So I'll ask for the sake of asking.  What's the best use for that banked RAM?

I'm just assuming that the "arena" is the best place for it, because that way I can have enough memory for an 8000 location arena, which will need 40k to 48k RAM, depending on what the location record stores.

The downside is that fetching data from the arena becomes a function call, or a macro, instead of directly accessing an array.  I mean, array access is WONDERFUL and easy.  

But... suppose I only need the current 16K RAM for the 4K arena.  Maybe I can get by with that... I still have 6K "golden RAM" free, and I can shove things like the help text (for example) into a single RAM bank.

I'm just asking for the sake of asking.  I always feel the need to use up all that free RAM, but that doesn't mean I ought to.

Edited by rje

Share this post


Link to post
Share on other sites
1 hour ago, rje said:

So I'll ask for the sake of asking.  What's the best use for that banked RAM?

I'm just assuming that the "arena" is the best place for it, because that way I can have enough memory for an 8000 location arena, which will need 40k to 48k RAM, depending on what the location record stores.

The downside is that fetching data from the arena becomes a function call, or a macro, instead of directly accessing an array.  I mean, array access is WONDERFUL and easy.  

But... suppose I only need the current 16K RAM for the 4K arena.  Maybe I can get by with that... I still have 6K "golden RAM" free, and I can shove things like the help text (for example) into a single RAM bank.

I'm just asking for the sake of asking.  I always feel the need to use up all that free RAM, but that doesn't mean I ought to.

Well, you don't have 6k of Golden RAM, you have 1kb.

Why would an arena cell need more than one byte? The original core war only had something like 10 instructions. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Please review our Terms of Use