Looking for 4 program ideas
Looking for 4 program ideas
Greetings!
Working on a portable homebrew computer project and I am trying to figure out a few things. One thing is the final four programs that will be put in the program ROM. The program ROM, or pROM, is a 128k ROM banked into an 8k area, allowing for 16 different built-in programs. I've already figured out what the first 12 should be, but I can't think of anything for the last 4. That's why I'm posting this, as I'm hoping I could get some ideas from everyone else.
Here's the main restricting factors: the program will need to fit into 8k, the computer will have 32k of RAM, and the display is going to be a NHD-240128WG-ATFH-VZ# (240px by 128px, text or graphics). There will be serial (W65C51N) and parallel (W65C22S) ports - though the parallel port is really more like a commodore user port in terms of pinout.
Working on a portable homebrew computer project and I am trying to figure out a few things. One thing is the final four programs that will be put in the program ROM. The program ROM, or pROM, is a 128k ROM banked into an 8k area, allowing for 16 different built-in programs. I've already figured out what the first 12 should be, but I can't think of anything for the last 4. That's why I'm posting this, as I'm hoping I could get some ideas from everyone else.
Here's the main restricting factors: the program will need to fit into 8k, the computer will have 32k of RAM, and the display is going to be a NHD-240128WG-ATFH-VZ# (240px by 128px, text or graphics). There will be serial (W65C51N) and parallel (W65C22S) ports - though the parallel port is really more like a commodore user port in terms of pinout.
-------------------------------
Have an awesome day!
Have an awesome day!
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Looking for 4 program ideas
ashtons wrote:
There will be serial (W65C51N) and parallel (W65C22S) ports - though the parallel port is really more like a commodore user port in terms of pinout.
You might want to consider an alternative to the 65C51. The WDC version has a significant hardware bug on the transmit side (the stuck TxD ready bit) which needs a workaround in the driver. The stuck bit prevents the use of interrupt-driven code and requires a pacing mechanism to avoid data corruption. We have discussion on this around here.
If you don't plan to clock this machine too fast you may be better off using the Rockwell 65C51, which doesn't have any hardware errata. Or, use some other UART, e.g., the NXP 28L92.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Looking for 4 program ideas
Welcome!
I'd be interested to know what the first 12 programs are.
Here are some ideas, depending a bit on the peripherals you'd have:
- a calculator
- an alarm clock
- a simon type game
- a lunar landing type game
- a cows and bulls type game
- a basic interpreter (perhaps tinybasic)
- a VTL interpreter
- some kind of rolling demo as a crowd-pleaser
I'd be interested to know what the first 12 programs are.
Here are some ideas, depending a bit on the peripherals you'd have:
- a calculator
- an alarm clock
- a simon type game
- a lunar landing type game
- a cows and bulls type game
- a basic interpreter (perhaps tinybasic)
- a VTL interpreter
- some kind of rolling demo as a crowd-pleaser
Re: Looking for 4 program ideas
ashtons wrote:
I've already figured out what the first 12 should be, but I can't think of anything for the last 4.
Just a suggestion. Have fun and keep us posted!
-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
https://laughtonelectronics.com/Arcana/ ... mmary.html
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: Looking for 4 program ideas
ashtons wrote:
... the display is going to be a NHD-240128WG-ATFH-VZ# (240px by 128px, text or graphics) ...
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
Re: Looking for 4 program ideas
Many languages will fit into 8k of ROM. To name a few: Forth, Tiny Pascal, VTL (Very Tiny Language), LISP, some smaller advanced Basics, and even a trimmed down version of Applesoft with all its fixes.
Also a lot of common subroutines can be stored in ROM and save a lot of space in RAM, such as: Memory Move routines, Input routines, Fonts, cursor sprites, etc.
I take it your project does not include a character ROM, so you will need all the character bitmaps and a character generator to print to the screen.
Also a lot of common subroutines can be stored in ROM and save a lot of space in RAM, such as: Memory Move routines, Input routines, Fonts, cursor sprites, etc.
I take it your project does not include a character ROM, so you will need all the character bitmaps and a character generator to print to the screen.
Re: Looking for 4 program ideas
IamRob wrote:
Many languages will fit into 8k of ROM. To name a few: Forth, Tiny Pascal, VTL (Very Tiny Language), LISP, some smaller advanced Basics, and even a trimmed down version of Applesoft with all its fixes.
Also a lot of common subroutines can be stored in ROM and save a lot of space in RAM, such as: Memory Move routines, Input routines, Fonts, cursor sprites, etc.
I take it your project does not include a character ROM, so you will need all the character bitmaps and a character generator to print to the screen.
Also a lot of common subroutines can be stored in ROM and save a lot of space in RAM, such as: Memory Move routines, Input routines, Fonts, cursor sprites, etc.
I take it your project does not include a character ROM, so you will need all the character bitmaps and a character generator to print to the screen.
As for the character ROM part, the display's controller IC has a built-in CGROM with 128 characters. It appears the module also has RAM on-board as well, and a portion of that can be set aside as CGRAM. So, I'll only really have to worry about the latter 128 characters.
BigEd wrote:
Welcome!
I'd be interested to know what the first 12 programs are.
Here are some ideas, depending a bit on the peripherals you'd have:
- a calculator
- an alarm clock
- a simon type game
- a lunar landing type game
- a cows and bulls type game
- a basic interpreter (perhaps tinybasic)
- a VTL interpreter
- some kind of rolling demo as a crowd-pleaser
I'd be interested to know what the first 12 programs are.
Here are some ideas, depending a bit on the peripherals you'd have:
- a calculator
- an alarm clock
- a simon type game
- a lunar landing type game
- a cows and bulls type game
- a basic interpreter (perhaps tinybasic)
- a VTL interpreter
- some kind of rolling demo as a crowd-pleaser
- BASIC (might be tinybasic, might be EhBASIC, might be custom, who knows!)
- A combination assembler and machine monitor
- A code and text file editor
- A record file editor
- A bitmap editor
- A font editor (could probably be merged with the bitmap editor)
- A beep sequencer program (make music)
- The corresponding viewer programs
- A file manager
- A terminal program
As for your ideas:
- Calculator: Could be useful.
- Alarm Clock: No RTC, impossible
- The Games: Will look into putting at least one game in the ROMs. Also, cows and bulls??
- Demo: makes sense to add.
Dr Jefyll wrote:
ashtons wrote:
I've already figured out what the first 12 should be, but I can't think of anything for the last 4.
Just a suggestion. Have fun and keep us posted!
-- Jeff
barrym95838 wrote:
ashtons wrote:
... the display is going to be a NHD-240128WG-ATFH-VZ# (240px by 128px, text or graphics) ...
-------------------------------
Have an awesome day!
Have an awesome day!
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Looking for 4 program ideas
Quote:
- Alarm Clock: No RTC, impossible
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: Looking for 4 program ideas
GARTHWILSON wrote:
Quote:
- Alarm Clock: No RTC, impossible
-------------------------------
Have an awesome day!
Have an awesome day!
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Looking for 4 program ideas
ashtons wrote:
I honestly didn't think of that. That'll actually be useful. Whenever I think of an RTC, I think of something like a Dallas RTC, not a register on a general IO chip. But, then again, didn't the C64 do something similar with its CIAs?
Dedicated RTC ICs generally don't have such fine resolution. I used one that only had one-second resolution. Many have 100ms resolution. With the VIA, you'll probably have 10ms resolution, or finer if you run at 10MHz or above. One of the things I use it for is timing for key debouncing and repeat speed and the delay before the auto-repeat starts. For that, 100ms (1/10th second) is too coarse. Same thing with things like timing a quick LED flash to indicate low battery, where the length of flash, or the delay between flashes, gives an accurate idea of how much battery life is left. And BTW, since an ISR is updating the RAM time bytes, many tasks taking turns running can access the same bytes to see when it's time to do their next action, and if they haven't reached the target time, pass control to the next task. I've done multitasking like this even on PIC16 microcontrollers, switching tasks over 10,000 times per second, and all timed events run on schedule, without interfering with each other.
Do read the 6502 primer which was written to answer the questions and problems that kept coming up on the forum about making your own 6502 computer, and to a lesser extent, starting to program it. You'll find other things on the site to be valuable too. For example, the multitasking stuff mentioned above is in the article about that, at http://wilsonminesco.com/multitask/ .
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Looking for 4 program ideas
ashtons wrote:
GARTHWILSON wrote:
Quote:
- Alarm Clock: No RTC, impossible
Quote:
Whenever I think of an RTC, I think of something like a Dallas RTC, not a register on a general IO chip.
An RTC is a piece of hardware. It would be used to set the time_t clock during bootup. Thereafter, time references would be to time_t, which is in RAM. That has two advantages, one of which is RAM is much faster than an I/O access to an RTC. The other, which Garth mentioned, is granularity. Timekeeping in software can be very fine if your jiffy IRQ occurs often enough.
The mechanism for maintaining time_t, as Garth explained, is the jiffy IRQ generated by the 65C22's timer. That timer is slaved to the Ø2 clock, which is usually generated by a crystal oscillator. Such oscillators can exhibit good long-term drift, which means timekeeping can be quite stable. I use a similar arrangement in my POC units—though not with a 65C22, and one of those machines drifts only a fraction of a second per month. That's better than the alarm clock in my wife's office.
Quote:
But, then again, didn't the C64 do something similar with its CIAs?
In the C-64, timer A of CIA #1 is set up to interrupt at approximately 60 Hz in an NTSC unit, or approximately 50 Hz in a PAL unit. Timekeeping is not particularly accurate. Firstly, it's not possible to program the CIA timers to interrupt exactly at either of those speeds, since Ø2 is not an exact multiple of either rate. Secondly, serial bus activity steals IRQs away from the keyboard scan and TI$ jiffy clock update code, causing a loss of time. Even worse, using the VIC-II raster interrupt, a common technique in games, can further disrupt timekeeping.
Any C-64 application in which an accurate time-of-day was needed used the TOD clock in one of the CIAs. Those are driven from the power line frequency, making for good long-term accuracy.
In the C-128 when running in 128 mode, jiffy IRQs are caused by the VIC raster interrupt, which is synced to the power line frequency. Hence TI$ is a little more reliable...at least until serial bus activity starts up. Again, the CIA TOD clock is a better choice.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Looking for 4 program ideas
Alright.
(Also, quick question for Garth - what is the n in the T1 period equation on your website?)
(Also, quick question for Garth - what is the n in the T1 period equation on your website?)
-------------------------------
Have an awesome day!
Have an awesome day!
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Looking for 4 program ideas
ashtons wrote:
Alright.
(Also, quick question for Garth - what is the n in the T1 period equation on your website?)
(Also, quick question for Garth - what is the n in the T1 period equation on your website?)
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: Looking for 4 program ideas
GARTHWILSON wrote:
ashtons wrote:
Alright.
(Also, quick question for Garth - what is the n in the T1 period equation on your website?)
(Also, quick question for Garth - what is the n in the T1 period equation on your website?)
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: Looking for 4 program ideas
In that case, I'm wondering what the hell I'm supposed to do with the 71.728 I got when I solved for n, putting 10ns in for T (the T1 period) and putting in 7.3728 MHz in for p (phi2). Am I supposed to just round down the phi2 to 7 MHz? If so I would get a 68 as a result instead, which makes more sense.
-------------------------------
Have an awesome day!
Have an awesome day!