在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):cnlohr/avrcraft开源软件地址(OpenSource Url):https://github.com/cnlohr/avrcraft开源编程语言(OpenSource Language):C 78.0%开源软件介绍(OpenSource Introduction):avrcraft (For Minecraft 1.11)Minecraft server optimized for 8-bit devices. Check out the AVR version of this in this video: http://www.youtube.com/watch?v=EZRLOanNQ_w This has a few subprojects.
+indicates available tests. Installing Minecraft 11.1Install JDK 8
Download the official Minecraft Launcher. Click "Minecraft: Java Edition"
Click the "Installations" tab.
Create a new installation.
Select Minecraft 1.11 from the list.
Under more settings, select Launch! LICENSEAll code in this repository that was authored by me is freely licensable under the MIT/x11 or NewBSD licenses. Original README (For running on 8-bit AVRs)My 8-bit Microscope Slide Minecraft Server All contents is Copyright 2012 <>< Charles Lohr All code and documentation is licensed under the MIT-x11 or NewBSD license. You choose. See license info at the end of this readme. You can use this minecraft server and associated TCP/IP stack commercially. Check out the AVR version of this in this video: http://www.youtube.com/watch?v=EZRLOanNQ_w This has a few subprojects.
----Overview---- This is my 8-bit AVR Minecraft Server... and some extra goodies. This package includes:
The AVR folder contains:
Oh yeah, with debugging on, this all fits in about 17kB. Depending on your settings (dumbcraft circular buffer, etc.) you can use from about 600 bytes of static RAM to about 1.5 comfortably. Sadly this does not include the stack, so if you can push data to the clients and forget about it, that's probably for the best. ----What the dumbcraft does (and doesn't do)---- Dumbcraft is split into a C file for the core, and a user C file that contains various action-related functions that you must support, i.e.:
The .C file contains the core dumbcraft toolset. Because it doesn't support any mode of communications with the outside world, all communications must be done through various functions. These functions interface What works:
What doesn't work:
Take a look through dumbcraft.c to get a better hint as to how this all goes together. ----Mapmake---- Map make creates a chunk to be sent by 0x33. This code doesn't seem to work very well... It seems to work well enough to make big plot of green ground. Try dinking with this to figure out why some other chunk types don't work? It's used to generate the 'mapdata' buffer used in dumbcraft.c ----My IP Stack---- I wrote my own TCP/IP stack for this project, I've been working with it for quite some time and I needed a good test. Minecraft has shown to be an excellent test. It uses an ENC424j600 from Microchip in SPI mode. It doesn't use the SPI hardware on an AVR, instead it bit bangs all communications with it. This is to make it possible to put it on any geographically convenient pins. (I do this on one-layer) The stack contains the main MAC code and a file for the low level SPI functionality. Since the SPI has to be really fast, I've opted to write it in assembly. If you want to use the TCP/IP stack, you can feel free to copy it all out, including test.c and rip out my code. You'll need the basic callbacks from TCP or UDP, but other than that you're good to go. Reconfigure eth_config.h to your situation and profit. You can get a UDP server in a little under 4kB, and TCP for an extra ~2.5k more. I included an HTTP server with it, but it barely counts as an HTTP server since it requires additional code to serve ... anything. You can see that it is difficult to get it to server webpages from the SD card :-/. ----My FAT32/SD SPI Stack---- This stack is still pretty buggy but lets you read files from a FAT32 partition on a SD card. It can either bin the root or in the FIRST partition. It can list files in a folder, seek to folders, open files and read them sequentially... that's... about... it. The SD driver supports SDHC and SD cards and supports reading/writing at the block level. Keep in mind the FAT32 driver does not support writing. Consider the test.c in the avr folder an example of how to do this. ----Building---- You'll need at the minimum: avrdude, avr-gcc and basic build-utils. I recommend you get my copy of tinyispterm since that'll help you debug. It prints debugging data through the SPI port if -DMUTE_PRINTF isn't set. Everything's geared around a TinyISP from LadyAda... I personally use a tiny variant of it I designed. You can get the single-layer designs and the tool here: https://github.com/cnlohr/tinyispterm The hardware details for this project can be found in the avr_hardware folder. I am not a trained electrical engineer. You will have to know your stuff before venturing on this project! It is tricky, and I didn't really document anything very well. I designed the PCB in ExpressPCB and designed the schematic later. They don't match and I got frustrated, so trust the PCB over the SCH. Yes, it's a single layer. No, there are no jumpers. ----Resources and Thanks---- Special thanks to the folks at #mcdevs. They made this awesome thing here: http://www.wiki.vg/Protocol Thanks to nickelpro at #mcdevs for helping me with 1.7 support. I used a few guides when working on the SD card code. http://www.esawdust.com/blog/serial/files/SPI_SD_MMC_ATMega128_AVR.html http://elm-chan.org/docs/mmc/mmc_e.html For the FAT32 driver, I used this: http://staff.washington.edu/dittrich/misc/fatgen103.pdf ----The MIT/x11 License---- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----The NewBSD License---- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论