2016년 6월 29일 수요일

[NES 개발번역] CC65 설치

CC65 설치 

어셈블러는 소스 코드의 언어를 기계어 코드로 조립하여 번역하는 프로그램이다. 보통 6502 CPU 용인 기계어 코드를 만드는데 사용되는 어셈블러는 CC65 패키지의 일부에서 배포되는 CA65이다. 이 지침에서는 설치 방법과 CA65를 윈도우즈 2000 이나 윈도우즈 XP에서 구동하는 방법을 알려준다.

윈도우즈 구성

윈도우즈는 윈도우즈 탐색기에서 파일 확장자를 숨겨서 보여준다. 이 형편없는 기능은 원래 윈도우즈 95를 파일 확장자를 사용하지 않는 Mac OS 7.5 처럼 보이게 하려고 만든 기능이다. 하지만 숨김 기능은 실수로 파일 확장자 명이 두 개가 되기 쉽게 만든다. 더 나쁜건, ILOVEYOU 웜 바이러스 같은 악질 소프트웨어가 두 개의 확장자를 갖고 있다는 것이다: 하나는 운영체제에서 실행가능한 파일을 가리키고 나머지 하나는 그 파일이 실행 할 수 없다(그래서 안전하다)라고 사용자에게 생각하게 만든다. 우리가 우선 할 것은 윈도우즈 탐색기에서 파일 확장자를 표시하기를 해주는 것이다 (역주: 이하 번역 안할란다.. 이 쉬운걸 굳이..):
  1. Open Control Panel. (This may be in Start > Control Panel or Start > Settings > Control Panel.)
  2. In Windows XP, if "Pick a category" shows up at top center of the window, click "Switch to Classic View".
  3. Open Folder Options and activate the View pane.
  4. In the scrolling list of Advanced Options, turn make sure that "Hide extensions for known file types" is not checked.
  5. Press OK to put the change into effect.

7-Zip 구성

Windows 2000 does not come with software to extract files from PKZIP archives. Windows XP comes with a bare-bones archiver called Compressed Folders that can only handle PKZIP archives (.zip), not rar or 7z or tar or gz or bz2 files. The 7-Zip package can extract files from all of them, as well as add files to PKZIP and 7-Zip archives.

CC65 내려받기

  1. Read the front page of CC65's web site.
  2. Scroll down to "Download". At the bottom of this section is a list of mirrors.
  3. Enter one of the mirrors, and download the cc65-win32-#####.zip and cc65-doc-#####.zip packages to your computer. (The ##### represents a version number, such as 2.11.0-1, which may change before you read this.) The cc65-win32 contains the CC65 package compiled for Windows, and cc65-doc contains the manual.
  4. Extract cc65-win32-#####.zip to a new folder.
  5. Open this folder and run the install.vbs file as an administrator to copy it to Program Files.
  6. Delete this folder.
Log out and log in to complete installation.

우분투(리눅스) 에서 CC65 빌드

Absolute easiest method:
Set up you repository there as it says on the homepage. Using software sources and import the gpg key. or add: deb http://debian.trikaliotis.net/ stable contrib to your software sources list.
Download: KeyFile add to authentication sources.
Then: sudo apt-get install cc65
Done.! Enjoy.
//------------------
Note: I'll add a link to the compile.txt in the docs at the cc65 site later. Note2: I must be really tired, I never even thought of just modifying the makefile. Note2: Ignore "Method 2". And I'll clean this up in the morning. Note3: If enough people want it and tell me so on the userpage, I'd be more than willing to upload a package somewhere.

Unzip the source, move that top-level folder somewhere; I just dragged it from the archive onto the Desktop. Open a terminal and get to your Desktop folder (or where ever you put it):
$ cd cc65-VERSION/make $ make -f make/gcc.mak
Now once that finishes, rename gcc.mak to makefile, then open it, and remove the text "make/" from line 37. If you don't want a particular executable installed (and also packaged), on line 134, remove the name of the program. If you're programming for the NES, chances are you don't need the C compiler, so you'd remove "cc65". Next, you'll need to rename the top-level make folder to the name of its parent folder, as checkinstall will otherwise use "make" as the name of the package. I did this by accident, and it took me a whole 15 minutes to force the reinstallation of the make utility and make sure the spurious/incorrectly named cc65 package was removed. After you remove the top-level make to the same as the parent, enter that newly renamed folder and run "sudo checkinstall". Give it a nice descriptive name, modify any other items you feel like, and hit enter. It should do its thing, install the program, and output a .deb package into the folder.
I did not use this method, so attempt it carefully. I used the below method which doesn't modify any files but it does copy the ENTIRE directory tree into itself, along with some more complex directory/file renaming.
METHOD 2
Replace VERSION with the rest of the folder name after "cc65-". It doesn't take long to make the entire suite of programs. After you've built it, you could probably install by just saying "make -f make/gcc.mak install", and perhaps you'll want to (I didn't try this). Others, such as myself, want to make sure it can be removed. For this, we use the checkinstall program. The problem is, the installation runs a script file with a hardcoded path from the main directory to place each executable. While you could play with the makefile, I had success with a somewhat more hackish solution:
Rename the make directory to the same thing as the top level cc65 directory. Then, enter the directory you just renamed and create a folder called make. Put a copy of install-sh into this new make folder. Now copy all the folders except the recently renamed one INTO the recently renamed one. Then, rename gcc.mak to makefile and run "sudo checkinstall" from the directory that has makefile in it (Desktop/cc65-2.10.1/cc65-2.10.1 for example).

댓글 없음:

댓글 쓰기

BE Band (비밴드) - 2024년 03월 02일 잠실새내 락앤롤욱스 공연

나의 10~20대를 보낸 잠실에서의 공연.. 오랜만에 가보니.. 여기가.. 마눌님과 자주 가던 영화관이었는데... 여긴 뭐가 있었는데... 란 추억도 떠올리며 기분좋게 감.​ 공연장은 좀 협소한 편이었고, 인천의 쥐똥나무 보다는 약간 크고... 인천 ...