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

0 Members and 2 Guests 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 #135 on: February 26, 2014, 03:27:04 pm »
Working on a midi player program for the eZ8. This morning I found out that the midi file format is not as complicated as I thought. It is just a stream of midi events.

Research:


I will be using the second UART for midi out. I have a little module for my electronic drum set that has all of the standard midi sounds in it, so I will be using that to generate the sounds!
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 #136 on: February 26, 2014, 04:06:17 pm »
That does sound cool. :D Thouh it would be more retro like if you used one of those C64 SIDs you have.;)

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 #137 on: February 26, 2014, 04:42:15 pm »
Good thing I came prepared: http://ourl.ca/20468
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 #138 on: February 26, 2014, 04:57:39 pm »
Wait are you using this ? I got slightly confused and thought you didn't. :/

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 #139 on: February 26, 2014, 06:25:21 pm »
I can use both because you can daisy chain midi devices.
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 #140 on: February 26, 2014, 06:31:33 pm »
Oh that's cool. :D

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 #141 on: February 27, 2014, 04:46:34 am »
YES! I finally managed to get the midi output working. What I was doing wrong before was that I sent a midi parameter that was 8 bits long instead of 7 bits. This caused some issues.

Now I am going to work on a midi player! I need to figure out a way to time it first. I was thinking about using the vblank interrupt that the gameduino can provide.
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 #142 on: February 27, 2014, 04:01:08 pm »
New features:
-Improved hex monitor
-Syscall vector table
-Midi!
-Random improvements to the code
-Blinking cursor :w00t:

I am also re-doing most of the comments. Example:
;===================================================================================================
; S Y S C A L L   V E C T O R   T A B L E
;===================================================================================================
   org 0800h
;0800h : I/O operations ----------------------------------------------------------------------------
   dw putc                                     ;+0
   dw puts                                     ;+2
   dw puts_r                                   ;+4
   dw putFd                                    ;+6
   dw puti                                     ;+8
   dw puth                                     ;+10
   dw 0,0,0,0,0,0,0,0,0,0                      ;(reserved)
   dw spi_transfer                             ;+30
   dw spi_transfer_buffer                      ;+32
   dw 0,0,0,0,0,0,0,0                          ;(reserved)
   dw midiout                                  ;+48
   dw 0,0,0,0,0                                ;(reserved)
;0840h : Memory operations -------------------------------------------------------------------------
   dw F_unlock                                 ;+0
   dw F_erase_page                             ;+2
   dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0              ;(reserved)
;0850h : Video operations --------------------------------------------------------------------------
   dw gd_cpy                                   ;+0
   dw gd_copy                                  ;+2
   dw gd_fillmeup                              ;+4
   dw gd_char_pal                              ;+6
   dw 0,0,0,0,0,0,0,0,0,0,0,0                  ;(reserved)
;0860h : Math routines -----------------------------------------------------------------------------
   dw div_8                                    ;+0
   dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0            ;(reserved)
« Last Edit: February 27, 2014, 04:01:54 pm by Keoni29 »
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 #143 on: February 27, 2014, 06:04:54 pm »
Kewl to see this progress. :D

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 #144 on: February 28, 2014, 01:37:18 pm »
I am working on a header file that contains all the data you need to develop software for the operating system.

This sample program uses the syscall: puts (print text on screen/terminal)
;===================================================================================
; M E S S A G E   B O X
; eZ8 OS sample program
;
; Description:
;    Draws a box on screen
; Upcoming features:
;  - Custom text in the box
;===================================================================================

   include "eZ8OS.inc"

prg_org(14)      ;Program resides in page 14 of file memory
   
prg_message:
   push cr_x
   push cr_y   
   
   ld cr_x,#30
   ld cr_y,#15
   str_out(str_box_h)
   scrolldown
   str_out(str_box_v)
   scrolldown
   str_out(str_box_v)
   scrolldown
   str_out(str_box_h)
   
   pop cr_y
   pop cr_x
   ret
;===================================================================================
; D A T A   A R E A
;===================================================================================   
str_box_h:
   asciz "+----------------+"
str_box_v:
   asciz "|                |"
;===================================================================================
; M A C R O'S
;===================================================================================
str_out MACRO str
   ld R0,#HIGH(str)
   ld R1,#LOW(str)
   syscall puts
ENDMAC str_out

scrolldown MACRO
   ld cr_x,#30
   inc cr_y
ENDMAC
;-----------------------------------------------------------------------------------
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 #145 on: March 03, 2014, 04:32:47 am »
The eZ8 computer plays back MIDI files now!!!
If you like my work: why not give me an internet?








Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: z80-like portable computer for <$30! (If you build one)
« Reply #146 on: March 03, 2014, 04:57:23 am »
That's awesome! :D

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 #147 on: March 06, 2014, 03:18:06 pm »

Added a userport. It has 3.3v, 5v, 8IO pins and serial rx tx
The serial tx signal is shifted up from 3.3v to 5v so it can be used for stuff like midi.
« Last Edit: March 06, 2014, 03:20:55 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 #148 on: March 07, 2014, 03:46:31 pm »
I just hooked up the keyboard to the new board I made. Now I do not have to use the psion pocket computer for input anymore. This frees up the serial port for sending and receiving files from my pc.


The midi files take up a lot of space in flash memory. I can barely fit 3 midi files on the internal flash. That's why I need to include some external memory into the eZ8 computer. I was thinking about using one of these 128Mbit flash roms: http://nl.farnell.com/spansion/s25fl127sabmfi101/memory-flash-128mbit-8soic/dp/2328002
I can store about 300-400 midi files on this chip!
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 #149 on: March 14, 2014, 03:46:12 am »
I just ordered the memory. It will probably take a little while before it gets shipped to me, so that gives me some time to think about the extended filesystem. Because I made file headers variable-sized I can add things like extended addresses. Only the first block has an extended address, so the other blocks in the file cannot exceed a sector of 64KB. I might add something to work around that. The lower byte in the 'next_block_address' field of the block header is there just so the filesystem won't get confused. It is not actually used at the moment. I could use it to indicate that the file continues in a different 64KB sector.
If you like my work: why not give me an internet?