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.


Messages - Keoni29

Pages: 1 ... 96 97 [98] 99 100 ... 168
1456
Other / Re: Your 83+'s display is too small?
« on: April 03, 2013, 02:02:12 pm »
It would still take about 0.5 s to update.

1457
Other / Re: Your 83+'s display is too small?
« on: April 03, 2013, 01:48:11 pm »
It would be slow as heck if it was sending data over the I/O port though. My custom link protocol can send max 2k every second. A color LCD of 320x240 with a color depth of 8 bits would be 76800 bytes. It would take 38.4 seconds to draw the entire screen. (add the time it would take for the arduino to that)

1458
Other / Re: Your 83+'s display is too small?
« on: April 03, 2013, 09:35:17 am »
Lucky. My father brings in semi old PC's every once in a while. Semi old is the kind of old you have to upgrade in order to sell because nobody wants it :P

1459
Other / Re: Your 83+'s display is too small?
« on: April 03, 2013, 09:18:19 am »
Using direct buffer reads will at least make this 8 times faster if not 16 times :P Good job. Now try to use a color screen :)

1460
News / Re: TI-83 Plus moves to TI-84 Plus hardware worldwide !
« on: April 01, 2013, 01:45:10 am »
Back at TI:
Boss:"We need a revolutionary new calculator before back 2 school 2013. We don't have a lot of time on our hands."
Employee:"Let's put an 84+ inside a CSE case and call it the new 83+!"
*Standing ovation*

1461
TI Z80 / Re: ORG: online Z80 IDE and assembler
« on: March 31, 2013, 11:29:36 am »
Why does it mess with my capslock?

1462
Other / Re: Homebrew z80 computer [KEONI-MK1]
« on: March 31, 2013, 02:58:32 am »
First I want to make the arduino sequence the programming cycle a bit better. Atm I have to control a lot by hand in order to reset. Once the program is loaded the atmegas will function as a serial interface connected to I/O port1 (port0 is for the LEDs) Then I can use a serial terminal to communicate with the z80 computer

1463
Music Showcase / Re: Keoni29's music topic
« on: March 30, 2013, 05:29:46 pm »
Some nice suggestions. not sure wich one to pick. Keep em coming if you like.

1464
Other / Homebrew z80 computer [KEONI-MK1]
« on: March 30, 2013, 05:20:36 pm »


If you know a better name please tell me :P

1465
News / Re: 160x240 CSE scrolling speed test gives promising results
« on: March 29, 2013, 12:26:48 pm »
It doesnt look like it though. You see that it's just one image, but it's stretched out to fill multiple screens. You can only scroll within the boundaries of the image in this demo.

1466
News / Re: 160x240 CSE scrolling speed test gives promising results
« on: March 29, 2013, 12:16:56 pm »
Can it also repeat the image and stitch the ends together?

1467
Other / Re: TI84+ soundchip - arduino SID emulator
« on: March 29, 2013, 09:30:37 am »
The sid library is timer interrupt driven and the link protocol is external interrupt driven. If you can figure out a way to use interrupts on the RPI you can try to port it.

1468
Other / Re: TI84+ soundchip - arduino SID emulator
« on: March 29, 2013, 08:57:57 am »
Great! You can find the sourcecode and schematics here:
http://8times8.host56.com/?p=98
There is a zipfile with all the resources you need.

1469
Other / Re: TI84+ soundchip - arduino SID emulator
« on: March 29, 2013, 08:33:49 am »
You do not need an arduino emulator, but you need something that emulates the SID soundchip and the link protocol.

1470
Here is the sourcecode for those who are interested:
IRCserver
Code: [Select]
SERVER = os.getComputerID()
nick = {}
channel = {}
--initialize names 1 to 128
for i=1,128 do
  nick[i]="&new"
  channel[i]="&new"
end
nick[SERVER] = "SERVER"
channel[SERVER] =  "VIP LOUNGE"

function getUserId(str)
  for i=1,128 do
    if nick[i] == str then
      return i
    end
  end
  return nil
end

function listUsers(id)
  p(id,"@ircOnline Users:")
  for i=1,128 do
    if nick[i]~="&new" and i~=SERVER then
      p(id,"@irc -".. nick[i] .. " " .. channel[i])
    end
  end
end

function compare(str)
  return string.find(message, str)
end

function newline()
  mon.scroll(1)
  mon.setCursorPos(1,20)
end

function post(str)
  newline()
  mon.write("<IRC>".. channel[senderId])
  mon.setCursorPos(16,20)
  mon.write(str)
  chan = channel[senderId]
  for i=1,128 do
    if channel[i] == chan then
      rednet.send(i,"@irc" .. str)
    end
  end
end

function addTime()
  return "[" .. textutils.formatTime(os.time(),true) .. "]"
end

function postPrivate(receiver,str)
  if getUserId(receiver) then
    rednet.send(getUserId(receiver), "@irc".. addTime() .."<msg from ".. nick[senderId].. ">" .. str)
    newline()
    mon.write(addTime() .. "(msg " .. nick[senderId] .. " > " .. receiver .. ")" .. str)
  else
    rednet.send(senderId,"@ircUser " .. receiver .. " does not exist")    
  end  
end

function p(i,str)
  rednet.send(i,str)
end

function sendHelp(i)
  p(i,"@irc--commands:------------")
  p(i,"@irc  /join channel -- joins the channel. example: /join #minecraft")
  p(i,"@irc  message       -- sends plain text to the channel you're on")
  p(i,"@irc  /nick name    -- changes your nickname. limited to 16 characters.")
--p(i,"@irc  /msg receiver message  -- sends a private message to 'receiver'")
  p(i,"@irc  /quit message -- quits IRC with a message")
end



rednet.open("left")
mon = peripheral.wrap("top")
mon.clear()
newline()
mon.write("IRC server software Alpha 1.0")
newline()
mon.write("Booting up server!")
rednet.announce()
repeat
  senderId, message, distance = rednet.receive(1)
  if senderId and string.len(message)>1 then
  if nick[senderId]~="&new" or compare("/nick ")==1 then
    if compare("/")==1 then
      if compare("/join ")==1 and string.len(message)<=23 and string.len(message)>=1 and compare(" #")==6 then
        channel[senderId]=string.sub(message, 7)
        post(addTime() .. "*" .. nick[senderId] .. " has joined " .. channel[senderId])
      elseif compare("/me ")==1 then
        post(addTime() .. "*" .. nick[senderId] .. " " .. string.sub(message, 5) .. "*")
      elseif compare("/nick ")==1 then
        local oldnick= nick[senderId]
        if string.sub(message,7,23)~="&new" then
          nick[senderId] = string.sub(message, 7, 23)
          if nick~=oldnick and oldnick~="&new" then
            post(addTime() .. oldnick .. " changed his nickname to " .. nick[senderId])
          end
        end
      elseif compare("/help")==1 then
        sendHelp(senderId)
        newline()
        mon.write(addTime() .. nick[senderId] .. " requested help.")
      elseif compare("/msg ")==1 then
        msgStart = string.find(string.sub(message,6)," ")
        if msgStart>1 then
          postPrivate(string.sub(message,6,msgStart-1),string.sub(message,msgStart))
        end
      elseif compare("/quit ")==1 or compare("/quit") then
        if nick[senderId]~="&new" then
          post(addTime() .. "*".. nick[senderId] .. " has quit IRC (" .. string.sub(message,7) .. ")")
          nick[senderId]="&new"
        end
      elseif compare("/who")==1 then
        listUsers(userId)
      end
    else
      post(addTime().. "<" .. nick[senderId] .. "> " .. message)
    end
  else
    p(senderId,"@ircYou are not connected to IRC! type /join #irc")
  end
  end
until redstone.getInput("front")
rednet.close("left")
term.clear()
term.setCursorPos(1,1)
term.write("Closed Server!")
newline()
mon.write(addTime() .. "Closed Server!")
term.setCursorPos(1,2)

IRCclient
Note: Change SERVER = 29 to the ID of the server computer.
Code: [Select]
SERVER = 29
breakfree = false

function newline()
  term.scroll(1)
  term.setCursorPos(1,12)
end

function put(str)
  newline()
  term.write(str)
end

rednet.open("left")
rednet.announce()
function enterNick()
  term.clear()
  term.setCursorPos(1,1)
  print("Enter nickname:")
  username = read()
  if string.len(username) and string.len(username)<=16 then
    rednet.send(SERVER,"/nick " .. username)
    rednet.send(SERVER,"/join #IRC")
    return 0
  else
    return enterNick()
  end
end

enterNick()
function1 = function()
  while true do
    local senderId, message, distance = rednet.receive(1)
    if senderId and string.find(message,"@irc")==1 then
      local x,y = term.getCursorPos()
      put(string.sub(message,5))
      term.setCursorPos(x,y)
    end
    if redstone.getInput("front") then
      breakfree = true
      return
    end
  end
end

function2 = function()
  term.setCursorPos(1,14)
  local message = read()
  if string.find(message,"/quit")==1 then
    breakfree=true
  end
  rednet.send(SERVER,message)
  term.setCursorPos(1,14)
  term.write("                                                  ")
end

while not breakfree do
  parallel.waitForAny(function1,function2)
end
rednet.send(SERVER, "/quit Client")
rednet.close("left")

I typed and debugged all of this using the ingame editor. It really sucks there are no linenumbers.

Edit: There is just one glitch: You can join with a name that is taken, so for instance when Keoni29 is on the IRC another guy can impersonate me by joining with the same nickname. It's probably quite easy to fix, but I leave that to someone else. I have had enough of the tekkit lua programming.

Pages: 1 ... 96 97 [98] 99 100 ... 168