Looking for 4 program ideas
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Looking for 4 program ideas
I'm sure you mean ms, not ns. (1ms is 1,000,000ns.) If you have an odd clock frequency, what you can do is have the ISR add or subtract a tick every so many, in the RAM variables. This also works for correcting for an oscillator that's a little off, like if you were able to compute the perfect number but you find the clock gets ahead or behind by a few seconds a month.
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:
I'm sure you mean ms, not ns. (1ms is 1,000,000ns.) If you have an odd clock frequency, what you can do is have the ISR add or subtract a tick every so many, in the RAM variables. This also works for correcting for an oscillator that's a little off, like if you were able to compute the perfect number but you find the clock gets ahead or behind by a few seconds a month.
Still cracking away at figuring out what the value should be. I'm still not entirely sure if I should be getting a value of hex 44 or hex 47, since you did state that it's meant to be a 16 bit value.
To throw my two cents in, shouldn't the value go up with faster clock speeds since there are more cycles in a second, and therefore more cycles in a millisecond? So why am I getting a waaay lower value? Am I doing the equation wrong? (which, since I suck at math, would make sense)
-------------------------------
Have an awesome day!
Have an awesome day!
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: Looking for 4 program ideas
I put that T1 period = n+2 / φ2 freq, depending on the space to group things appropriately, instead of using parentheses. I guess I should put the parentheses in. If the desired T1 period is 10ms and your φ2 freq is 7.3728 MHz, you'd have:
10ms = (n+2) / φ2_freq
10ms x φ2_freq = n+2 = .01 x 7.3728M = .01 x 7,372,800 = 73,728.
Subtracting 2 to get n, you get 73,726, which is $11FFE. Oops. Too big to fit in a 16-bit number. You'll have to down to 8.8889ms or less. 8.8889 is not a nice, round number though. You'll probably want to go down to 5ms, and if you still have a 10ms resolution in your variables, increment every second interrupt, keeping a flag byte and toggling it at each interrupt and examining it to see if it's time to do the other stuff. You could clear the byte with STZ, and set it with DEC (since 00 turns to $FF with a decrement), then test it with BIT (remember it transfers bit 7 to the N flag regardless of what's in A, then you can do a BPL or BMI), or with LDA (or LDX or LDY) and then test it with BEQ or BNE. Anyway, the number would be:
5ms = (n+2) / φ2_freq
5ms x φ2_freq = n+2 = .005 x 7.3728M = .005 x 7,372,800 = 36,864
Subtracting 2 to get n, you get 36,862, which is $8FFE.
In both cases, the results are integers, with no fractional part; so if your crystal frequency has no error, you should have perfect timing.
Hopefully I did all that correctly. It does sound about right though.
10ms = (n+2) / φ2_freq
10ms x φ2_freq = n+2 = .01 x 7.3728M = .01 x 7,372,800 = 73,728.
Subtracting 2 to get n, you get 73,726, which is $11FFE. Oops. Too big to fit in a 16-bit number. You'll have to down to 8.8889ms or less. 8.8889 is not a nice, round number though. You'll probably want to go down to 5ms, and if you still have a 10ms resolution in your variables, increment every second interrupt, keeping a flag byte and toggling it at each interrupt and examining it to see if it's time to do the other stuff. You could clear the byte with STZ, and set it with DEC (since 00 turns to $FF with a decrement), then test it with BIT (remember it transfers bit 7 to the N flag regardless of what's in A, then you can do a BPL or BMI), or with LDA (or LDX or LDY) and then test it with BEQ or BNE. Anyway, the number would be:
5ms = (n+2) / φ2_freq
5ms x φ2_freq = n+2 = .005 x 7.3728M = .005 x 7,372,800 = 36,864
Subtracting 2 to get n, you get 36,862, which is $8FFE.
In both cases, the results are integers, with no fractional part; so if your crystal frequency has no error, you should have perfect timing.
Hopefully I did all that correctly. It does sound about right though.
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?
- Sheep64
- In Memoriam
- Posts: 311
- Joined: 11 Aug 2020
- Location: A magnetic field
Re: Looking for 4 program ideas
I highly recommend the documentary Tetris: From Russia with Love. Even if you're not into gaming, it is a wonderful slice of 1980s technology with period footage and interviews with pivotal characters. I believe that cbmeeks, in particular, will appreciate it. If you're in a similar mood, you may also appreciate Moleman's demoscene documentary. This may also provide inspiration for a rolling demo.
Despite that, I strongly recommend against implementing Tetris because it is highly addictive and productivity will drop to zero. I mentioned Tetris to Sheep20. After "What's Tetris" and watching the documentary, productivity returned approximately two months later. At one point, Sheep20 was playing a JavaScript version of Tetris over Citrix. That's hugely addicted.
Given the overlap of functionality, it should be possible to fit a Tetris clone and maze game into 8KB. Or perhaps a maze game and a Boulderdash clone. Or perhaps Boulderdash and a Candy Crush clone. It is also possible to fit Eliza into 8KB. Some people find Eliza to be an amusingly poor attempt at Artificial Intelligence. Others find it more helpful than Cognitive Behavioral Therapy.
An ex-classmate's cousin wrote a VIC20 lake fishing simulator. When I first saw it, I thought that it was the most dull, inane game that I'd ever seen. However, I'm now beginning to appreciate the idea. Starting with $100, choose your rod, reel, tackle and bait. Then choose one of the 10 lakes which were all terrible puns. (There's further scope for puns with RAM-bow trout, carptridge and I'll skip the obvious joke but it was written in BASIC.) Choose competitive fishing or quiet contemplation. There was a particular technique to cast a reel using keyboard or joystick and the display had an underwater camera view of the nearby fish. Each lake has a different variety of fish with different temperament and different attraction to bait. After selling your catches - and possibly collecting prize money - you can buy a better rod, reel and bait before trying another lake.
If you want something more nurturing, you could write an aquarium simulator or other virtual pet system.
The best suggestion for a game is inspired by the Crazy Ideas section of Reddit. Clippy Land is like Mario Bros. which was originally 6502 only. Mario the Plumber and friends are replaced with Clippy the Paper Clip and the lesser known Microsoft Office Assistants. (Can you believe there were 11 of them?) Unlike Paper Mario, Clippy gets bonus items from origami cube loot boxes and dodges origami monsters before rescuing Power Pup. Or Microsoft Bob or something. The sequel, Super Clippy Land, only runs on 65816. Also look out for Klippy Kart, Clippy World and the film featuring the resurrected voice of Bob Hoskins.
Nintendo has Mario. Sega has Sonic. Amiga has Zool. Even the Sinclair Spectrum has Horace. We have the abandonware which Microsoft would rather forget.
Despite that, I strongly recommend against implementing Tetris because it is highly addictive and productivity will drop to zero. I mentioned Tetris to Sheep20. After "What's Tetris" and watching the documentary, productivity returned approximately two months later. At one point, Sheep20 was playing a JavaScript version of Tetris over Citrix. That's hugely addicted.
Given the overlap of functionality, it should be possible to fit a Tetris clone and maze game into 8KB. Or perhaps a maze game and a Boulderdash clone. Or perhaps Boulderdash and a Candy Crush clone. It is also possible to fit Eliza into 8KB. Some people find Eliza to be an amusingly poor attempt at Artificial Intelligence. Others find it more helpful than Cognitive Behavioral Therapy.
An ex-classmate's cousin wrote a VIC20 lake fishing simulator. When I first saw it, I thought that it was the most dull, inane game that I'd ever seen. However, I'm now beginning to appreciate the idea. Starting with $100, choose your rod, reel, tackle and bait. Then choose one of the 10 lakes which were all terrible puns. (There's further scope for puns with RAM-bow trout, carptridge and I'll skip the obvious joke but it was written in BASIC.) Choose competitive fishing or quiet contemplation. There was a particular technique to cast a reel using keyboard or joystick and the display had an underwater camera view of the nearby fish. Each lake has a different variety of fish with different temperament and different attraction to bait. After selling your catches - and possibly collecting prize money - you can buy a better rod, reel and bait before trying another lake.
If you want something more nurturing, you could write an aquarium simulator or other virtual pet system.
The best suggestion for a game is inspired by the Crazy Ideas section of Reddit. Clippy Land is like Mario Bros. which was originally 6502 only. Mario the Plumber and friends are replaced with Clippy the Paper Clip and the lesser known Microsoft Office Assistants. (Can you believe there were 11 of them?) Unlike Paper Mario, Clippy gets bonus items from origami cube loot boxes and dodges origami monsters before rescuing Power Pup. Or Microsoft Bob or something. The sequel, Super Clippy Land, only runs on 65816. Also look out for Klippy Kart, Clippy World and the film featuring the resurrected voice of Bob Hoskins.
Nintendo has Mario. Sega has Sonic. Amiga has Zool. Even the Sinclair Spectrum has Horace. We have the abandonware which Microsoft would rather forget.
Re: Looking for 4 program ideas
ashtons wrote:
- BASIC (might be tinybasic, might be EhBASIC, might be custom, who knows!)
Bill
Re: Looking for 4 program ideas
BillO wrote:
ashtons wrote:
- BASIC (might be tinybasic, might be EhBASIC, might be custom, who knows!)
Sheep64 wrote:
I highly recommend the documentary Tetris: From Russia with Love. Even if you're not into gaming, it is a wonderful slice of 1980s technology with period footage and interviews with pivotal characters. I believe that cbmeeks, in particular, will appreciate it. If you're in a similar mood, you may also appreciate Moleman's demoscene documentary. This may also provide inspiration for a rolling demo.
Despite that, I strongly recommend against implementing Tetris because it is highly addictive and productivity will drop to zero. I mentioned Tetris to Sheep20. After "What's Tetris" and watching the documentary, productivity returned approximately two months later. At one point, Sheep20 was playing a JavaScript version of Tetris over Citrix. That's hugely addicted.
Given the overlap of functionality, it should be possible to fit a Tetris clone and maze game into 8KB. Or perhaps a maze game and a Boulderdash clone. Or perhaps Boulderdash and a Candy Crush clone. It is also possible to fit Eliza into 8KB. Some people find Eliza to be an amusingly poor attempt at Artificial Intelligence. Others find it more helpful than Cognitive Behavioral Therapy.
An ex-classmate's cousin wrote a VIC20 lake fishing simulator. When I first saw it, I thought that it was the most dull, inane game that I'd ever seen. However, I'm now beginning to appreciate the idea. Starting with $100, choose your rod, reel, tackle and bait. Then choose one of the 10 lakes which were all terrible puns. (There's further scope for puns with RAM-bow trout, carptridge and I'll skip the obvious joke but it was written in BASIC.) Choose competitive fishing or quiet contemplation. There was a particular technique to cast a reel using keyboard or joystick and the display had an underwater camera view of the nearby fish. Each lake has a different variety of fish with different temperament and different attraction to bait. After selling your catches - and possibly collecting prize money - you can buy a better rod, reel and bait before trying another lake.
If you want something more nurturing, you could write an aquarium simulator or other virtual pet system.
The best suggestion for a game is inspired by the Crazy Ideas section of Reddit. Clippy Land is like Mario Bros. which was originally 6502 only. Mario the Plumber and friends are replaced with Clippy the Paper Clip and the lesser known Microsoft Office Assistants. (Can you believe there were 11 of them?) Unlike Paper Mario, Clippy gets bonus items from origami cube loot boxes and dodges origami monsters before rescuing Power Pup. Or Microsoft Bob or something. The sequel, Super Clippy Land, only runs on 65816. Also look out for Klippy Kart, Clippy World and the film featuring the resurrected voice of Bob Hoskins.
Nintendo has Mario. Sega has Sonic. Amiga has Zool. Even the Sinclair Spectrum has Horace. We have the abandonware which Microsoft would rather forget.
Despite that, I strongly recommend against implementing Tetris because it is highly addictive and productivity will drop to zero. I mentioned Tetris to Sheep20. After "What's Tetris" and watching the documentary, productivity returned approximately two months later. At one point, Sheep20 was playing a JavaScript version of Tetris over Citrix. That's hugely addicted.
Given the overlap of functionality, it should be possible to fit a Tetris clone and maze game into 8KB. Or perhaps a maze game and a Boulderdash clone. Or perhaps Boulderdash and a Candy Crush clone. It is also possible to fit Eliza into 8KB. Some people find Eliza to be an amusingly poor attempt at Artificial Intelligence. Others find it more helpful than Cognitive Behavioral Therapy.
An ex-classmate's cousin wrote a VIC20 lake fishing simulator. When I first saw it, I thought that it was the most dull, inane game that I'd ever seen. However, I'm now beginning to appreciate the idea. Starting with $100, choose your rod, reel, tackle and bait. Then choose one of the 10 lakes which were all terrible puns. (There's further scope for puns with RAM-bow trout, carptridge and I'll skip the obvious joke but it was written in BASIC.) Choose competitive fishing or quiet contemplation. There was a particular technique to cast a reel using keyboard or joystick and the display had an underwater camera view of the nearby fish. Each lake has a different variety of fish with different temperament and different attraction to bait. After selling your catches - and possibly collecting prize money - you can buy a better rod, reel and bait before trying another lake.
If you want something more nurturing, you could write an aquarium simulator or other virtual pet system.
The best suggestion for a game is inspired by the Crazy Ideas section of Reddit. Clippy Land is like Mario Bros. which was originally 6502 only. Mario the Plumber and friends are replaced with Clippy the Paper Clip and the lesser known Microsoft Office Assistants. (Can you believe there were 11 of them?) Unlike Paper Mario, Clippy gets bonus items from origami cube loot boxes and dodges origami monsters before rescuing Power Pup. Or Microsoft Bob or something. The sequel, Super Clippy Land, only runs on 65816. Also look out for Klippy Kart, Clippy World and the film featuring the resurrected voice of Bob Hoskins.
Nintendo has Mario. Sega has Sonic. Amiga has Zool. Even the Sinclair Spectrum has Horace. We have the abandonware which Microsoft would rather forget.
Hopefully I got everything from that. This is all giving me a lot to think about in terms of what the game could be, and also how to do a rolling demo.
-------------------------------
Have an awesome day!
Have an awesome day!
- Sheep64
- In Memoriam
- Posts: 311
- Joined: 11 Aug 2020
- Location: A magnetic field
Re: Looking for 4 program ideas
ClippyLand is only an idea. However, much like Snow White and the Seven Samuri, it is one of those ideas which may yet become reality.
Anyhow, I have an absolute winner of an idea for a 6502 game, although it might not fit into 8KB: Dance Dance Revolution: PETSCII Chip Tune Edition. For those unfamiliar with dance and guitar games, a special peripheral is required such as a floor mat with switch matrix. The player then has to follow actions on screen while being distracted with unrelated visuals. Long sequences of acurate inputs obtain bonus points. Like bowling, long sequences of proficient action obtain a very outsized score.
These musical games usually have a large selection of tunes. The music (with album covers) can be previewed from joystick type menu system. This part alone works like a very capable jukebox system. However, some systems may only allow advanced tunes to be attempted after easier tunes have been completed to a minimum standard.
Typically, these games use 3D vector graphics and 16 bit PCM sound. However, there is no reason why such games could not have existed in the 1990s, using lesser graphics and sequenced music. Indeed, given the popularity of MIDI ring tones for phones, a selection of music would have been quite feasible and popular. As a further example, note the similarity and difference between F-Zero for the 65816 SNES and Sony's Wipeout. Both were launch titles for game consoles. However, Wipeout only featured Sony musicians, well, on the occasions that it didn't freeze. There is definitely scope for "back-porting" a dance game to 8 bit. Indeed, the simplified graphics and sound may be preferable.
To get you started with PETSCII dance games, I have taken the listing from page 99 of the VIC20 User Manual for the "VIC person" who does jumping jacks and drawn it as a GIF animation. I believe that the legs are wonky because symmetrical legs would require use of inverse video attributes and this would complicate the listing. It can be easily corrected after the given listing has been entered correctly. A disproportionate remainder of the manual covers sound generation - despite having no sound commands. There is also a brief listing for a bouncing ball which can be expanded into a decent version of Pong. It can also be used to make the type of distracting visuals typically found in dance games.
The $0x and $Fx ranges of the SNES peripheral extension allow 30 distinct types of peripheral to be used in place of a standard SNES joypad. One of these is intended to be a dance mat. Another could be assigned to a guitar. Indeed, it would be possible make a dance/guitar game which adjusts itself according to available peripherals. Actually, I don't think that anyone has made a game which allows two or more guitarists and two or more dancers.
Anyhow, I have an absolute winner of an idea for a 6502 game, although it might not fit into 8KB: Dance Dance Revolution: PETSCII Chip Tune Edition. For those unfamiliar with dance and guitar games, a special peripheral is required such as a floor mat with switch matrix. The player then has to follow actions on screen while being distracted with unrelated visuals. Long sequences of acurate inputs obtain bonus points. Like bowling, long sequences of proficient action obtain a very outsized score.
These musical games usually have a large selection of tunes. The music (with album covers) can be previewed from joystick type menu system. This part alone works like a very capable jukebox system. However, some systems may only allow advanced tunes to be attempted after easier tunes have been completed to a minimum standard.
Typically, these games use 3D vector graphics and 16 bit PCM sound. However, there is no reason why such games could not have existed in the 1990s, using lesser graphics and sequenced music. Indeed, given the popularity of MIDI ring tones for phones, a selection of music would have been quite feasible and popular. As a further example, note the similarity and difference between F-Zero for the 65816 SNES and Sony's Wipeout. Both were launch titles for game consoles. However, Wipeout only featured Sony musicians, well, on the occasions that it didn't freeze. There is definitely scope for "back-porting" a dance game to 8 bit. Indeed, the simplified graphics and sound may be preferable.
To get you started with PETSCII dance games, I have taken the listing from page 99 of the VIC20 User Manual for the "VIC person" who does jumping jacks and drawn it as a GIF animation. I believe that the legs are wonky because symmetrical legs would require use of inverse video attributes and this would complicate the listing. It can be easily corrected after the given listing has been entered correctly. A disproportionate remainder of the manual covers sound generation - despite having no sound commands. There is also a brief listing for a bouncing ball which can be expanded into a decent version of Pong. It can also be used to make the type of distracting visuals typically found in dance games.
The $0x and $Fx ranges of the SNES peripheral extension allow 30 distinct types of peripheral to be used in place of a standard SNES joypad. One of these is intended to be a dance mat. Another could be assigned to a guitar. Indeed, it would be possible make a dance/guitar game which adjusts itself according to available peripherals. Actually, I don't think that anyone has made a game which allows two or more guitarists and two or more dancers.
- Attachments
-
- vic-person.gif (235 Bytes) Viewed 1137 times
- Sheep64
- In Memoriam
- Posts: 311
- Joined: 11 Aug 2020
- Location: A magnetic field
Re: Looking for 4 program ideas
ashtons on Fri 19 Nov 2021 wrote:
possibly make Eliza drunk?
ashtons on Fri 19 Nov 2021 wrote:
punderful