Sharing your programs

Topics covering the 6502 emulator in Ranger Citadel: tutorials, specs, source code and share your work!
Post Reply
Joby
Scholar
Posts: 129
Joined: February 23rd, 2012, 9:21 am
badge image for 4o80c0.png

Ok, so this is where I admit I should have designed the computer a little differently.

Using a binary file as a diskette is cool for discovery for people poking around resource files, but isn't the best way to actually share things online. Having a binary file as an attachment and downloading from random strangers... um... yeah. Derp. :roll: :lol:

I really should have made an option of loading/parsing text files, and will probably do so in the future if there's a large enough demand. However, until then, sharing will have to consist of assembly code and/or object code. Personally, I'm all for providing source code as a tool for others to learn from, so I'll be posting both myself.

Once Wasteland 2 launches I'll post the full source code for the snake game and have a little tutorial on what it's doing and how it works.

Once the second computer and easter egg program is discovered, I'll share that source code as well. :o Oops... did I say there's another computer easter egg? Shame on me for leaking that. :twisted: I don't think anyone will find it though.
- Joby
inXile's ruthless Leader of Scripters
User avatar
Drool
Forum Moderator
Posts: 10185
Joined: March 17th, 2012, 9:58 pm
badge image for 5p2s6t.png
badge image for ijw2ib.png

Man, this functionality would be the best use of Steam Workshop ever.
Alwa nasci korliri das.
Joby
Scholar
Posts: 129
Joined: February 23rd, 2012, 9:21 am
badge image for 4o80c0.png

Drool wrote:Man, this functionality would be the best use of Steam Workshop ever.
Yeah... the thought has crossed my mind... ;)
- Joby
inXile's ruthless Leader of Scripters
User avatar
Gizmo
Grandmaster
Posts: 3863
Joined: March 6th, 2012, 6:25 am
badge image for 5p2s6t.png
badge image for 3rz1is.png
badge image for ijw2ib.png

How ironclad is Unity's sandbox?

Also... do you think it's possible to run a native C64 game on the terminal?
And Does this mean that it might be possible to play the Apple II version of Wasteland on the terminal?
Joby
Scholar
Posts: 129
Joined: February 23rd, 2012, 9:21 am
badge image for 4o80c0.png

Gizmo wrote:How ironclad is Unity's sandbox?

Also... do you think it's possible to run a native C64 game on the terminal?
And Does this mean that it might be possible to play the Apple II version of Wasteland on the terminal?
Both C64 and Apple have unique hardware and software/ROM specs. The resolution alone is different for this computer... so no. This is its own computer. However, I'm all for continuing to enhance it, add features, preload a more robust ROM, etc, so if people want to contribute and help advance the computer's design, let's go for it!

What do you mean by Unity's sandbox?
- Joby
inXile's ruthless Leader of Scripters
User avatar
Gizmo
Grandmaster
Posts: 3863
Joined: March 6th, 2012, 6:25 am
badge image for 5p2s6t.png
badge image for 3rz1is.png
badge image for ijw2ib.png

Joby wrote:Both C64 and Apple have unique hardware and software/ROM specs. The resolution alone is different for this computer... so no. This is its own computer. However, I'm all for continuing to enhance it, add features, preload a more robust ROM, etc, so if people want to contribute and help advance the computer's design, let's go for it!
8-)

What do you mean by Unity's sandbox?
That can be taken as an answer. :D

*I meant when running its internal code and script, can the game for example write a file outside of the game folder ~even to the Desktop... Windows has default locations to search for DLLs, and if anyone could write a 6502 program that drops a file wherever they choose... They could write their own ddraw.dll or the like and find a way to get it loaded, or rewrite notepad.exe; or just an Internet shortcut to a malicious website. A sandbox in this case means that the program isolates any internal [untrusted] code from accessing the file system and/or certain system variables.

It's not the same meaning as a sandbox ~game.
http://en.wikipedia.org/wiki/Sandbox_%2 ... ecurity%29
Joby
Scholar
Posts: 129
Joined: February 23rd, 2012, 9:21 am
badge image for 4o80c0.png

Well, it's not just Unity to get around, the entire 6502 computer is simulated based on what would have been real hardware specs. The processor is not executing the binary in any normal sense, it's just looking at it and then manipulating it's own internal "memory" and "registers" (an array of bytes and a couple variables) based on thinking of that data as instructions. Unknown opcodes ends the computers operation, so it can only do a small set of simple manipulations to its own internal array of data as defined by a 6502 processor. There are no hooks into Unity itself for the 6502 to take advantage of for doing what it does. No calling to Unity to execute a string of data. It's just basic C# manipulation of an array. The computer has no disk drive or any sense of writing a file, or even preserving data across multiple sessions.

When I said sharing programs in binary was a bad idea, it's not from a security sense. It's from a norm of society and acceptability... a comfort level. The Diskette file could have just as easily have been a text file.
- Joby
inXile's ruthless Leader of Scripters
User avatar
Gizmo
Grandmaster
Posts: 3863
Joined: March 6th, 2012, 6:25 am
badge image for 5p2s6t.png
badge image for 3rz1is.png
badge image for ijw2ib.png

Aha... So the disk file is loaded by Unity into RAM, not that the emulator reads the file as a disk. 8-)
UncleSporky
Scholar
Posts: 144
Joined: April 25th, 2012, 4:21 pm

Hey!

Where's the source for this Snake game you promised? :P

I've tried a couple ways to automatically disassemble it but I haven't gotten anything useful yet. Granted I haven't tried very hard.
User avatar
The Tallest
Adventurer
Posts: 972
Joined: March 15th, 2012, 3:30 am

Has no one written or imported anything yet?

Also, found this while Googling 6502 code:

http://6502.org/source/games/uchess/uchess.htm
I am a member of Macho Yintit's Society for Pantsless Landsharks.
David Ngo wrote: There are two kinds of people: sheep and sharks. Sharks are winners, and they don't look back because they have no necks. Necks are for sheep.
Joby
Scholar
Posts: 129
Joined: February 23rd, 2012, 9:21 am
badge image for 4o80c0.png

UncleSporky wrote:Where's the source for this Snake game you promised? :P
You don't need to be helped any longer. You've always had the power to get the source code. Close your eyes and tap your heels together three times. And think to yourself, 'There's no game like Wasteland 2'.

(Failing that, I'll see about posting stuff...)

EDIT:
Posted stuff. ;)
- Joby
inXile's ruthless Leader of Scripters
User avatar
Gruftlord
Explorer
Posts: 453
Joined: September 23rd, 2014, 2:43 am

what sorcery is this? i clicked on this subforum out of curiosity and now i'm leraning to program assembly? :shock:
Post Reply

Return to “The Ranger Citadel 6502 Computer”