+ Reply to Thread
Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 60

Thread: Custom consolescreen

  1. #41
    Wire Amateur mansarde's Avatar
    Join Date
    Sep 2008
    Posts
    43

    Default Re: Custom consolescreen

    @Borsty:
    Ok, I've played around with your Adv. Console Screen and it's really amazing!^^ Thanks for making this.
    I experimented a little bit to figure out how everything works and so far everything is working fine.
    I got the RT Camera footage to show up, was able to write text to different layers, etc.
    But there is something I can't seem to figure out all by myself:

    - how to change how big the RT area is (and how I can position it)
    - and how I can read out which xy-coordinate the cursor was on when the player uses the screen at these coordinates (like a button klick)

    Can I do this using the wrapper somehow or do I need a CPU for that?
    In your first post you're talking about a Memory Map with which you can do exactly these things.
    But what do I have to do to make use of this memory map?
    Am I right to assume you need a CPU for that?

    If yes, then can you maybe release the CPU you used in your video from this post? -> http://www.wiremod.com/forum/wiremod...html#post56536
    That would be very nice, because I can learn best if I can see the code and try to connect what code does what ingame.
    Thanks in advance and very nice console screen you made there, kudos!

  2. #42
    Wirererer Borsty's Avatar
    Join Date
    Apr 2007
    Posts
    109

    Default Re: Custom consolescreen

    You can't change the rt screen bounds using the wrapper gate yet, If you want I can add that for you.
    The screen doesn't save the coordinates when it get's used, only that it got used :P (And the wrapper gate doesn't do this either), but I've added another output to the wrapper for if the screen just got used, you then can trigger the TouchClk to update TouchX and TouchY outputs
    «You're thinking with wires»

  3. #43
    Wire Amateur mansarde's Avatar
    Join Date
    Sep 2008
    Posts
    43

    Default Re: Custom consolescreen

    Quote Originally Posted by Borsty View Post
    You can't change the rt screen bounds using the wrapper gate yet, If you want I can add that for you.
    Well that would be nice of course. If it doesn't take too much work and you don't mind, then sure, why not. ^_^

    Quote Originally Posted by Borsty View Post
    The screen doesn't save the coordinates when it get's used, only that it got used :P (And the wrapper gate doesn't do this either), but I've added another output to the wrapper for if the screen just got used, you then can trigger the TouchClk to update TouchX and TouchY outputs
    Thank you very much! This sure will come in handy.

    So about the CPU you used in the video. Would you mind sharing it or can you recommend a good tutorial whch describes how to utilize all the functions of the Memory Map? Because I'd love to be able to resize the RT area and all the other stuff you can do with this awesome screen.

    EDIT:
    Something I just noticed: The advanced duplicator doesn't save the wrapper.
    Doesn't really bother me, but I just thought you should know.
    Last edited by mansarde; 09-19-2008 at 07:31 AM.

  4. #44
    Wire Amateur creec's Avatar
    Join Date
    Jun 2008
    Posts
    38

    Default Re: Custom consolescreen

    Duplicator support should be added for this. Looks very useful.
    Gotta downoad and try.

    By the way, hello Mansarde.


    I'm creec_dx and my iq is 145.

  5. #45
    Wirererer Borsty's Avatar
    Join Date
    Apr 2007
    Posts
    109

    Default Re: Custom consolescreen

    Quote Originally Posted by mansarde View Post
    Something I just noticed: The advanced duplicator doesn't save the wrapper.
    Doesn't really bother me, but I just thought you should know.
    Will look into that asap

    I'll post the C sourcecode I used in the video too
    «You're thinking with wires»

  6. #46
    Wire Amateur Smoot's Avatar
    Join Date
    Apr 2008
    Posts
    40

    Default Re: Custom consolescreen

    Will anyone post a simple guide for us newbies?

  7. #47
    Wire Amateur mansarde's Avatar
    Join Date
    Sep 2008
    Posts
    43

    Default Re: Custom consolescreen

    Quote Originally Posted by Borsty View Post
    Will look into that asap

    I'll post the C sourcecode I used in the video too
    Cool, that would be very nice, thanks in advance! ^_^

  8. #48
    Wirererer Borsty's Avatar
    Join Date
    Apr 2007
    Posts
    109

    Default Re: Custom consolescreen

    Code:
    //#include <lib/cstr.c> // string lib
    //#include <lib/cmath.c> // math lib
    //#include <lib/conlib.c> // console lib
    
    //#include <lib/memory.c> // memory lib ( by borsty )
    #include <lib/advconlib.c> // advanced console screen lib ( by borsty )
    
    // Directly copied from cmath.c, as we only use this functions in here
    floor( x ) int x; {
    #asm
    	mov EDX,EBP;
    	add EDX,2;
    	mov EAX,#EDX;
    	fint EAX;
    #endasm
    }
    
    main() {
    	// variables
    	int i, pos, x, y, ox, oy, state, used;
    	char* str; // string ( char array )
    	state=0;
    	
    	str = "(C) Borsty.Org", 0;
    	
    	// init screen [0][3072]
    	Scr_Init(0);
    	Scr_CursorEnable(0,1);
    	Scr_CursorPos(0,0);
    	Scr_SetActive(1);
    	
    	Scr_EnableRT(0);
    	Scr_SetRTArea(1,1,28,16);
    	Scr_SetOverlays(1,1);
    	
    	// Fading text
    	for(i=0;i<10;i++){
    		x = 999 + (i * 1000);
    		Scr_Print(1,str,8,8,x);
    		delay(100);
    	}
    	delay(2900);
    	for(i=9;i>=0;i--){
    		x = 999 + (i * 1000);
    		Scr_Print(1,str,8,8,x);
    		delay(100);
    	}	
    	delay(400);
    	Scr_ClearScr();
    	
    	// Loop
    	while(1){
    		used = Scr_GetUsedState();
    		if(used==1){
    			Scr_SetActive(0);
    			if(state==1){
    				state=0;
    				Scr_EnableRT(0);
    			} else {
    				state=1;
    				Scr_ClearScr();
    				Scr_EnableRT(1);
    			}
    			Scr_SetActive(1);
    		}
    		
    		pos = Scr_GetPointerPos();
    		if(pos<526) { // 539 - string length
    			y = floor(pos/30);
    			x = pos-(y*30);
    			outport(0,x);
    			outport(1,y);
    			Scr_SetActive(0);
    			if (ox!=x || oy!=y) {
    				Scr_PutIcon(2,26,ox,oy,0);
    				Scr_Print(2,str,ox+1,oy,0);
    			}
    			Scr_PutIcon(2,26,x,y,8999);
    			Scr_Print(2,str,x+1,y,8888);
    			
    			Scr_SetActive(1);
    			ox=x;
    			oy=y;
    		}
    	}
    }
    Get the latest beta release of the ZC32 compiler >here<
    Put the advconlib.c file in the lib dir of the compiler, most of the functions should be self explaining.
    Last edited by Borsty; 09-20-2008 at 10:38 AM.
    «You're thinking with wires»

  9. #49
    Wire Amateur mansarde's Avatar
    Join Date
    Sep 2008
    Posts
    43

    Default Re: Custom consolescreen

    Hey, thanks for the code and the links!
    If I get this to work then I can really start experimenting.
    I guess you can do a lot more stuff with CPUs, but your code will give me a headstart and then I'll spend some time with tutorials, etc.
    Thanks again for the help! ^_^

  10. #50
    Wirererer Borsty's Avatar
    Join Date
    Apr 2007
    Posts
    109

    Default Re: Custom consolescreen

    Alright, duplication should work nicely now. I've added a "persistant" option to my dynamic memory sent (which has been fixed btw).
    Updating first post...
    «You're thinking with wires»

+ Reply to Thread
Page 5 of 6 FirstFirst ... 3456 LastLast

LinkBacks (?)

  1. 01-28-2010, 05:49 PM

Similar Threads

  1. E2 custom extension help
    By phreak314 in forum Wiremod Addons & Coding
    Replies: 8
    Last Post: 01-30-2010, 06:34 PM
  2. need alitle help with a custom gate plz
    By metanight in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 02-07-2009, 09:36 PM
  3. Bouncing Ball (ConsoleScreen + Egate)
    By 3dfactor in forum Finished contraptions
    Replies: 3
    Last Post: 09-05-2008, 07:31 PM

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