6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Sep 23, 2024 3:25 am

All times are UTC




Post new topic Reply to topic  [ 32 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Why no "gameboys"?
PostPosted: Sun Nov 24, 2019 9:45 am 
Offline

Joined: Sun Nov 24, 2019 9:14 am
Posts: 12
Hi,

So I have a proper newbie question. I'm at the early research stage for designing a 6502-based computer of my own. I want to make a "gameboy-esque" handheld gaming device.

I've made a couple of similar things using an AVR MCU core previously but have grown frustrated with the Harvard architecture not being well suited to swapping games.

I want to try building something simple based around the 6502 with a bit of RAM, bit of ROM to handle loading games from an SD card, a VIA for buttons and a little OLED display. The ubiquitous SSD-powered OLEDs all have a 'secret' 8-bit parallel mode which I'm pretty sure can map to the address and data bus.

So, my question is: why hasn't anyone else done this? There are loads of 'Arduino' based gaming devices out there but barely any based on this otherwise very popular platform.

I guess I'm just worried I'm missing something that has doomed me to failure before I even start!

Thanks
-Mike


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Sun Nov 24, 2019 11:49 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
There are millions of 6502s out there in Tamogochis, electronic dictionaries and other handheld game devices. Sunplus created an extended 6502 with a builtin LCD driver that is used in lots of them.

No one has ever used a MOS or WDC chip directly because its too big, too power hungry and needs lots of other support chips. You could probably make something with one of the microcontroller versions like the 65C134 or 65C265 but a custom ASIC would be the best option.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Last edited by BitWise on Sun Nov 24, 2019 8:41 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Sun Nov 24, 2019 4:43 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1467
Location: Scotland
MalphasWats wrote:
Hi,

So I have a proper newbie question. I'm at the early research stage for designing a 6502-based computer of my own. I want to make a "gameboy-esque" handheld gaming device.

I've made a couple of similar things using an AVR MCU core previously but have grown frustrated with the Harvard architecture not being well suited to swapping games.


An interesting way round that is to have the "cartridge" contain the actual ATmega... So rather than a traditional "ROM" cartridge, you get the actual CPU with on-board FLASH. Then the motherboard can contain the base graphics/sound, etc. widgetry...


MalphasWats wrote:

I want to try building something simple based around the 6502 with a bit of RAM, bit of ROM to handle loading games from an SD card, a VIA for buttons and a little OLED display. The ubiquitous SSD-powered OLEDs all have a 'secret' 8-bit parallel mode which I'm pretty sure can map to the address and data bus.

So, my question is: why hasn't anyone else done this? There are loads of 'Arduino' based gaming devices out there but barely any based on this otherwise very popular platform.

I guess I'm just worried I'm missing something that has doomed me to failure before I even start!


It's "hard" in that it's not easy like Arduino, STM (ARM) with PC base development environments, etc. so the lazy don't bother.

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Sun Nov 24, 2019 5:17 pm 
Offline

Joined: Sun Nov 24, 2019 9:14 am
Posts: 12
Thanks chaps - it seems the answer is somewhere in the realm of "because it's a stupid thing to do" which kinda sits right in my wheelhouse for projects.

I did the 'cartridge' idea with a previous iteration of the project I linked above. The mechanical design is harder for that one though and that's in the bottom of my skills ranking!

I've been looking at doing something using the QFP versions of the various chips to keep the size down a bit.

I found a source of 128x128 pixel 16-grayscale OLEDs which I thought would make a real improvement to the 1-colour ones I've been using. thought it could be cool to try a new architecture too but was suspicious that I was the only person to have thought of it!


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Sun Nov 24, 2019 5:38 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
Welcome! Not stupid, but staying within a battery power budget and a small form factor could be tricky. But then batteries are now much better than they used to be. And you can these days get a 6502 in a small square package too (44 pin QFP) which might help. Even better if a microcontroller option gives you some help in reducing chip count.

Edit: there are a few projects listed on hackaday's project portal:
https://hackaday.io/search?term=6502+game
(They may be finished and working, or barely started!)


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Sun Nov 24, 2019 8:39 pm 
Offline

Joined: Sun Nov 24, 2019 9:14 am
Posts: 12
Huh, I've just been browsing the W65C134 microcontroller datasheet. Why did I not know about this thing!? It's basically everything I've ever wanted from an AVR MCU!!


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Sun Nov 24, 2019 8:53 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
MalphasWats wrote:
Huh, I've just been browsing the W65C134 microcontroller datasheet. Why did I not know about this thing!? It's basically everything I've ever wanted from an AVR MCU!!

The WDC W65C134SXB board is quite reasonably priced but I think the W65C265SXB is better, it does everything the 134 can do but also gives you 16-bit register modes and a larger addressable memory.
https://www.tindie.com/products/wdc/w65c134sxb/
https://www.tindie.com/products/wdc/w65c265sxb/

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Mon Nov 25, 2019 11:11 am 
Offline

Joined: Sun Oct 13, 2019 6:20 am
Posts: 36
Location: Pennsylvania, USA
The handheld Atari Lynx ran on a 65SC02, if I recall correctly. Which was a CMOS 6502 without bit instructions.

Coincidentally, I recall it having a battery life, so short, that you could bake muffins to it. I wonder why. lol


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Mon Nov 25, 2019 11:24 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
EvilSandwich wrote:
The handheld Atari Lynx ran on a 65SC02, if I recall correctly. Which was a CMOS 6502 without bit instructions.

Coincidentally, I recall it having a battery life, so short, that you could bake muffins to it. I wonder why. lol

A 65SC02 core in a custom CMOS package along with sound, video and other bits of hardware. Not good battery life:
Quote:
Battery holder (six AA) 4–5 hours (Lynx I) 5–6 hours (Lynx II)

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Mon Nov 25, 2019 11:31 am 
Offline

Joined: Sun Nov 24, 2019 9:14 am
Posts: 12
When I was a kid my best friend's uncle had a Lynx. I didn't realise it was 6502-based!

I do remember most handhelds had pretty poor battery life back then, although it was also before LED backlights were a thing. OLED displays are pretty low drain these days so hopefully I could squeeze a bit more out of a set of AAAs :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Mon Nov 25, 2019 11:53 am 
Offline

Joined: Sun Oct 13, 2019 6:20 am
Posts: 36
Location: Pennsylvania, USA
The Atari Lynx was an interesting piece of hardware under the hood with a few decent games.

You're better off using an emulator if you wanna test programs on it though. The actual physical hardware on it was notoriously bad. Particularly the screen, which was extremely prone to ghost images and blurring.

But yeah, most old school handheld devices ran on some kind of custom Z80 like the Sega Game Gear. Or a custom 8088 like the criminally underrated Bandai Wonder Swan. Or, in the case of the old gameboy, a weird and cleverly designed 8088/Z80 hybrid. The Atari Lynx was pretty unique in running on a 6502.

Edit:
It just occurred to me. No need to chain yourself to the fleeting battery life of disposal batteries, if you're making a handheld device. Its not like this is the early 90's anymore. Why not just install a rechargeable battery setup, so you just need to plug it in for a couple hours when the 6502's power draw ultimately kills it?

Not all old tech is worth reviving. The giant pile of dead AA batteries my Game Gear killed is proof of that. lol

https://www.jameco.com/webapp/wcs/store ... egory=4715


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Mon Nov 25, 2019 12:40 pm 
Offline

Joined: Sun Nov 24, 2019 9:14 am
Posts: 12
Yeah, all my previous projects have built-in 3.7v LiPo cells, they're pretty easy to work with most of the time. The AAAs thing was just something I was considering.


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Mon Nov 25, 2019 12:43 pm 
Offline

Joined: Sun Oct 13, 2019 6:20 am
Posts: 36
Location: Pennsylvania, USA
MalphasWats wrote:
Yeah, all my previous projects have built-in 3.7v LiPo cells, they're pretty easy to work with most of the time. The AAAs thing was just something I was considering.

Oh, you're wayyyyy ahead of me then. What kind of screen are you thinking of using?

I admit, I've never installed anything more complex than a 16x4 Text LCD display on my bread board projects.


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Mon Nov 25, 2019 1:36 pm 
Offline

Joined: Sun Nov 24, 2019 9:14 am
Posts: 12
EvilSandwich wrote:
Oh, you're wayyyyy ahead of me then. What kind of screen are you thinking of using?

I admit, I've never installed anything more complex than a 16x4 Text LCD display on my bread board projects.


I want to try and use this grayscale 128x128 OLED display. I'm currently working on a breakout board to get access to the 8-bit 6800 interface, rather than the SPI that they always seem to have! It's not a perfect solution because it doesn't have any direct addressing to the graphics RAM, but once it's configured, it's really just about writing bytes to it as fast as possible. I think it would be fairly trivial to map the Command/Data pin to the address bus, and then using it in 8-bit mode means no faffing around with serial devices to get the data in. It does also have a read mode, but probably much too slow to actually use because it can't be mapped directly, so would take ~8k of RAM for a buffer.

I've never built anything with a 6502-based brain though, only AVR and ARM microcontrollers so far, so it should be quite fun to try!


Top
 Profile  
Reply with quote  
 Post subject: Re: Why no "gameboys"?
PostPosted: Mon Nov 25, 2019 6:05 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8512
Location: Southern California
EvilSandwich wrote:
The handheld Atari Lynx ran on a 65SC02, if I recall correctly. Which was a CMOS 6502 without bit instructions.

Coincidentally, I recall it having a battery life, so short, that you could bake muffins to it. I wonder why. lol

That wouldn't be because of the 65SC02 though. Not counting bus loading, its maximum current draw was 4mA/MHz, and 10µA in standby. WDC's max is 500µA/MHz @ 5V (less at lower voltages), and 1µA in standby. I designed a computer for a product in the late 1980's for work, using a Rockwell R65C02, 8KB CMOS SRAM and 32KB CMOS EPROM, a 1x16 intelligent character LCD module, a Saronix real-time clock IC with integrated crystal, and some logic gates for glue and I/O, and ran it most of the time at 170kHz to save battery power, and stepped it up to 1MHz when we had to do a lot of floating-point arithmetic. The entire computer took 2mA when turned on. When turned off, it took just a few µA to keep the RAM alive and keep the RTC running.

About batteries: I've bought 100 AA alkaline batteries for as little as $16.

_________________
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  [ 32 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 11 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: