Author Topic: SP-10 Computer [SP-Assembly!]  (Read 7208 times)

0 Members and 1 Guest are viewing this topic.

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
SP-10 Computer [SP-Assembly!]
« on: April 05, 2013, 09:28:07 am »
I'm making an 8-bit computer. It won't be like your average computer; no screen or keyboard. Instead it has 8 switches and 3 buttons for input, and 16 LEDs for output. 8 LEDs show the current address you are looking at, and the next 8 show the data in the address. The computer has 256 bytes of RAM. Since the programs are stored in RAM, and the only way to store data is to edit RAM, the program can re-program itself :D There are no registers, instead everything is done with direct RAM addresses. To edit RAM, you put in an address in the 8 switches then hit the ADDR button, which changes the currently open address to the one on the switches. You can press the STORE button to store the number on the switches into the currently open address. The RUN button starts the program from the currently viewed address. I'm not finished with this, I'm still writing the programming, but I do actually have everything breadboarded. It will all be run with a PIC18F46K20 processor. I know it's a bit overkill to use a powerful processor, but it's nice to have four 8-pin ports.

So I have a question for you all: since the programs are stored in RAM, when you turn off the computer, everything in RAM is lost. The PIC processor I am using has an internal EEPROM. When the computer shuts off, should I auto- backup the RAM  to the EEPROM, and then load the EEPROM contents into RAM when the computer is turned back on? Or not? Or maybe do it some other way?

Here  is the planned assembly language for the SP-10 computer; try writing neat programs! When I have the system finished, I will run your guys' programs and make videos of them!
In this table, X and Y just represent arguments.
The table is here (UPDATED TABLE!!) : http://withg.org/spyro543/sp10/index.htm

Youtube Video:
« Last Edit: April 11, 2013, 09:05:58 pm by Spyro543 »

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: SP-10 Computer [SP-Assembly!]
« Reply #1 on: April 05, 2013, 05:39:47 pm »
Good news everyone!!!!! I sucessfully set up the PIC! All it does for now is light up an LED but at least it works!

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: SP-10 Computer [SP-Assembly!]
« Reply #2 on: April 05, 2013, 09:28:24 pm »
You are making a computer?!?!?!? :crazy:
That is pretty impressive! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: SP-10 Computer [SP-Assembly!]
« Reply #3 on: April 06, 2013, 03:34:55 am »
Nice, spyro! Will it look like a miniature version of the Altair 8800?

You are making a computer?!?!?!? :crazy:
That is pretty impressive! :D
I was first: http://ourl.ca/18613
If you like my work: why not give me an internet?








Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: SP-10 Computer [SP-Assembly!]
« Reply #4 on: April 06, 2013, 09:31:10 am »
Wonderful work, although there are some minor things:
1. You have 3kB of RAM, then why do you only provide 256 bytes RAM memory?
I made a language too, and tbh, 256B is small, so it won't be able to store complex programs.
2. How many MIPS will it run irl, the processor is 16, but what will it be when really running, or don't you have a clue about that yet?
3. Good luck :)

I was first: http://ourl.ca/18613
I'm terribly sorry to say this, but is it really about who's first? We're all making stuff someone surely has done before somewhere (or at least there's a very high chance), so no, you're not first.
« Last Edit: April 06, 2013, 01:45:25 pm by Nick »

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: SP-10 Computer [SP-Assembly!]
« Reply #5 on: April 06, 2013, 10:25:40 am »
I was first: http://ourl.ca/18613
I'm terribly sorry to say this, but is it really about who's first? We're all making stuff someone surely has done before somewhere (or at least there's a very high chance), so no, you're not first.
Lol it's ok. His project is gonna turn out much cooler than mine :P

Also yes I guess this will turn out like a mini Altair

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: SP-10 Computer [SP-Assembly!]
« Reply #6 on: April 06, 2013, 11:57:10 am »
I'm curious what exactly it will do without a screen. What sort of programs should we write? I think it's a cool project, i'm just a bit confused :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SP-10 Computer [SP-Assembly!]
« Reply #7 on: April 06, 2013, 01:23:39 pm »
Wonderful work, although there are some minor things:
1. You have 3kB of RAM, then why do you only provide 256 bytes RAM memory?
I made a language too, and tbh, 256kB is small, so it won't be able to store complex programs.
It probably depends. The TI-84+ could hold an entire Zelda game (although that was interpreted TI-BASIC plus a few ASM libs) and someone was making a full ASM Zelda clone, so yeah it could certainly host games. Of course games are pointless now though because the computer lacks a screen.
« Last Edit: April 06, 2013, 01:24:17 pm by DJ Omnimaga (Not Admin) »

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: SP-10 Computer [SP-Assembly!]
« Reply #8 on: April 06, 2013, 01:45:13 pm »
Wonderful work, although there are some minor things:
1. You have 3kB of RAM, then why do you only provide 256 bytes RAM memory?
I made a language too, and tbh, 256B is small, so it won't be able to store complex programs.
It probably depends. The TI-84+ could hold an entire Zelda game (although that was interpreted TI-BASIC plus a few ASM libs) and someone was making a full ASM Zelda clone, so yeah it could certainly host games. Of course games are pointless now though because the computer lacks a screen.
I made a slightly little typo there that divides the amount of RAM by about 1024, maybe you can check again now :)
« Last Edit: April 06, 2013, 01:46:04 pm by Nick »

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: SP-10 Computer [SP-Assembly!]
« Reply #9 on: April 06, 2013, 09:25:57 pm »
So has anyone learned SP-ASM? I'd like to see programs you guys have written!
« Last Edit: April 06, 2013, 09:26:20 pm by Spyro543 »

Offline Nick

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1166
  • Rating: +161/-3
  • You just got omnom'd
    • View Profile
    • Nick Steen
Re: SP-10 Computer [SP-Assembly!]
« Reply #10 on: April 07, 2013, 02:24:46 am »
So has anyone learned SP-ASM? I'd like to see programs you guys have written!
It's just that I don't really know what to write for it, 3 buttons and 8 leds output is pretty hard to figure something out that is entertaining/useful...

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: SP-10 Computer [SP-Assembly!]
« Reply #11 on: April 07, 2013, 04:41:48 am »
Seems to be interresting project =)
I'd like to request the following commands:
  • Relative Jumps: add X to program counter [JR X; 0B]
  • Display X (without halting!) [DSP X; EF]
  • Read in the Input buttons' states to X (load the digital values to some bits in X) [INB X; EB]
  • Read in the Input switches' states to X (load the digital values to some bits in X) [INS X; EC]
  • Rotate X left and store it back to X [RL X; BA]
  • Rotate X right and store it back to X [RR X; BB]
Bit checking can be done by ANDing and comparing, so you might don't need that.

Offline Spyro543

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1189
  • Rating: +74/-3
    • View Profile
Re: SP-10 Computer [SP-Assembly!]
« Reply #12 on: April 07, 2013, 09:01:50 am »
Sure, I'll add those in. Now what about the EEPROM problem (talked about in first post)?

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: SP-10 Computer [SP-Assembly!]
« Reply #13 on: April 07, 2013, 09:49:25 am »
You should be able to archive programs in eeprom.
If you like my work: why not give me an internet?








Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: SP-10 Computer [SP-Assembly!]
« Reply #14 on: April 07, 2013, 04:01:51 pm »
The MCU you are using has 1024 bytes of EEPROM, so I think one should be able to store programs in the EEPROM and maybe select on start up which one you want to run (Enter 0-3 in binary on the switches and press one button to run, another one to edit, etc.). Since Programs are limited to 256 bytes (which is indeed not much) you might want to have a command to load and start another program (like a jump from a line in one program to the first in another). Maybe RUN X or something. When it is the same program you want to run, it will repeat itself. Also, CALL and RETURN would be nice to have (you will need to setup a stack, but shouldn't be too difficult I guess).