Jump to content


Lewisk3's Content

There have been 12 items by Lewisk3 (Search limited from 08-July 19)


By content type

See this member's

Sort by                Order  

#267919 HexIt - The ultimate Hex Editor for computercraft!

Posted by Lewisk3 on 29 June 2017 - 10:47 PM in Programs

View PostBomb Bloke, on 28 June 2017 - 11:49 PM, said:

I'm having difficulty with this; requesting a search "up" goes from the top of the file down (instead of going upwards from the cursor), and requesting a search "down" often does the same (seemingly dependant on where you scroll the view to first - it also doesn't seem to care where the cursor is).

"Downwards" searches furthermore tend to simply re-find the already selected value (if it's a match), which is less than useful.

A simple hotkey to repeat the last search (eg F5) would be much faster than manually having to reselect the past text, reselect the past direction, and reselect the "jump to position" option. Speaking of which, being forced to use the keyboard to "press a key" before simply being given another yes/no prompt is a bit annoying, especially when the answer is always going to be "yes". Just display the address for a half-second (if at all: really the current cursor position should be constantly visible somewhere) and then do the jump. Ditto for jumps via the Address menu.

Goto's address history seems to be sharing Search's value history.

All the above issues should now be fixed. Thanks for the suggestions!



#267856 HexIt - The ultimate Hex Editor for computercraft!

Posted by Lewisk3 on 27 June 2017 - 09:11 AM in Programs

View PostSquidDev, on 27 June 2017 - 08:28 AM, said:

This looks great! I'm impressed that you've added keyboard shortcuts - always a plus!

A interim solution might be to add a "status bar", with information such as the current address and binary/decimal representations of the selected character.

Thanks, also, Nice idea.

Will be sure to add something like that.



#267852 HexIt - The ultimate Hex Editor for computercraft!

Posted by Lewisk3 on 27 June 2017 - 06:27 AM in Programs

View PostBomb Bloke, on 27 June 2017 - 12:57 AM, said:

Just the other day I was bemoaning the lack of hex editing functionality in CC, and the unlikeness that anyone would ever produce a "decent" script to fill the gap. I reckon I'll find uses for this! :)

If you'd consider it, I wouldn't mind an upgrade to the search system - being able to search up / down from the cursor would be handy, as would the option to repeat the last search.

Perhaps rather more difficult, but also useful, would be the option to switch from hex to binary or decimal display modes.

Search system has been upgraded, now features Up and Down as well as saved searches. (Which can be cleared from the search menu.)

As far as rendering decimal or binary, that would require massive changes to the renderer for each. Might be able to figure out something though.

Thanks for the suggestions!



#267826 HexIt - The ultimate Hex Editor for computercraft!

Posted by Lewisk3 on 26 June 2017 - 12:00 AM in Programs

Wojbie, on 25 June 2017 - 11:35 PM, said:

I do believe that stuff on right is preview of hex data in middle? Like most hex editors do? You can even decode in manually. It matches exactly data shown in middle of program.

My apologies for the confusion, the text on the right is the translation of the hex on the left into Ascii. In this case the screenshots show the code from my 6502 emulator.



#267811 HexIt - The ultimate Hex Editor for computercraft!

Posted by Lewisk3 on 25 June 2017 - 02:50 AM in Programs

Hex It

Posted Image

What is HexIt?
HexIt is a Hex Editor for CC meaning, You can edit files Byte by Byte and not Character by Character.
This is extremely useful for, editing already compiled programs, editing ROMs, even writing Assembly from scratch!


What are the features of HexIt, so far?
HexIt features not only a way to edit just Hex, clicking on the Ascii side you can also input characters.
HexIt also features tons of ways to edit your program more efficiently like,
  • Changeable hex file sizes.
  • Find string/hex.
  • Insert/delete hex and ascii.
  • 2 edit modes, one that automatically submits the edit once you fill the text (fill), and a manual mode. (Return, Which changes when you press enter).
  • Temporary hex files that are only created when you save them.
  • Address jumping
  • A saveable address which you can use later to jump back to.
Where can i download this?
The program is available on pastebin: pastebin get DxWtA0LA HexIt



No pics, no clicks? No problem!
Screenshots
Spoiler

My awkward attempt at a tutorial video:


Changelog:
Spoiler



#266271 6502 CPU Emulated in Lua

Posted by Lewisk3 on 13 April 2017 - 09:41 PM in APIs and Utilities

View PostBomb Bloke, on 12 April 2017 - 11:51 PM, said:

View PostLewisk3, on 12 April 2017 - 08:00 AM, said:

View PostBomb Bloke, on 12 April 2017 - 01:46 AM, said:

I was under the impression that it was not an exact copy.
Yeah, this emulated version is pretty exact, ....
Er, "it" as in the Redpower Computer being discussed.
I understand, i was mainly replying to share some more information about the emulator and for referencing sake just in case another discussion of the Redpower computer starts up, making sure
people know my emulation is more exact than redpowers.



#266248 6502 CPU Emulated in Lua

Posted by Lewisk3 on 12 April 2017 - 08:00 AM in APIs and Utilities

View PostBomb Bloke, on 12 April 2017 - 01:46 AM, said:

I was under the impression that it was not an exact copy.

Yeah, this emulated version is pretty exact, all 148 instructions had the same OP Codes as they do on your normal 6502, the only thing that isn't exact is the register-based instructions, as A, X and Y decode to 01, 02 and 03 which they do not on the original 6502.

But the emulator also has some extended features such as a lot of screen dedicated memory, specially designed for Computercraft colors and such.
I will make another mode that is for non-CC based things as I do have a Pure Lua port of this on the todo.



#266081 [2019] [1.12.2] [Survival] LurCraft : We're back, and better than ever!

Posted by Lewisk3 on 04 April 2017 - 07:25 AM in Servers

Lurcraft Beta - Application


IGN: Lewisk3

Programming Knowledge: 10

Age : 17




#265840 6502 CPU Emulated in Lua

Posted by Lewisk3 on 26 March 2017 - 07:33 PM in APIs and Utilities

View PostSquidDev, on 26 March 2017 - 04:08 PM, said:

Oh wow, this is impressive. Making an emulator for a real CPU has been on my todo list for a while, but it looks like you beat me too it. I guess this begs the question, how long is it til you'll be able to emulate something like the BBC Micro or Redpower's computer?

Thanks for the support!
This project is the biggest CC program I have ever made, it's been challenging getting everything working, especially the syntax.
I think before any of that happens, i have to get multi-line code execution up and running, which involves a working assembler that can handle labels and variables. (I have a couple ideas about how to do this)
But my biggest hope is to emulate the NES's GPU and screen memory processing then maybe i could get some sort NES games running on CC! given, not with the same graphics or speed as on the actual System.



#265821 6502 CPU Emulated in Lua

Posted by Lewisk3 on 26 March 2017 - 12:37 AM in APIs and Utilities

6502 Emulation in Computercraft (Fully working Assembler)


What is 6502?
6502 is an older CPU running off an 8bit Assembly language, most commonly used in the 80s
It was soo common, even the Terminator was programmed on it!

Assembly in Computercraft what?!?!
The main reason I choose to emulate the 6502 language onto CC was that, well I really enjoy the language and
I wanted to challenge myself to see if I could even do it, with 14 days of continuous study and lots and lots of coding,
here we are!

What are the features of this program so far?
It is a fully functioning 6502 CPU, everything works to that of ~90% accuracy compared to the original, physical version.
Individual features - Multiline Execution, Assembler with label, variables and Decimal Coded Byte support, Syntax Interpreter and Graphical Execution, The entire 6502 Assembly OpCodes.


Memory Specs
The memory method I use utilizes the string.char library to store 1 byte per virtual emulated byte.
Memory - 64K
Stack - 256B
Screen memory - 792B (0200 to 0990, counting end and start indexes.)
Key input - $FF
Random generator - $FE
Each address of the memory is an index divisible by 16, as 16 bytes are used per index, the remainder of this number becomes the memory offset.

Bug Testing
As there are 148 different instruction modes in 6502, I am going to need some help testing if they all work the way they are intended,
if any bugs are found, please post about them below!


Download: pastebin get jEtwni5z 6502
Editor: pastebin get 4YdqE1zS editasm
Example that features key input RNG and screen rendering: pastebin get WxMivJq5 test.asm

P.S I'm also working on getting it working with any vanilla Lua IDE!
Special thanks to, SquidDev for help with the compiler!


Tutorials:
Spoiler


Screenshots:
Spoiler




Update 6/20/17
- Some changes in optimization have broken the screen renderer, I apologize that I didn't notice that sooner, it has been fixed.
- New experimental version (qJ4rjZ8Q, has an extra run mode that is slightly faster. Also, includes an ISP (Instructions Per Second) counter.
- Found a bug with the variable char conversion that made assigning a variable a char, effectively useless, fixed that.

- Added Decimal Flag support!
- Fixed some grammar issues on this page :P



#257099 Progdor - An even easier way to bundle a folder into one file

Posted by Lewisk3 on 30 July 2016 - 08:12 AM in APIs and Utilities

View PostEldidiStroyrr, on 30 July 2016 - 12:45 AM, said:

There is no compression, because that is hard. Forget about encryption. It does support empty folders, though, so that's something.

there is a simple solution for compressing, replace all spaces with byte(0) its a little smaller than byte(32) :)
Lol, i have started learning Assembly and stuff and now i realize what Lignum said. As 0 is still interpreted as an ASCII (8bit char) by computercraft.



#257098 Periodic Table of Elements (Scrollable, clickable, colored!)

Posted by Lewisk3 on 30 July 2016 - 07:57 AM in Programs

View PostEldidiStroyrr, on 01 June 2016 - 07:14 PM, said:

Electron configuration is coming soon! Man did that confuse me in chemistry class.

Electron configuration is a breeze for me if you would like me to help, here's a program i made to calculate configs from atomic number it isn't perfect as
some elements have strange sub-orbital fills for instance Au (Gold) it fills the 3d before 4s when most others fill 4s before 3d (Scientist think it has to do with protons in the nucleus)

Program -> http://pastebin.com/w1aYywVX

P.S before i made this i wasn't aware of the nuclear strong force (don't ask me why lol) but yeah no atom could have 570 electrons because
that would imply that it had 570 protons which would be impossible because the force between the positive charges would explode the nucleus
as the force between just 2 protons is that of 36lbs or (16.3293kg)!!!