+ Reply to Thread
Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 41

Thread: AlcorBIOS & AlcorPC

  1. #21
    Wire Sofaking Fizyk's Avatar
    Join Date
    Jun 2008
    Location
    Łomianki, Poland
    Posts
    740
    Blog Entries
    1

    Default Re: zCPU BIOS by Fizyk

    You put the C library wherever you have the ZC compiler. It doesn't hae to be in a separate folder or anything, you just need to write correct paths in your #includes.
    To create a cartridge, you only need to wire a CPU to the data plug. Just click with the wire tool on the cartridge, then on the CPU and it's ready (unless something changed in Wire recently, I haven't played GMod for some time). I don't think you have to choose any input or output at all.

    My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
    My tutorials: applyTorque - Quaternions - PID controllers
    Some other things I made: FT Chip - RK4 Solar System

  2. #22
    Wirererer ben1066's Avatar
    Join Date
    Aug 2009
    Posts
    151

    Default Re: zCPU BIOS by Fizyk

    2 month bumb, blimey, but i think a tutotial to make your jwn programmes would be good, i couldn't do it though. on a side note this seems to be a great replacement for the somewhat abandoned wireos

  3. #23
    Wirererer ben1066's Avatar
    Join Date
    Aug 2009
    Posts
    151

    Default Re: zCPU BIOS by Fizyk

    fizyk how about updating the make your own tutorial

  4. #24
    Wire Noob Niko's Avatar
    Join Date
    Mar 2009
    Location
    Torun, Poland
    Posts
    15

    Default Re: zCPU BIOS by Fizyk

    @ben1066: use the edit button,this is not an instant messanger!

    By the way i made a better looking AlcorPC than this phx plate .Had some problems with building but Fizyk helped me and it works .

    PC is ready to use,just install Alcyone.It's in adv dupe but I recommend downloading it from GWCD SVN (go to gwcd.wireos.com),because this version might be outdated in some time.

    EDIT : BIOS is outdated in this dupe,get the newest BIOS from GWCD SVN!

    Pics:
    1. It didn't work yet
    2. Ras testing his virus which deletes the kernel file
    3.,4.,5. Pictures of my AlcorPC
    Attached Thumbnails Attached Thumbnails AlcorBIOS & AlcorPC-gm_flatgrass_revolution0019.jpg   AlcorBIOS & AlcorPC-gm_flatgrass_revolution0033.jpg   AlcorBIOS & AlcorPC-gm_flatgrass_revolution0034.jpg   AlcorBIOS & AlcorPC-gm_flatgrass_revolution0035.jpg   AlcorBIOS & AlcorPC-gm_flatgrass_revolution0039.jpg  

    Attached Files Attached Files
    Last edited by Niko; 09-01-2009 at 02:49 AM.

  5. #25
    Wirererer ben1066's Avatar
    Join Date
    Aug 2009
    Posts
    151

    Default Re: zCPU BIOS by Fizyk

    you outdid my redesign :P
    btw what server was that

  6. #26
    Wirererer ben1066's Avatar
    Join Date
    Aug 2009
    Posts
    151

    Default Re: AlcorBIOS & AlcorPC

    I get this error,
    ----> ZyeliosASM compiler - Version 2.0 (SVN REV 0/900) <----
    -> ZyeliosASM: Compiling...
    -> ZyeliosASM: Pass 1
    -> ZyeliosASM: Pass 2
    -> Error at line 54: Expected number or a valid label
    -> ZyeliosASM: Compile aborted: fatal error has occured

  7. #27
    Wire Sofaking Fizyk's Avatar
    Join Date
    Jun 2008
    Location
    Łomianki, Poland
    Posts
    740
    Blog Entries
    1

    Default Re: AlcorBIOS & AlcorPC

    Update bump!

    Since about a week ago, my BIOS has DLL support. Yes, that means you can write libraries of functions and dynamcally load and unload them! The documentation is in the first post - I added two sections about writing and using DLLs, and a section about interrupt 37, which allows you to use the functions in the DLLs.

    You can download the BIOS with DLL support from the GWCD SVN (link in the first post). It also changes the memory layout a bit, so I suggest you download the dupe of the PC instead of building your own. The attachments in the first post are outdated, so don't use them until I say they are updated

    I uploaded some example programs to the GWCD SVN too. There is a graphics DLL, for use with the digital screen. When you fdump it to /dlls/graph.dll, you will be able to use the programs in "Flags" folder - they are 5 programs, drawing flags of 5 countries (they are the countries I was asked to make when I was on the HP server ).
    Just fdump the DLL, the programs, connect a digital screen to device slot #1, launch a program and enjoy
    Last edited by Fizyk; 03-14-2010 at 11:43 AM.

    My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
    My tutorials: applyTorque - Quaternions - PID controllers
    Some other things I made: FT Chip - RK4 Solar System

  8. #28
    Lifetime Supporter Nikita's Avatar
    Join Date
    May 2009
    Posts
    769

    Default Re: AlcorBIOS & AlcorPC

    That's hot! Testing now.

    Judgement: Yay! Needs a help command though. Maybe even documentation.txt in the root directory :P

    I would be really happy if you decided to use my Video Master too

    Edit: Actually, I think I'll make a VM dll myself. Got to tweak a few things there: Add transparency, make it use high-speed memory instead of ports, add performance adjustment. Is it a good idea to give it a 64/128 cell memory chip to cache the commands, so the CPU doesn't need to use ports or wait for it to be ready, like now?

    Edit2: Fizyk, have a look at this: I've got VM working with high-speed interface and made an untested DLL. I have no clue if there is any more magic that I should know of but here is the code:

    VMdraw.dll
    Code:
    db programsize
    
    db 5
    db txt_VMqueue, VMqueue   //VMqueue(n) - cache can hold n commands
    db txt_VMselect, VMselect //VMselect(n) - select device port n.
    db txt_VMdraw, VMdraw //VMdraw(Code, IP1, IP2, IP3, IP4)
    db txt_VMpps, VMpps //VMpps(n) - pixels per second
    db txt_VMready, VMready // X = VMready() - returns number of free
                            // slots in the command queue
    
    txt_VMqueue:
    db 'VMqueue', 0
    
    txt_VMdraw:
    db 'VMdraw', 0
    
    txt_VMpps:
    db 'VMpps', 0
    
    txt_VMselect:
    db 'VMselect', 0
    
    txt_VMready:
    db 'VMready', 0
    
    VMp1: //adress of the video master IO cache
    db 0
    
    VMp2: //Cache queue index
    db 0
    
    VMp3: //Cache queue size
    db 50
    
    VMqueue:
        
        push ebp 
        mov ebp,esp
        add ebp,4
        mov eax,ss:#ebp
        mul eax, 5
        mov #VMp3, eax
        pop ebp
        retf
    
    VMloop1restart:
    mov eax, 0
    jmp VMloop1
    //will loop until a slot becomes available
    
    VMdraw:
        mov eax, #VMp2
        mov fs, #VMp1
        VMloop1:
            cmp eax, #VMp3
            jnl VMloop1restart
            mov ecx, #eax
            add eax, 5
            cmp ecx, 0
            jne VMloop1
        sub eax, 5 //in my loop there is +5 even if this pos is good
        push ebp 
        mov ebp,esp
        add ebp,4
        mov ecx,ss:#ebp         // Code
        inc ebp
        mov fs:#eax, ecx
        inc eax
        
        mov ecx,ss:#ebp          // IP1
        inc ebp
        mov fs:#eax, ecx
        inc eax
        mov ecx,ss:#ebp          // IP2
        inc ebp         
        mov fs:#eax, ecx
        inc eax
        mov ecx,ss:#ebp          // IP3
        inc ebp          
        mov fs:#eax, ecx
        inc eax
        mov ecx,ss:#ebp          // IP4
        inc ebp         
        mov fs:#eax, ecx
        inc eax
        mov #VMp2, eax
        pop ebp
        retf
                
    VMloop2add:
    inc ecx
    jmp VMloop2
    
    VMready:
        mov eax, 0
        mov ecx, 0
        mov fs, #VMp1
        VMloop2:
            mov ebx, fs:#eax
            cmp ebx, 0
            je VMloop2add
            add eax, 5
            cmp eax, #VMp3
            jl VMloop2
        // ecx becomes number of command slots ready
        retf
    
    VMpps:
        push ebp 
        mov ebp,esp
        add ebp,4
        mov eax,ss:#ebp
        div eax, 67
        fint eax
        mov fs, #VMp1
        mov fs:#5, eax
        pop ebp
        retf
    
    VMselect:
        push ebp 
        mov ebp,esp
        add ebp,4
        mov ebx,ss:#ebp
        inc ebx
        mov eax, 30
        int 32
        mov #VMP1, eax
        pop ebp
        retf
    Here is how it works: You wire the Video master v1.1 or higher to a digital screen of any resolution through Scr input. The CmdCache and Data should both be wired to a separate memory chip with 16 bytes of memory or more. A data plug can be wired to that chip too.

    Then a program should call VMselect to choose the device port that it should use. VMqueue is how much commands fit into the queue (a queue exists for the sole purpose of storing the commands while the Alcyone can go on with it's business and not care about VM after it gives it the command). VMpps is a performance function - it chooses how much pixels per second a screen can display (warning: high values may burn your E2 chip).

    So there is a function VMdraw, which simply feeds the command and 4 params into the VM, while handling the queue stuff.
    My thread about Video Master should show you all kinds of commands and their params available.

    I bet this DLL needs some fixing that's beyond my current understanding of Alcyone or zASM.

    Edit 3: edited the code a little to make for sensible calls.
    Last edited by Nikita; 03-20-2010 at 09:56 AM.

  9. #29
    Wire Sofaking Fizyk's Avatar
    Join Date
    Jun 2008
    Location
    Łomianki, Poland
    Posts
    740
    Blog Entries
    1

    Default Re: AlcorBIOS & AlcorPC

    Yeah, there is a bit of magic you missed. You can't just pop the arguments from the stack, because they are "covered" with the return address for retf - so when you try to pop the arguments, you are actually popping the address at first.

    To avoid that, you can use the EBP magic. It's done like that:
    Code:
    some_function:
    push ebp
    mov ebp,esp  //now ebp points to the top of the stack - the first free place
    
    //inc ebp  - now it would point to the pushed value of ebp...
    //inc ebp - ... first part of the return address ...
    //inc ebp - ... second part ...
    //inc ebp - ... finally the last pushed argument
    
    //So we do:
    add ebp,4  //now ebp points to the last argument
    
    mov eax,ss:#ebp  //copy the argument to eax (we use ss to actually use the stack, not some random part of the memory)...
    inc ebp  //...and increase ebp to make it point point at the previous argument
    //...etc, etc.
    
    //function body
    
    pop ebp  //restore ebp from the stack
    retf

    My programs: BIOS - Alcyone - Calculator - Notepad - Movie Player
    My tutorials: applyTorque - Quaternions - PID controllers
    Some other things I made: FT Chip - RK4 Solar System

  10. #30
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default Re: AlcorBIOS & AlcorPC

    Fizyk, don't forget about RSTACK opcode you can use
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

+ Reply to Thread
Page 3 of 5 FirstFirst 12345 LastLast

LinkBacks (?)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots