Author Topic: z80-like portable computer for <$30! (If you build one)  (Read 53725 times)

0 Members and 1 Guest are viewing this topic.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #90 on: August 24, 2013, 02:15:26 pm »
No, for consumers lcd screens are expensive. They are cheaper in bulks.
If you like my work: why not give me an internet?








Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #91 on: August 25, 2013, 12:00:07 pm »
Allright! Horizontal scrolling works now :D I have to make it nicer now because it does not clip tiles yet.
It's very very hackish. I modify the frame time for the back and front porch to get scrolling. I can scroll smoother than per pixel this way :D
« Last Edit: August 25, 2013, 12:01:33 pm by Keoni29 »
If you like my work: why not give me an internet?








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: z80-like portable computer for <$30! (If you build one)
« Reply #92 on: September 10, 2013, 01:31:28 am »
Do you mean like on the 84+CSE or just some custom ASM routines to ease game development?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #93 on: September 10, 2013, 03:07:12 am »
I modified the ASM of the video driver. It did have scrolling out of the box, but since the video driver takes tiles I have to use some accurate code to be able to scroll with clipping. In the V axis that is not a big problem. Just set the video counter to the offset multiplied by the horizontal tilecount and there you have your vertical scrolling, but horizontal is a bit more tricky and it involves messing with the video scale register in real time (it contains timer values).

The video generator can only assign 4 colors per pixel per tile and to shift the tile grid you need to shorten a tile on the left and shift in another tile that is 16 - the size of the leftmost tile in pixels. To do this you set the video timer so it fetches new data after for example 7 pixels have been drawn. Then switch back to 16 pixels and draw the other tiles like normal. Then do the last 9 pixels using the same trick I used on the leftmost tiles.

So this is what happens:
do visible porch line
while it draws that: set video timer to 7 pixels
tile0 << 9 (leaves you with 7 more pixels)
send shifted tile data to video generator using the WAITVID instruction
while it draws that: set video timer to 16 pixels
do all of the tiles in the middle
at the last tile you set the video timer to 9 pixels
tilex << 7 (leaves you with 9 more pixels)
do visible front porch line

repeat for all lines you want to scroll horizontally.


I have not implemented it this way yet though. I am focussing on school at the moment.
« Last Edit: September 10, 2013, 03:07:56 am by Keoni29 »
If you like my work: why not give me an internet?








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: z80-like portable computer for <$30! (If you build one)
« Reply #94 on: September 10, 2013, 04:15:49 am »
I don't understand much sadly since this is very technical, but would this be as fast as if it was built in in the same way as the 84+ LCD can wrap around?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #95 on: September 10, 2013, 04:17:21 am »
It's all about racing the electron beam: Decrease tile size at the front, draw all the tiles, fill in leftover space at the back. That is how it shifts.
If you like my work: why not give me an internet?








Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: z80-like portable computer for <$30! (If you build one)
« Reply #96 on: September 10, 2013, 05:12:27 am »
DJ, this is VGA/Composite output. If it doesn't run at 60 FPS, it doesn't have a steady image, since the electron beam keeps tracing, and gets off.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #97 on: September 15, 2013, 09:38:24 am »
I just hooked up a commodore 64 keyboard to the eZ8 computer. The c64 keyboard is just a matrix of switches like this:
It's really easy to read individual keys.


Should be able to make some interactive software now :D
« Last Edit: September 15, 2013, 09:38:49 am by Keoni29 »
If you like my work: why not give me an internet?








Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: z80-like portable computer for <$30! (If you build one)
« Reply #98 on: September 15, 2013, 09:39:22 am »
PORT VIM! PORT VIM! With this editor, you'll have quite an easy way to code on it!
« Last Edit: September 15, 2013, 09:42:38 am by Eiyeron »

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #99 on: September 15, 2013, 11:48:35 am »
I just managed to read every single keypress event. The cpu store all key states in registers. That way it knows which keys should not cause a trigger because they are held down. I am now gonna write a simple typing demo I guess?

Edit:



I recorded some footage using my video capture card. It shows how it reads key input from the c64 keyboard.
The first byte is the column number. The second byte corresponds to the bit of the pressed key.
Example:
Key E is 0x02_40 because it's the 2nd column and it's the 6th key, so 2^6 = 0x40
« Last Edit: September 15, 2013, 01:05:45 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #100 on: September 18, 2013, 04:32:26 pm »
There we go: String input. Very crude and no fancy features like delete, return and shift yet though (cause who needs those?)

« Last Edit: September 18, 2013, 04:44:27 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #101 on: October 05, 2013, 08:03:15 am »
Working on a string parser. I got this down already:
-User input
-Keyboard string gets stored
-Tokenizer for single tokens

To do:
-Tokenizer that takes a string and converts all the words into tokens.
-Token interpreter.

Spoiler For Spoiler:
« Last Edit: October 06, 2013, 03:01:49 pm by Keoni29 »
If you like my work: why not give me an internet?








Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: z80-like portable computer for <$30! (If you build one)
« Reply #102 on: October 06, 2013, 03:01:17 pm »
After a lot of frustration and a day of work:

You can now run programs from the shell. Every command corresponds to a pointer to a program. Just type it in, hit return and the cpu will do the rest for you! Isn't that convenient?
If you like my work: why not give me an internet?








Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: z80-like portable computer for <$30! (If you build one)
« Reply #103 on: October 06, 2013, 03:45:03 pm »
It sounds awesome but unfortunately I can't watch the video. :/

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: z80-like portable computer for <$30! (If you build one)
« Reply #104 on: October 06, 2013, 03:49:31 pm »
Looks really cool!
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________