Jump to content
IGNORED

Dominant Amber (2600) - Hackaday 1KB Challenge


Wickeycolumbus

Recommended Posts

When I heard that Hackaday was having a contest for projects that use 1KB or less of code, I thought it would be a good opportunity to get myself back into 2600 programming. It has been too long :)

 

This is a simple game that is based off of the "Dominant Amber" game in the AtGames Sega console. It is a really simple idea that is probably copied in other places too... I couldn't think of a good name for it so I am copying that as well for now...

 

The screen shows a random arrangement of two different colored objects, and you simply select which you think is the 'dominant' one. If you get it correct points are awarded. Incorrect responses subtract points. There are two minutes for each game. In the first minute, the dominant color is a bit more obvious.

 

Anyway, wanted to share it here before I post it to the contest.

 

Happy New Year :party:

 

post-12776-0-73548300-1483225261_thumb.png

 

amber_12_31_16.bin

 

Dominant_Amber.asm

 

EDIT: Source code added to post.

 

Link to Hackaday posting: https://hackaday.io/project/19214-dominant-amber-a-1kb-atari-2600-game

 

Edited by Wickeycolumbus
  • Like 5
Link to comment
Share on other sites

Wow, really impressed by this!

Simplistic gameplay, but surprisingly challenging and addictive. Presentation is topnotch considering this all fits into 1k !

Changing graphics, extra sound don't hurt if you can still squeeze more into 1k, but they certainly are not required.

A title screen would be a waste for small games - such games thrill by delivering an optimized balance between gameplay/graphics/sound/presentation (in that order).

Link to comment
Share on other sites

Wow, really impressed by this!

Simplistic gameplay, but surprisingly challenging and addictive. Presentation is topnotch considering this all fits into 1k !

Changing graphics, extra sound don't hurt if you can still squeeze more into 1k, but they certainly are not required.

A title screen would be a waste for small games - such games thrill by delivering an optimized balance between gameplay/graphics/sound/presentation (in that order).

 

I was referring to making it a full release and not staying in 1k.

Link to comment
Share on other sites

Thanks for the positive reviews guys! I was wondering, is 2 minutes too long? Would you be more likely to play more rounds with 1:00 or 1:30?

 

I think I will submit this version for the contest. I am using every last byte at the moment. Of course you can always do more squeezing to fit in other features, but I think this will do for now. I was planning on adding some music, and other difficulty levels (three or more colors). Maybe I will revisit the idea without ROM limitations sometime.

 

 

Very well done. Thanks.

Shared with the Atari 2600 Homebrew Group at FaceBook.

https://www.facebook.com/groups/Atari2600homebrew

 

Cool didn't know about that page! I like the Dominant Ghost and Dominant Invaders hacks :D

 

 

Wow, really impressed by this!

Simplistic gameplay, but surprisingly challenging and addictive. Presentation is topnotch considering this all fits into 1k !

Changing graphics, extra sound don't hurt if you can still squeeze more into 1k, but they certainly are not required.

A title screen would be a waste for small games - such games thrill by delivering an optimized balance between gameplay/graphics/sound/presentation (in that order).

 

Thanks, glad you enjoy it!

 

I meant my old ones (Cave1k, Splatform, Robot City...). i couldn't find any restrictions.

 

I didn't see any restrictions about that either, I think it should be possible to submit an older project.

Link to comment
Share on other sites

I understand the 2600 doesn't have much of a BIOS to rely on, but most other previous Minigame entries would be disqualified if they relate to firmware ROM calls, or that code must be included. Thus it is not 1K application code, but 1K total code including rolling everything you need to access the cold hardware.

Link to comment
Share on other sites

Good to see your games submitted, Thomas!

 

Working on a 1K version of RAM Pong now...

 

RAM Pong is an amazing project. If possible you should include a video where you remove the cartridge and show that the game still runs :D

 

I remember that after you did RAM Pong, a few other programmers started doing RAM games. Those were fun to program.

  • Like 1
Link to comment
Share on other sites

:thumbsup:

 

Don't forget to upload the files.

I've used the Github option. Link is at left. Just updated description to include it.

 

Projects must be open source. Source code, schematics, and board layouts for the project software must be either posted in the files section, or include a link to a public repository such as Github.

Link to comment
Share on other sites

And I learned that you can use 1K ROMs without padding.

The 2K Cartridge driver for Stella notes that it can support ROMs as small as 64 bytes. What it does is create a mask based on the size of the ROM and then masks the addresses in order to restrict it to locations within that size. On real hardware the same would be done by not connected all of the address lines in the cartridge, resulting in the small ROM being repeated throughout the 4K cartridge address space.

 

During the init it figures out the correct power of 2 ROM size to use, then creates a mask based on that:

Cartridge2K::Cartridge2K(const uInt8* image, uInt32 size, const Settings& settings)
  : Cartridge(settings)
{
  // Size can be a maximum of 2K
  if(size > 2048) size = 2048;
 
  // Set image size to closest power-of-two for the given size
  mySize = 1;
  while(mySize < size)
    mySize <<= 1;
 
  // The smallest addressable area by Stella is 64 bytes
  // This should really be read from the System, but for now I'm going
  // to cheat a little and hard-code it to 64 (aka 2^6)
  if(mySize < 64)
    mySize = 64;
 
  // Initialize ROM with illegal 6502 opcode that causes a real 6502 to jam
  myImage = make_ptr<uInt8[]>(mySize);
  memset(myImage.get(), 0x02, mySize);
 
  // Copy the ROM image into my buffer
  memcpy(myImage.get(), image, size);
  createCodeAccessBase(mySize);
 
  // Set mask for accessing the image buffer
  // This is guaranteed to work, as mySize is a power of two
  myMask = mySize - 1;
}

Accessing memory example using the mask:

uInt8 Cartridge2K::peek(uInt16 address)
{
  return myImage[address & myMask];
}
Link to comment
Share on other sites

Any plan to expand this?

Sound

Title Screen

Alternate or changing graphics

I'd like to see this! Suggestion- on the title screen, the option of 1min, 1:30, or 2min gameplay.

 

Thanks for the positive reviews guys! I was wondering, is 2 minutes too long? Would you be more likely to play more rounds with 1:00 or 1:30?

see my suggestion above

 

Working on a 1K version of RAM Pong now...

funny how you bring that up now - I just asked PackRat VG about that title that has been in their "store" as a TBA for a long time............

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...