I just finished up a quick class I made in Codea. This class allows quick and dynamic creation of text-based menus. The code can be found on the link below: Link to Code
The menu class requires several different parameters to setup the new object. To setup a new menu use the following code: menuName = HighlightMenu(pos,title,ftSize,titleColor,itemColor,hlColor) : Creates a new Menu Object
pos = (Vec2) This determines the position of the 1st Menu Option. For example, vec2(WIDTH/2,HEIGHT/2) will place the 1st Option in the Center of the screen. All additional objects will be displayed below this location at a distance of pos.y+(ftSize*n); where n = menu position number.
title = (String) Sets the title for the menu.
ftSize = (Int) Determines the size of the menu options. The title size is determined by ftSize + 15.
titleColor = (Vec3) Sets the Color of the Title.
itemColor = (Vec3) Sets the Color of a menu option when not selected.
hlColor = (Vec3) Sets the Color of a menu option when it is selected.
menuName:addNew(text,function) : Adds a new Menu Option Object to the Menu Object
text = (String) Sets the Text for a button.
function = (String) Sets the function to be performed when selected. This must be a string! A good example of this would be menuName:addNew(“Some Option”,”someOption()”)
menuName:draw() : Draws the Menu and Menu Objects
mainMenu:touched(touch) : Handles the Touch Events for the Menu
I have officially finished programmer, program reader, and CPU for LittleBigPlanet 2! Sorry for the delay, but it was difficult to construct the programmer and I had a major bug in the Shift Registers causing all information to be dropped.
I will post a video and PDF on how to fully use the CPU/Programmer later on in the day as I have to head off for Calculus in a few minutes.
If you have any questions, feel free to ask either here or on PSN msg me at Deamos.
Logic Labs LBP2 #1: Basic Logic has been completed and is located here! This one just covers the basic included gates in LBP2. I will begin working on Logic Labs #2 after I finish some work on the Da Vinci CPU. Thanks!
I just wanted to post an apology on the release of Da Vinci. The processor is complete and 100% working. I have also almost completed work on a programming method consisting of dynamic blocks created by a coding device. I promise I will work as hard as I can on finishing the input device for the processor and plan to allow it to switch between programming blocks and connected devices, allowing you to pull in bits from switches outside of my CPU & the program blocks, allowing you to create highly advanced systems.
I’ll post up some pictures of the programming blocks when my PS3 finishes updating to 3.60.
Also, I would love to get someone to record some videos with me so I can get some instructional vids up on youtube. Send me a tweet @Deamos on Twitter.
Ok Guys! I just finished with the actual second version of the Microprocessor itself today! I will be code naming it Da Vinci and should have it ready for public release by Saturday or Sunday depending on how quickly I can put together the programming and side loading program executers….
Thats right, You are going to be able to program with this sucker by the time I am done.
Right now, as it stands the updates will be:
-8 ALU based functions, including Adding, Subtracting, ANDing, ORing, Inverting, XORing, and Shifting Left/Right
-8 Bit Data Width
-4 bit address line (Expandable to 8 bit Address Line, if someone needs a larger CPU)
-8 bit Output
-16 Bytes of RAM
-3 Special Purpose Registers
-2 ALU Registers
-1 Working Register
-The Ability to Write your Own Programs and execute them!
Again, I plan to be finished with this very soon so keep your eyes open on this blog!
I’ve heard from a few people that they have no understanding on how to actually use the CPU, so let me try to give you an example.
Ok Example 1, Lets Add 2 Numbers together
LW00000001 -Places 1 in the WREG
WA00001000 -Moves the 1 that is stored in the WREG to the first ALU Register (00001000 or AREG)
LW00010011 -Places 19 in the WREG
WA00001001 -Moves the 19 that is stored in the WREG to the second ALU Register (00001001 or BREG)
AA -Adds the number stored in the AREG to the number stored in the BREG and places them in the ALUOUT Register (00001010)
MA00001010 -Move the 20 that is stored in the ALUOUT Register to the WREG
RW -Displays the binary equivalent of the number 20 or 00010100
As you can see.. All inbound and outbound information MUST go through the WREG. This will be the same once I finish version 2 of the CPU. Also, please take note that commands #5 and #7 do not require arguments (the extra info behind it) and anything placed after in those commands will be dropped.
If you have any questions, feel free to ask! I’m continuing to work on version 2 to share with everyone to use in their own levels. In addition, I am going to try to build an ability to create actual programs which the CPU will read from and perform line by line. Lots of fun to come!
I just wanted to mention that I have now finished my CPU project that I have been working on since the Beta test. What my level does is prove that LittleBigPlanet 2’s addition of Logic Gates allows for the construction of highly advanced circuits including the ability to create simple working computers.
8 bit ALU to that supports AND, OR, Invert, and Adding Operations
3 ALU 8 bit registers for performing operations
1 8 bit W(Working) Working Register
8 Instruction Set Commands
Instruction Set Commands
Data Movement Commands
LW: Writes a binary Value to the W Register
EX: LW00001111 (Writes the value 00001111 to WREG)
RW: Reads the current value stored in the W Register and displays on the Screen
EX: RW (Doesn’t matter what else is displayed as long as RW is in the far left)
WA: Writes the value in the W Register to an address (Allowed addresses are 00000000 to 00001001)
EX: WA00000011 (Stores WREG values in Address 00000011)
MA: Moves the Value in the Address to the W Register
EX: MA00000011 (Moves whatever is stored in Address 00000011 to the WREG)
AN: ANDs Address 00001000 (Also Called A) with Address 00001001 (Also Called B) and stores the result in Address 00001010 (Called the ALU Output)
EX: If A=11110000 & B=11001111 Then Inputing the command AN will make address 00001010 = 11000000
AI: Inverts Address 00001000 (Also Called A) and stores the value in 00001010 (Called the ALU Output)
EX: If A = 11110000 then inputing AI will make address 00001010 = 00001111
AA: Adds the values of Address 00001000 & 00001001 and stores the Sum in Address 00001010 (Only a maximum of 255 can be stored due to bit restrictions
EX: if A = 00000010 & B = 00000011 then Issuing the command of AA will make address 00001010 = 00000101
AO: ORs address 00001000 & 00001001 and stores the result in 00001010
EX: if A= 00110000 & B= 01010010 then issuing the command of AO will make address 00001010 = 01110010
For controlling the mouse, it is all handed by the left analog stick. Pressing the X button will type a button from the keyboard, and Circle will input the command in to the CPU. Triangle will exit the keyboard and mouse.
I know it all sounds a bit complicated and this level is more geared towards those with an understanding of Computer Engineering and Advanced Logic.
I am planning on eventually doing a second version of the CPU to be distributed to players to use in their own levels to handle advanced logic functions. In addition, I am also planning on starting up the next version of my Logic Labs series to help explain some of the new LBP2 Logic and how to use it.
I will be adding more information on how to use as I build on the original design including a video.