Omnimaga

Calculator Community => Other Calculators => Topic started by: kingofthebacon on September 25, 2011, 01:28:26 pm

Title: Build your own Z80 calculator
Post by: kingofthebacon on September 25, 2011, 01:28:26 pm
Hi everybody! I'm new here I'm starting to learn z80 assembly for the ti 83+. I was wondering if it would be possible to build your own calculator with a z80 microprocessor and some sort of screen similar to the ti calculators screen. Wouldn't you have to put the ti-os on it to run programs and such? If this is even possible we could probably add more memory to the home made calculator. Unless that would cause you to have to rewrite the ti os or something to support more memory. I don't know if this is just stupid or if some one has asked before. But all feedback is appreciated!  ;D (Sorry if this is dumb or impossible)
Title: Re: Build your own Z80 calculator
Post by: JoeyBelgier on September 25, 2011, 02:01:33 pm
Hrm, I'd rather want to make a "calculator" with only a d-pad, about 4 buttons and something like MirageOS as -actual- os in stead of a shell. Just for playing games, like some cheap Chinese handheld :P
Title: Re: Build your own Z80 calculator
Post by: Camdenmil on September 25, 2011, 02:19:54 pm
It's definitely possible. I am currently working on a z80 computer. My current design could be miniaturized to calculator size if I switched over to smd and replaced the many 74 series ics with an fpga or a microcontroller. To run programs, right now I flash a 32k eeprom and use 32k ram. I'm probably going to add bank switching soon. If you want to start making circuits with the z80, take a look at z80.info (http://z80.info).
Title: Re: Build your own Z80 calculator
Post by: boot2490 on September 25, 2011, 02:29:26 pm
Can't you just buy a Z80 Processor?
Title: Re: Build your own Z80 calculator
Post by: Spyro543 on September 25, 2011, 03:45:16 pm
Hrm, I'd rather want to make a "calculator" with only a d-pad, about 4 buttons and something like MirageOS as -actual- os in stead of a shell. Just for playing games, like some cheap Chinese handheld :P
:o You just gave me idea.
Title: Re: Build your own Z80 calculator
Post by: JoeyBelgier on September 25, 2011, 03:52:13 pm
Hrm, I'd rather want to make a "calculator" with only a d-pad, about 4 buttons and something like MirageOS as -actual- os in stead of a shell. Just for playing games, like some cheap Chinese handheld :P
:o You just gave me idea.

Lol, been having this idea since whenever the -censor- I joined Omnimaga :D
Title: Re: Build your own Z80 calculator
Post by: Spyro543 on September 25, 2011, 03:54:21 pm
I should so make one then give directions so everyone on Omni can make one and then we all make games for them and share game ideas and then our game system is better then Nintendo and we make monies off of our idea >:D
Title: Re: Build your own Z80 calculator
Post by: DJ Omnimaga on September 25, 2011, 06:11:24 pm
There was a similar project called OTZ80 before http://www.omnimaga.org/index.php?board=118.0

Sadly I think it is discontinued, because it could only progress during Summer and last Summer it still didn't see any progress.
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 25, 2011, 07:11:06 pm
Hey camnedmil are you by any chance this guy? http://benryves.com/projects/z80computer
Title: Re: Build your own Z80 calculator
Post by: AngelFish on September 25, 2011, 07:12:09 pm
Ben Ryves is actually the member called Ben Ryves :P
Title: Re: Build your own Z80 calculator
Post by: Ashbad on September 25, 2011, 07:52:38 pm
Ben Ryves is actually the member called Ben Ryves :P

1) yeah... Ben wouldn't really sign up in another name, considering no one else has that name yet, and it's his name everywhere else.

2) this is in the wrong forums section

3) for adding memory, why not use msd8x?  Building a whole new calculator seems.. rather unnecessary.
Title: Re: Build your own Z80 calculator
Post by: Camdenmil on September 25, 2011, 08:01:27 pm
Hey camnedmil are you by any chance this guy? http://benryves.com/projects/z80computer
No. I have looked at his design though. His is pretty much a full computer; my current progress is is a 128x64 lcd, 32k ram, and 32k rom. The 32k ram is actually a 512k chip with lots of address pins tied low. I'm going to do bank switching with that and find some way to quickly interface a z80 with an sd card. My goal is to get something the size of a calculator but I may need to actually get a final design and switch to smd for that.
Title: Re: Build your own Z80 calculator
Post by: DJ Omnimaga on September 25, 2011, 08:34:00 pm
Well a new calc would be nice in the way it could offer more than TI's while still costing less. That was OTZ80 goal to offer more for less, so people aim for compatible z80 calcs (a TI-84+ emu was planned) while not having to spend $110 for 1970 hardware. However such project is a huge undertaking, so be warned that it will be a lot of work and be complicated.

On a side note welcome on the forums kingofthebacon.
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 25, 2011, 10:16:17 pm
@Ashbad Not all of us want to spend $100000000+ on a ti 84+. Yes I am being I hypocrite because I would have to spend money to make this home made calculator. But it also may be cheaper than buying a ti 84+ SE because of the old technology these calculators have you could probably build it for not that much. :)

@Everyone thanks for your feedback!

@DJ_O Thanks ! :)

I don't think I said before but I have experience in electronics.
Title: Re: Build your own Z80 calculator
Post by: ralphdspam on September 26, 2011, 12:01:37 am
A z80 is only about $5.  You can get a better LCD screen for about $15. 
Title: Re: Build your own Z80 calculator
Post by: Eeems on September 26, 2011, 12:21:41 am
I was pretty sure z80's were only a couple of cents...well maybe that's just how much it takes to produce them...
Title: Re: Build your own Z80 calculator
Post by: DJ Omnimaga on September 26, 2011, 12:24:42 am
I think the money issue is more when it's time to produce the units in batch then market them. I could be wrong, though.
Title: Re: Build your own Z80 calculator
Post by: ralphdspam on September 26, 2011, 12:25:53 am
I was pretty sure z80's were only a couple of cents...well maybe that's just how much it takes to produce them...
Yes.  I'm pretty sure you are correct.  I was quoting the retail price.  :)

Why do they charge $115 for the calc, though?  It was even more than the Prizm at my local Office Depot!
Title: Re: Build your own Z80 calculator
Post by: Netham45 on September 26, 2011, 01:54:22 am
Why do they charge $115 for the calc, though?  It was even more than the Prizm at my local Office Depot!

They pretty much have a monopoly on it, and they're exploiting it as much as they can.
Title: Re: Build your own Z80 calculator
Post by: TIfanx1999 on September 26, 2011, 02:27:01 pm
Hi everybody! I'm new here I'm starting to learn z80 assembly for the ti 83+. I was wondering if it would be possible to build your own calculator with a z80 microprocessor and some sort of screen similar to the ti calculators screen. Wouldn't you have to put the ti-os on it to run programs and such? If this is even possible we could probably add more memory to the home made calculator. Unless that would cause you to have to rewrite the ti os or something to support more memory. I don't know if this is just stupid or if some one has asked before. But all feedback is appreciated!  ;D (Sorry if this is dumb or impossible)

Welcome here! In answer to your questions:Yes it is possible. TI-OS is not a prerequisite, just anything that would run on whatever Z80 you choose. I'd also suggest checking Ben Ryves's topic linked to on page one. Although his is a computer, it is built on a similar idea. :)
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 26, 2011, 05:25:03 pm
So guys I'm putting together a list of stuff I might need to make this thing. Feel free to suggest different places to buy  stuff and if you think I should add anything.

Z80 - http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=35561&productId=35561&keyCode=WSF&CID=GMC

128K flash rom - for os   using rom because it would not be rewritten alot

Do you guys think I should use eeprom

or

sd card? - http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=WM3472DKR-ND

64k ram chip - ?

LCD - ?

i/o chip - ?

You guys are going to have to help me with this thing because I know your all super geniuses and stuff and I, no we will build this thing together so how about it? Will we build this thing for all the nerdy people who want an affordable calculator with a lot of memory!? :)
Title: Re: Build your own Z80 calculator
Post by: Spyro543 on September 26, 2011, 05:30:54 pm
Hey, would you rather want to work together on this project? We could meld together DreamCalc and whatever you'll call this...
Title: Re: Build your own Z80 calculator
Post by: turiqwalrus on September 26, 2011, 05:47:09 pm
Why do they charge $115 for the calc, though?  It was even more than the Prizm at my local Office Depot!

They pretty much have a monopoly on it, and they're exploiting it as much as they can.
meh... my school REQUIRES TI's
[/offtopic]
sounds really cool; another indpendent calc project ;D
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 26, 2011, 06:06:09 pm
@Spyro543 Yeah I would work together with you, if you think you can and know how to build it because I want someone who would be dedicated to this and could give me their input and skills. Also will you show this Dream Calc idea thing your talking about?
Title: Re: Build your own Z80 calculator
Post by: Spyro543 on September 26, 2011, 06:59:39 pm
@Spyro543 Yeah I would work together with you, if you think you can and know how to build it because I want someone who would be dedicated to this and could give me their input and skills.
Well, we could work together building it...I guess.

Also will you show this Dream Calc idea thing your talking about?
http://ourl.ca/12651 Here's the link to the thread, but almost all discussion was done on IRC.
Title: Re: Build your own Z80 calculator
Post by: Camdenmil on September 26, 2011, 11:02:39 pm
So guys I'm putting together a list of stuff I might need to make this thing. Feel free to suggest different places to buy  stuff and if you think I should add anything.

Z80 - http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=35561&productId=35561&keyCode=WSF&CID=GMC

128K flash rom - for os   using rom because it would not be rewritten alot

Do you guys think I should use eeprom

or

sd card? - http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=WM3472DKR-ND

64k ram chip - ?

LCD - ?

i/o chip - ?

You guys are going to have to help me with this thing because I know your all super geniuses and stuff and I, no we will build this thing together so how about it? Will we build this thing for all the nerdy people who want an affordable calculator with a lot of memory!? :)

PIO is annoying with discreet logic ics. To use more than 64k memory (ram+flash) you need to do bank switching. The easy way is to use a microcontroller for io and use 8 bit latches (74HCT259) to hold the higher bits of the address. I recommend using an eeprom or sd card. It would be nice to store data somewhere other than ram and to upgrade the os. If you want to use an sd card, you need a way to convert the z80's 8 bit parallel data to an spi signal. An FPGA could be an option for io but you'll need to use a small microcontroller like a pic to load the configuration to the FPGA on startup. For ram, you should use sram because it doesn't need to be refreshed so you can "turn off" the calculator and still have a small current going to the sram so you don't need to setup ram every startup.
Title: Re: Build your own Z80 calculator
Post by: ralphdspam on September 26, 2011, 11:20:52 pm
I think you should have the OS on EEPROM or Flash and data on the SD card.  You can then copy the program from the SD card and then execute it from the SRAM.  
Title: Re: Build your own Z80 calculator
Post by: willrandship on September 26, 2011, 11:26:06 pm
You should make it support BBC Basic.

That is all. :P Then we can have cross-platform progs.
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 27, 2011, 05:08:12 pm
So I should add this to the list

8-bit latches http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=296-2109-5-ND

Would this pic chip work?? - http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=PIC16F57-I/SS-ND

32k sram two of these chips - http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=BN-064HSRC-ND

Would this fpga chip work?? - http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=TMPA900CMXBG%28EY%29-ND

Can I hold the OS on the sd card?
I would need some sort of programmer to program these I don't want it to be too expensive though.
I'm not the best with digital electronics either so I am going to need some help from you guys!
Without all of you this will only be a dream...
Title: Re: Build your own Z80 calculator
Post by: Spyro543 on September 27, 2011, 05:10:25 pm
Ooh PIC chips! A friend of mine knows all about PIC ASM!
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 27, 2011, 05:27:21 pm
Maybe he can help because I can't program them! :)

List of People for stuff:

pic programmer dude - check
fpga programmer - need one
Title: Re: Build your own Z80 calculator
Post by: Spyro543 on September 27, 2011, 05:29:48 pm
kingofthebacon, I don't know what he'll say if I want him to help some guy on the internet program a PIC. Actually, you can also program them in C.
Title: Re: Build your own Z80 calculator
Post by: Keoni29 on September 27, 2011, 06:04:22 pm
Which is much easier to learn :) You could also base it on the arduino! AVR :)
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 27, 2011, 08:27:23 pm
I was learning some C++ I don't know if I will know what to do though. :(
I'm not very good at all of this. :(
Title: Re: Build your own Z80 calculator
Post by: Camdenmil on September 27, 2011, 11:22:23 pm
FPGA's are advanced, I have very little experience with them. The simplest and easiest way to do bank switching and sd -> ram is with a microcontroller. I'm planning on using an avr when I add sd cards to my project. With a microcontroller, you can remove alot of logic for your pio and have the microcontroller pull down the z80's wait pin on an io request. I noticed you're looking at some tssop/flat pack parts. Unless you have access to custom circuit boards, I recommend sticking to dip so you can use simpler through hole prototyping/assembly. I haven't used a pic for io before, you'll have to look around for a microcontroller that would work. Before you start looking for parts, get a preliminary plan for the specs you want your project to have.
Title: Re: Build your own Z80 calculator
Post by: Keoni29 on September 28, 2011, 12:15:53 pm
At least 120x96 px display. 4 level grayscale of course. And sound is very important for games(nah just very cool)
Title: Re: Build your own Z80 calculator
Post by: aeTIos on September 28, 2011, 12:29:21 pm
noo! 65535 lv flickerless grayscale! and bluescale!
Title: Re: Build your own Z80 calculator
Post by: Keoni29 on September 28, 2011, 01:12:18 pm
Bluescale ftw ;D
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 28, 2011, 04:19:00 pm
I want my project to have an lcd that's not too big or small and I want it to have grayscale and some sort of sound output. I definitely want it to have sd card support. Guys I really don't know much about all of this can some one point me somewhere I can learn more about this stuff. I know some digital electronics but I'm not the best at all of this.
Title: Re: Build your own Z80 calculator
Post by: samebull (metagross111) on September 28, 2011, 05:47:00 pm
Hrm, I'd rather want to make a "calculator" with only a d-pad, about 4 buttons and something like MirageOS as -actual- os in stead of a shell. Just for playing games, like some cheap Chinese handheld :P

hrm

Dpad, four buttons, z80

Didn't nintendo  make one of those things
Title: Re: Build your own Z80 calculator
Post by: Eeems on September 28, 2011, 06:49:09 pm
Hrm, I'd rather want to make a "calculator" with only a d-pad, about 4 buttons and something like MirageOS as -actual- os in stead of a shell. Just for playing games, like some cheap Chinese handheld :P

hrm

Dpad, four buttons, z80

Didn't nintendo  make one of those things
It was a modified z80 so not technically a z80.
Title: Re: Build your own Z80 calculator
Post by: Camdenmil on September 28, 2011, 07:46:52 pm
It was close enough to be emulated at a decent speed on a real z80.

I want my project to have an lcd that's not too big or small and I want it to have grayscale and some sort of sound output. I definitely want it to have sd card support. Guys I really don't know much about all of this can some one point me somewhere I can learn more about this stuff. I know some digital electronics but I'm not the best at all of this.
Look at z80.info (http://z80.info), that's a good place to start on hardware information on the z80. As for memory, if you do what the TI calcs do with bank switching, you can address up to 4mb of memory in 256 16k pages with 4 pages swapped in at a time. For io, you can use discreet logic or a microcontroller. I've only used a microcontroller with an sd card, so I don't know how to use an sd card directly with a z80 unless you were going to do spi completely in software. For io and things like the bank switching logic, look at the 74 series of logic ics. I've only used a z80 with 74LS chips, 74HCT should work, I will test with the 74HC series soon.
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 28, 2011, 08:19:46 pm
Alright guys I'll take a look at this stuff, thanks for the fast reply! :)
Title: Re: Build your own Z80 calculator
Post by: boot2490 on September 28, 2011, 08:42:10 pm
I would LOOOOOVE to see that `v`
Title: Re: Build your own Z80 calculator
Post by: kingofthebacon on September 28, 2011, 09:07:44 pm
Okay so I was looking at bank switching is it possible to utilize all of the memory, or only the selected memory your using?
Title: Re: Build your own Z80 calculator
Post by: calc84maniac on September 28, 2011, 09:15:37 pm
Hrm, I'd rather want to make a "calculator" with only a d-pad, about 4 buttons and something like MirageOS as -actual- os in stead of a shell. Just for playing games, like some cheap Chinese handheld :P

hrm

Dpad, four buttons, z80

Didn't nintendo  make one of those things

SEGA did, Game Gear :D
Title: Re: Build your own Z80 calculator
Post by: boot2490 on September 29, 2011, 12:40:55 pm
So, it should have a modified TI OS that is designed only for opening programs, and an enhanced processor so that BASIC isn't dreadfully slow. Speed knob? And couldn't you just BUY a z80? I don't see why you should have to build it from scratch. I would like to make this...
Title: Re: Build your own Z80 calculator
Post by: Camdenmil on September 29, 2011, 09:38:03 pm
With this kind of project, you buy a z80. A z80 is just a processor, you need support hardware to make it do things. What good is a cpu without a motherboard, ram, hard drive, ect.
Okay so I was looking at bank switching is it possible to utilize all of the memory, or only the selected memory your using?
The z80 can address 64k of ram at a time. Bank switching divides all the memory into separate chunks. The TI calcs divide it into 16k chunks. You can use all the memory by changing the page that is swapped into a certain part of the 64k address space. If you use 16k chunks, you can access up to 4mb of ram and swap in 4 pages at a time.
Title: Re: Build your own Z80 calculator
Post by: Keoni29 on September 30, 2011, 04:40:42 am
Nope you have to select a bank. You cant select all the banks at once
Title: Re: Build your own Z80 calculator
Post by: willrandship on November 22, 2011, 06:31:41 pm
You don't need to select them all at once, Keoni. You can switch between them in-program, allowing access to all 64k.

And I still ask: If you're building another calc, why oh why do you want a z80? They're ancient! You can get significantly cheaper, faster, more power efficient CPUs like the cortex M0, which are actually simpler to program Asm for in several ways.