Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - c4ooo

Pages: [1] 2
Other / z80 computer with arduino coprocessor.
« on: December 24, 2017, 03:41:09 pm »
I built a prototype for a z80 computer that uses an arduino for communication and bootstrapping. I can assemble a z80 source program with brass, and send it to the arduino with a small python program. The arduino is running a firmware program that waits for a program to be sent over serial, which it loads into the ram chip for the z80 to execute. The z80 communicates with the arduino via IO requests. The arduino<-->z80 API only contains 3 commands, but these can be used for the z80 to send messages to the PC via serial.

This is a small test program to send "test1" and "12345" to the PC via serial:
Code: [Select]
#define output(x, y) ld a,y \ out (x),a
#define command(x) output(PORT_COMMAND, x)
 output(PORT_ADD_LOW, writeTo & FFh)
 output(PORT_ADD_HIGH, writeTo >> 8) ;set data act-on address to writeTo
 ld hl,string1
 ld de,writeTo
 ld bc,6
 ldir ;copy string1 to writeTo
 command(COMMAND_WRITE_SERIEL) ;tell arduino to send data from act-on address to PC
 ld hl,string2
 ld de,writeTo
 ld bc,6
 ldir ;copy string2 to writeTo
 command(COMMAND_WRITE_SERIEL) ;tell arduino to send data from act-on address to PC
 jr $ ;do nothing
 .db "test1",0
 .db "12345",0


    Use external clock. (Currently arduino is generating a clock signal)
    Upgrade to 128kb ram chip. (Currently i am using a 32kb one)
    Make arduino use pin registers for control signal IO. (minor)
    Make a paging circuit for said ram chip.
    Add an LCD
    Write an OS(?)
    Add an SD card(?)
    Make PCB (?)

Computer Projects and Ideas / Open world engine for RPGs
« on: July 19, 2017, 06:32:29 pm »
 I got bored so i started programming an engine for open world RPGs. (In c++ with openGL 2). The world is split into "cells"/"chunks" which are loaded/removed as you move around. Alpha-mapping is used to shade different ground textures onto the ground mesh. (the ground is a mesh, not a hightmap, to allow for more freedom.) I am also programming some sort of "construction set", which currently allows you to edit some values of the cell, adding/removing/manipulating prefabricated objects in the cell, and a utility to paint textures onto the ground.

Prefabs will range from things like rocks on the ground, to entire dungeons.

Terrain rendering / resource management- mostly done.
Prefab rendering/manipulation - started
loading .ini files - need to start
construction set - lots of tedious work needs to still be done, but its not necessarily hard;
proper saveing/loading of cell data.
Resource manager for materials/textures/prefabs - started;
lighting - light is magical right?
physics - some progress, mostly on hold for now.

things that need to be done in feature that i haven't thought about yet:
Entity system.
Actual RPG elements like questing, etc.
Event Scripts.
Mesh editor (?!)


This is how the construction set looks so far: The ground repeats like that becomes i am too lazy to make proper terrain, so i just made it repeat.

Texturing the ground: (In this case removing textures.):

Added a prefab (that pink thing) to the cell: (as well as some texturing to the alpha map).

TI Z80 / TI84+CE Wrapper for Monochrome TI-BASIC Programs.
« on: June 25, 2017, 11:27:45 am »
At this point this is only a proof of concept, but the goal of this project is to hook all the drawing commands in ti-basic, making them behave like they would on the monochrome calculators. As of right now i have only hooked 4 ti-basic commands: ClrDraw, pxl-on, pxl-off, and pxl-test. The library is initialized with "1:Asm(INSTLAPI" (this needs to be put at the start of the monochrome tibasic program) and de-initialized with "0:Asm(INSTLAPI".

ASM / Shifting data block down a nibble?
« on: March 20, 2017, 11:47:20 pm »
How do I shift a block of data down a nibble? IIRC there was an instruction that swapped nibbles or something that made this easy. The shifted data will never be >256 bytes long.

Posted on omni since it seems that all the monochrome z80 programmers have remained here.

TI Z80 / Minecraft for CE [WIP]
« on: May 03, 2016, 06:21:43 pm »
I have recently been working on 2D minecraft game for the Ti84+CE calculator.
I already have a working menu and tilemapper. I will be programming terrain generation as well as some survival aspects of the game in the following weeks. (Warning: 43MB)

Axe / What is wrong with my 3D code?
« on: February 06, 2016, 04:39:05 pm »
This code *should* draw a verticle line that rotates around the camera, but it does not.
Code: [Select]
Repeate getKey(41)
Pause 15
.Rotate (r1,r2,r3) around the Y axis by O degrees; then project the point into 3D and store it to r4 as two 16 bit (signed) numbers.

TI Z80 / c4ooo's game with Walruses
« on: January 23, 2016, 01:29:38 pm »
So this was my entry for the CW contest. To download the game, click here
In this game you must spam the up key in order in order to doge past spikes and missiles in while collecting coins fish.
Spike and missile spawning.
Animation / sprites
A more specialized screen updating command (Asm)(Help appreciated)
A more specialized sprite rutine (Asm)
Coin (fish?) spawning.
Collision detection.
Make game easier. (Not necessary :) )

HS saving
Main menu

Computer Programming / Standart game data folder on Linux/ OsX?
« on: January 03, 2016, 02:40:36 pm »
What is the standard game folder on PCs running linux/mac?
EG lets say i have a meathod creatdir(String s) that creates a dir. What would path would a pass to it on linux/OsX?
On windows it i would do createdir("forgot/<user>/documenta/Games").

Edit: Someone just told me that for linux, "creatdir("~/games")" would work, but what is the full path?

Ever since i joined, omni seemed to have the same level of activity. It was not for sometime, however that i learned that the present day omnimaga is but a shadow of its present day self. What i am woried about is the fact that as far as i can tell there is no visible change being made in order to help revive the community

I have bean thinking....

1) How can omnimaga attract members - both new  and old - to the site?
How can it keep those members? (i have had @Siphonic_Sugar tell me that he "forgot [omni] existed").
How can omnimaga change the portrayal of its ideology?
2) Should the forum boards be completly redone?
^Well not entirly completely, but the boards dont reflect the focus very well. First of, TI programming as a whole is dieng, so it might do well to shift the focus more towards general computer programming. Further more, all but about three of "our projects" are completely disbanded. (same goes for comunity projects) I think it would do well to move the projects stuck on hiatus to the discontinued section, where they belong, making room for active people with active projects like @123outerme

3) How can conversations on irc be moved to the forums in a non-obstructive manor?

4) For a month there seemed to be a spike because of the start of code golf. Should omni start an official contest, requiring participants to make a topic about their entry?

I really don't have answers, but i realy want to see change being made in order to make the site more active. Notice i am not going to talk about the actual ideology of omni's current leaders.

Edit 2:
I'm not really sure what there is that can be done, but we are certainly open to suggestions. Word of mouth can help. If you have people that are or may be interested, let them know! Also, one thing that can be done that is very simple is having topic titles accurately reflect what they are about. A topic titled "So..." says literally nothing. Let me help you out with that. ;)

Anyhow... Inactive projects can be cleaned up, that's no problem. A restructure to make things more well organized could work as well, but it would depend on what the other admins thought. Branching out is also an option, but again, I'm not sure how popular that would be. We do already have sections for no calc dev. Maybe that could just be restructured a bit?

One of the most important things is current team/ member activity. If there aren't many interesting projects to attract people, people won't post or have reason to visit. Contributing is one of the best things any of us can do to drive activity imo.
I could not come up with with a better title, good thing you where able to :)

Yes i know we have non calc sections, but they are not very prominent, unlike Cemetech (who have hardware and MC) and CodeWalrus (who have a bunch of different stuff), Omnimaga seems to be calc only. Once again, it does have the non-calc sections, but its not like anyone joins for non-calc related resones ;)

I agree with the last paragraph. That is why i suggested scrapping the hiatus-ed projects and replacing them with active ones. I would rather have a few active ones then a huge list of inactive ones  :)

Lastly, is there any chance of an omnimaga hosted contest? And btw, on the topic of contests, what happened to @noelthebest and their contest? (ti-conquest(?))

Computer Programming / Google translate in java.
« on: October 18, 2015, 02:52:29 pm »
I wanted to add languge translating to my bot. Since google made all their APIs paid, using them is no longer an option. Therefore i tried to do what i did for the spellcheck bot: request the html for a google page with all the parameters in the url. There is a problem however, the google translate page relies on javascript to read the params in the url and [presumably] make the required http[?] calls to google servers. Therefore i cant just parse the returned hrml output for an answer.
Could any one help with reverse engineering the page to figure out what the calls would be? To be truthfull, i dont even know how to use http calls; sorunome started explaining them to me a long time ago but i never had time to finish his lecture :P

TI Calculators / c4ooo's Useless but cool programs. [ti-basic] [axe]
« on: October 12, 2015, 07:29:56 pm »
Over the years I have made a selection of cool but useless programs. Rather then letting them rot, I decided to share the code. Some of them have evolved over time, some where lost iin ram clears before i even got a cable ect ect..

Tron (ti-basic)
This was my "hello world" program for ti-basic. I have made some improvments to it over time. Note: this is a striped down version and does not contain score keeping.
Code: [Select]
Horizontal yMin
Horizontal yMax
Vertical xMin
Vertical xMax
Repeat pxl-Test(Y,X
If ans
If you want "Minefield tron, add this line after "pxl-on(Y,X
Code: [Select]

Christmas Card (ti-basic)
This program will display a snowflake animation with the words "Happy New Year".
Code: [Select]
"                "->Str2 "This is 16 spaces
While 1
Output(8,1,"Happy New Year!!"
If you want the snowflakes to fall straight down, replace
Code: [Select]
Code: [Select]
,as well as add two spaces to the string in the first line. In total it should have 18 spaces.
Go make an obstacle avoidence game with that!  ;D

Static screen program (axe)
This makes static... (Good axe coding style)
Code: [Select]
Repeate getKey(41)
While ->X

Cursed circle drawing program (axe)
This program draws cool circles using sin() and cos(). Use the arrow keys to operate. Also in axe 1.3.0 it compiles to exact 666 bytes, so yea... :P NB: THIS IS A POOR EXAMPLE OF OPTIMIZED AXE!!! I MADE THIS A LONG TIME AGO!!!
Code: [Select]
Fix 5
Reapear getKey(41)
If getKey(2)
ElseIf getKey(3)
ElseIf getKey(1)
ElseIf getKey(4)
lbl ROT
Pause 100

As time goes on i will post more. Feal free to ask if you have any question or comments! :D

Ps: gona add some tags so that beginner programers  will have an easier time finding this :) (Idk if this will affect google search results but its a try anyway)
Tags: ti-basic ti basic ti-84 plus ti-83 84 83 arcade source code demo pong Tetris snake tutorial packman graphing calculator games programs send

Axe / Help understanding axe's sprite routine?
« on: September 18, 2015, 03:56:35 pm »
Hello, as you might know, I am fairly new to asm. I would appreciate if someone could explain how an 8*8 sprite routine works, or axe's sprite routine in particular. 

Axe's sprite routine: I would presume that the stack stuff in the middle is just to load the function's params (ie pt-off(x,y,p)) into certain registers.
Spoiler For Spoiler:

   push   hl
   pop   ix         ;Input ix = Sprite
   ld   hl,plotSScreen      ;Input hl = Buffer
   pop   af
   pop   de         ;Input e = Sprite Y Position
   pop   bc         ;Input c = Sprite X Position
   push   af
   ld   b,7
   ld   a,63
   sub   e
   jr   nc,__DrawOffNoClipTop
   ld   a,e
   add   a,b
   ret   nc
;   xor   b
;   ld   e,a
;   add   ix,de
;   ld   e,d
;   xor   b
   inc   ix
   inc   e
   jr   nz,__DrawOffClipTop
   cp   b
   jr   nc,__DrawOffNoClipBot
   ld   b,a
   inc   b
   ld   a,c
   add   a,7
   cp   96+7
   ret   nc
   ld   d,0
   sla   e
   sla   e
   add   hl,de
   add   hl,de
   add   hl,de
   ld   e,a
   add   hl,de
   ld   a,c
   and   7
   jr   z,__DrawOffAligned
   ld   e,c
   ld   c,a
   ld   a,e
   cp   -7
   jr   nc,__DrawOffLoop
   inc   d
   cp   96-7
   jr   nc,__DrawOffLoop
   inc   d
   push   bc
   ld   b,c
   ld   c,(ix+0)
   xor   a
   ld   e,$FF
   srl   c
   rr   e
   djnz   __DrawOffShift
   dec   d
   jr   z,__DrawOffSkipRight
   ld   b,a
   or   (hl)
   and   e
   ld   (hl),a
   ld   a,b
   dec   hl
   inc   d
   jr   z,__DrawOffSkipLeft
   and   (hl)
   or   c
   ld   (hl),a
   ld   bc,13
   add   hl,bc
   inc   ix
   pop   bc
   djnz   __DrawOffLoop
   ld   e,12
   ld   a,(ix)
   ld   (hl),a
   inc   ix
   add   hl,de
   djnz   __DrawOffAlignedLoop

Community Contests / Code Golf - The Reboot #10
« on: August 02, 2015, 11:59:59 pm »
Hello ladies, gentlemen, and Pegasi of omnimaga! It seems that the circle is complete and that it is my turn to host again! Without further adu, welcome to the 00001010th installation of ....
Code Golf: The Reboot!

Don't know what code golf is?, read this paragraph by @JWinslow:
Don't know what code golf is? Check out this contest thread OR this really old contest thread for an explanation. Don't know what code is? Then you will not understand this website in general :P
So, here is your challenge:
Today you have gotten yourself a new job at a company that produces touch screen devices. Being part of the security department, it is your job to design and program a password protection system for the device. You decide to steal a design that is currently popular on the market, and involves the user connecting cells with lines by sliding their fingers across the screen.
The next day your boss approves on your plan, and you decide that the size of the cell grid should be 5*5. The start will be the top left corner, and the end the bottom right corner. The user will have to to drag their finger from the start to the end while going over every cell. From a cell the user can drag to any adjacent cell, be it horizontally, vertically, or diagonally, as long as they do not drag over the same cell twice, and they do not frag out of bounds. The user is successful if they dragged over every cell and are currently at the end. If they reach the end without dragging over every cell, or attempt to drag over the same cell twice, then they are unsuccessful. The user is also unsuccessful if they drag out of bounds.
This is an example of a success: (taken from your scratch pad)

These two are examples of fails: (also taken from your scratch pad)


For input, you must read 25 characters from stdin, or your languages closest alternative. Each of the 25 characters will represent a move,and will be a  number 1-8, 1 being go up, 2 up and right, 3 right, and so on in a clockwise fashion. The input is not a list of moves to make, but rather a road map to follow. For example, if you are at cell {3,4}, then you will have to read character {3,4} to make your next move. Hint: You will have to treat the 25 chars as a 5*5 multi dimensional array. Due to  the last character being the finish, its state should not affect the program.
Open reaching the end with every cell passed, you must print a positive result. Open passing the same cell twice, reaching the end without passing every cell, or going out of bounds, your program must print a negative result. The "negative" and "positive" results must be unique, and be consistent over multiple runs.
Example: (An "x" does not affect the outcome of a program)
For input


The move map should look like this:

And should be a fail because not all the spaces where transversed.


All non-calc languages will be scored with this counter, courtesy @Juju.
All Assembly programs will be scored on binary size, and TI-BASIC and Axe will be scored on on-calc source size (minus tios header). The Axe header does count.


PM me over on Omnimaga,or shoot me an email [email protected] with the code to submit your entry.

Well, i think this is the end, i will add a scoreboard once i get some entries, which i hope i will get (activity seems to be going down ._.) If you have any questions/would like me to clarify something, feel free to ask.

Computer Projects and Ideas / My [WIP] irc bot
« on: July 08, 2015, 04:52:32 pm »
I recently started developing an irc bot, with plentiful help and guidance from @Eeems Right now the bot isn't very useful, but over the following weeks i will be adding stuff to it. If you have any suggestions for functions the bot should perform, please post here. The source (Java) can be found here:
Currently in #spam and #theBot channels.
If you PM the bot a command, it will respond to you with a PM (some commands will require PM'ing) 

The bot is split into several "module", which are handled via a plugin api. They provide different commands/functions to the bot.
[h1]Here is a list of modules, and the commands they add:[/h1]

Core module:
Spoiler For Spoiler:
This is the core module, and can not be disabled. It will act as a "control panel" for c4Bot OPs to control c4Bot.
It has some working commands, but i will write about them later.
Spell check module:
Spoiler For Spoiler:
This module uses google to spell check your inputs.
@spellcheck <Some Sentence> - Returns a spellchecker version of the sentence.
Ex: @spellcheck chiken tasts vry guud! will return chicken tastes very good!.
This bot relies on google to get responses. @Sorunome has warned me that they might catch on and start blocking my bot's responses. This means that the bot may become unavailable in the future.
Spam my console module:
Spoiler For Spoiler:
This module spams my IDE's console with parsings of JOINs QUITs and PRIVMSGs
NOTE:The bot is hosted from my pc and is only up when am working on it.

Ive recently done some research on the raspberry pie computer module, and it seems like a great thing, however, i cant seem to find any tutorials on how to create a working computer system around it. Ive searched alot on google, but i seriously cant find anything. An important thing I cant find is the pin diagram for the pins on the module, like what pins on the compute module are power pins, which ones GIOP, and which ones to connect to a usb adapters. I would appreciate any help finding this.

Pages: [1] 2