6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Jun 23, 2024 6:24 pm

All times are UTC




Post new topic Reply to topic  [ 67 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: six five O two -o-poly
PostPosted: Sun Oct 18, 2015 9:28 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
In my initial flurry of posts, I managed to signal my new obsession to your community, and establish myself as a bit of a talker (not much of a "do-er"). Oh well. Somewhere within the posts I buried another interesting suggestion (the one that, at present, is practicable and within my skill level--perhaps slightly beneath my skill level).

"
"Hey, one more question guys, but I will put it in a separate post, below this one (or above; or wherever the posting program places it!). Thanks a million. I will read more, and post less; and ultimately, I will solder more and post less, and test twice as much as both put together. That's the plan, at least!"

"So, if--hypothetically speaking--you were to make a board game, the purpose of which was to teach children and/or young adults and/or non-techies, the function of a 6502--or for that matter, any microprocessor--what would it look like? What features would you include? What would be the "essential" op-codes, without which the "board-game ALU" would not function. I picked about 20 Op-codes from the Zaks book (i.e. transfers, branches, clears, loads, ADC, SBC, JMP, shifts, etc) and will make cards, picked up like "community chest" or "chance" in a monopoly game, or maybe one with each roll, so that simple add, subtract, multiply and divide programs can be practiced by unsuspecting, bored, precocious children, and their over-achieving, helicopter parents. I might even make a board with some toggle switches and LEDs, and give each player their own stack--where they can push the numbers from a random number generator--for later use. Each player borrows the ALU for their turn and takes their data back to the stack, or RAM with them (I think Push and Pop instructions will be free to use, at any time during a player's turn, even without a card/machine code). It is a rough idea, and I have worked out much more, but what do you think? Maybe I should try to make an x86 version, too, but I think my first love is the 6502---even though I know bup-kiss about actually using or making anything with it! Have you guys ever heard of a game that was "monopoly-like" but teaches Assembly/machine code? How about video games like this? (You would think the latter would be obvious enough to some computer programmer, somewhere??!!!)."

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 11 "

I have worked on it a bit more (pun intended), enough to show a few digital pictures of the progress. I developed the simplest cheapest random byte generator I could think of. Not exactly a woodworking masterpiece, but it functions well.

So, rough outline of a turn will be (1) roll dice and move and purchase, if able (monopoly style; but purchase inventions, science, theories, and/or intellectual property), (2) Pick up "Op-code card", (3) roll the Random Byte generator and write the result into your "coder's notebook" (every player has their own notebook; i.e. any slip of paper will suffice). (4) Optional; done only when a player is ready with a program that works; Load program into RAM, by hand (I guess this means the player is both ROM and "coder"? oh well, analogy can't work perfectly!) and run it through the ALU. (5) turn end; pass dice to next player.

If I get more organized, or rich, I will use pole switch and LED to increment the program counter, and to indicate the register and flag values. It could be a neat little board game with lots of hands-on learning for kids, teens and adults.

Perhaps a simplified "just-monopoly" rules game, for the really little kids. Then, they graduate to the full game when they get older (age 10 for precocious; age 15 more realistically).

Some other features I have been thinking about are;

(1) not a personal stack (one for watch player), as I originally thought, but one stack for the system.
(2) free use of the PUSH and PULL instructions (I was even thinking a Staples "that was easy" button would be cool)
(3) Very little money to start the game; much money for writing and executing successful code
(4) each "property" on the board would actually be a "theme" or "historical and theoretical arc" of certain crucial technologies. In the beginning of the game, the good hardware and concepts are locked, and as more easy inventions (zero, morse code, Boolean algebra) are purchased, better hardware and programs can be developed. (No worries about cross licensing, as I don't want too much "cut-throat" tech-culture to slip into the game. It is supposed to be fun! For that reason, venture capital and corporation references are kept to a minimum.).
(5) other stuff too.

This is the overview. I am going to go and try to figure out the best way to post these photos here. more to come, later. Suggestions welcome; please keep in mind, the simplest possible game is what I am looking for; not to many assumptions that aren't like real life, but not so difficult as to present a barrier to understanding. All comments welcome.


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 18, 2015 9:55 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
6502-opoly

Momentary lapse of hardware: Can't read my camera card? Might fix in the next half hour, or use a different computer tomorrow. Pics still to come.

Randall


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 18, 2015 10:26 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
https://www.facebook.com/randall.meyer. ... uploaded=9

I guess a FB post is the best way to share these photos. Go easy with the comments; it is a work in progress.

Is it a fool's errand? Maybe 6502 and microprocessing is too complex to turn into a game?

the computer I am using to upload these images is as bad as an abacus. I might as well walk five miles and pick up the ones and zeros myself; then deliver them five miles away to the accumulator. Slow as death!


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 18, 2015 10:29 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
oh shoot, you have to log in to see them.... I will find another, easier, more convenient way to see these photos... sorry... must go now.... my slow computer is a "time-share" ...


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 19, 2015 12:43 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8229
Location: Midwestern USA
randallmeyer2000 wrote:
oh shoot, you have to log in to see them.... I will find another, easier, more convenient way to see these photos... sorry... must go now.... my slow computer is a "time-share" ...

Photos can be uploaded as you post and linked in the text. I suspect more than a few around here are not Facebook users.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 19, 2015 5:17 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3366
Location: Ontario, Canada
Quote:
So, rough outline of a turn will be (1) roll dice and move and purchase, if able (monopoly style; but purchase inventions, science, theories, and/or intellectual property), (2) Pick up "Op-code card", (3) roll the Random Byte generator and write the result into your "coder's notebook" (every player has their own notebook; i.e. any slip of paper will suffice). (4) Optional; done only when a player is ready with a program that works; Load program into RAM, by hand (I guess this means the player is both ROM and "coder"? oh well, analogy can't work perfectly!) and run it through the ALU. (5) turn end; pass dice to next player.

Your idea appeals to me, since game-ifying learning is a powerful educational technique. But you'll need to think the whole thing through, as there are probably some pitfalls to overcome. For example the analogy can't work perfectly, as you say. So, you'd need to make some careful decisions. As much as possible, you need to avoid teaching folks anything they'll have to un-learn with a real 6502.

Another pitfall, if it can be considered one, is how much fun a real 6502 is to program! IOW, people have a choice between playing your game and coding a real 6502. Some of that audience will opt for the real thing!

cheers,
Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 5:46 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
I wrote much more, but lost it in a logout/login mishap? Bummer. Little energy to try to recover it/re-write it. At least I will try to post the photos today, and ask question and/or talk about it later.

Image


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 5:49 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
Image

Image

Image

Image

Image

Image

Image

Image


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 5:53 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10834
Location: England
Love the dice-o-byte!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 6:07 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
So, random number generator is pretty cheasy. I broke it twice while making it. Really hack-job carpentry.

The innner diuagram was based on a Rodnay Zaks diagram, but the WDC 500+ page 65816 manual had a better diagram that I will probably end up using instead.

I erased the stack from the board, but I will put it back , on the left side. I thought of giving everybody their own stack, but changed my mind and gave everybody a notebook, instead.

I don't know enough about the start-up of a 6502 system to decide how the ROM should be (in our analogy; I want it to be as realistic as possible, so nobody has to "relearn" the fundamentals of "how a computer works".

Now, 6502 uproc has a lot of "zero-page" instructions, and so, zero page has to exist in the RAM, right? And the stack is page 1, also RAM, right? So, on startup, how does the 6502 know what to do? How does it go to the ROM to get its first program?

How, in the board game, will this be implemented? Should the first program that everybody writes be a EEPROM program; a 'loader"; a sort of "DOS" (minus the spinning platter and/or reels of magnetic tape)?

I think I have seen diagrams with shift register ICs--or maybe "address decoder" ICs--that point the addresses presented to the address bus by the CPU, to the different memory/I-O chips present on the board; those other ICs that have been included by the hardware designer. Is this right? I must go read more; my knowledge is woefully inadequate, both for my computer project AND for the Board Game!

Thanks again, for any help you can offer. I will go study now. Hopefully, someday, I will have a playable game, to pay you folks back for Q and A you have given me. I hate to be a "Hogger of the human bandwidth", but its all part of the process, I assume?

P.S. while coding might be fun for coders, it might be tedious and/or intimidating for people who lack a mentor or functional equipment to get them started. A board game could be a great introduction. Also, I hope the "historical tidbits" will keep the adulkts and the coders interested. I jsu need to make the philosophical and historical story deep enough to stump--suyrprise!--"the coders", occasionally!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 6:16 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
Thanks big ed; I still might use some hexadecimal dice, but I don't think they have them with the letters instead of the numerals 11, 12, 13, etc.

You'd be surprised; there are a lot of weird and funky dice on the internet, ebay, amazon, for purchase, but they are mostly standard "D and D" dice (Dungeons and Dragons). And 16-sided is not one of them; maybe a standard D + D 20, 22, or 24 sided could be repainted to make a hexa-dice-imal, but then the chance of some numbers would be increased, and not equally random.

This reminds me of one of my favorite words; "tricesimoprimal". Hughyens used it, I think; 31-base. For some reason he thought musical intervals within an octave should be divided into 31 equal spaces?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 6:35 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10834
Location: England
I think perhaps the 31-tone organ has not yet found its Bach
https://m.youtube.com/watch?v=UmGhF32ulKc
Unless that's just my unsophisticated view!


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 6:41 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
Here is another option, I have not thought of before this moment; Hexa-dice-imal could be (1) rolled, (2) decoded by player (given an op-code sheet to aid in decoding), (3) player writes it down on notebook under one of two columns; i.e. chooses "data", in binary, or "op-code", written down mnemonic.

Then roll the Byte-dice, and add that to the "data" column.

So, maybe the first program would look like this; (I ran this through an online assembly 6502 simulator/emulator thingy; so it should be a functional program. I think it is my first program that, in theory, should work, but I have never tried to put it into a machine, because I clearly do not know what I am doing.). Please tell me what you think; I put it in address 0000 0000 0000 0000 because I thought the 6502 (PCH PCL) would start there, but that's probably wrong.

Address Contents Machine Language

0000H CLC 00011000
0001H CLD 11011000
0002H LDA (immediate) 10101001
0003H {any 8 bits / data} bbbbbbbb
0004H ADC (immediate) 01101001
0005H {any 8 bits data} bbbbbbbb
0006H STA (absolute) 10001101
0007H 00000000 00000000
0008H 00001001 00001001
0009H {8 bit answer} bbbbbbbb


I just have three questions; (1) would this work in a real machine? (2) if not, would it work if I put it on page 3, instead of page zero. (3) would it work if I substituted "page zero" instructions for the "immediate" and "absolute' ones I gave, above?

I wrote out everything as long as it could possibly be, as explicitly as I possibly could, because I wanted to have a clear understanding of EXACTLY where every bit was going to, and coming from, and why; I don't think I achieved this knowledge, but at least by doing the work wrong and realizing it, i didn't go on thinking that I knew what I was doing.

I am sorry if these are foolish questions; I will DEFINITELY go do my homework now, so as to spare you some idiotic questions in the future.

Thanks again.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 6:55 pm 
Offline

Joined: Mon Oct 12, 2015 5:19 pm
Posts: 255
https://www.youtube.com/watch?v=RWCwMW48FO4

this guy makes scale books fir tricesimoprimal guitars.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 20, 2015 7:51 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8460
Location: Southern California
randallmeyer2000 wrote:
I don't know enough about the start-up of a 6502 system to decide how the ROM should be (in our analogy; I want it to be as realistic as possible, so nobody has to "relearn" the fundamentals of "how a computer works".

Now, 6502 uproc has a lot of "zero-page" instructions, and so, zero page has to exist in the RAM, right? And the stack is page 1, also RAM, right? So, on startup, how does the 6502 know what to do? How does it go to the ROM to get its first program?

Quote:
I put it in address 0000 0000 0000 0000 because I thought the 6502 (PCH PCL) would start there, but that's probably wrong.

That's what the reset vector is for, at addresses FFFC and FFFD.  At the end of the reset sequence, the processor reads the contents of these two addresses to get the address where to start executing.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 67 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: