commit fcd6316c7f86b34cbdcb8dbdbe2c292857419dc8 Author: ken Date: Sun Feb 22 13:24:11 2026 -0800 Initial Commit diff --git a/16c.obj b/16c.obj new file mode 100644 index 0000000..727eb2a --- /dev/null +++ b/16c.obj @@ -0,0 +1,6151 @@ +# $Id: 16c.obj 689 2005-05-26 23:59:29Z eric $ +# Copyright 2004, 2005 Eric L. Smith + +# Contents of 16C ROM +# Extracted on 25-Jan-2004 +# Modified on 5-May-2005 + +0000:1cf +0001:04e +0002:270 +0003:238 +0004:2ee +0005:0ff +0006:231 +0007:00c +0008:1a1 +0009:00c +000a:06e +000b:304 +000c:184 +000d:19d +000e:002 +000f:000 +0010:308 +0011:166 +0012:14a +0013:0ee +0014:14c +0015:14d +0016:146 +0017:14b +0018:024 +0019:04e +001a:220 +001b:03c +001c:106 +001d:130 +001e:018 +001f:3e0 +0020:065 +0021:000 +0022:366 +0023:360 +0024:2e0 +0025:1fd +0026:042 +0027:01c +0028:2e0 +0029:320 +002a:3db +002b:1b8 +002c:106 +002d:016 +002e:138 +002f:3e0 +0030:313 +0031:195 +0032:0f3 +0033:0ed +0034:0fd +0035:14e +0036:000 +0037:0c9 +0038:320 +0039:231 +003a:00c +003b:065 +003c:000 +003d:366 +003e:177 +003f:384 +0040:1a1 +0041:00c +0042:2d9 +0043:000 +0044:304 +0045:204 +0046:244 +0047:084 +0048:065 +0049:000 +004a:130 +004b:075 +004c:29c +004d:366 +004e:15b +004f:130 +0050:017 +0051:366 +0052:073 +0053:130 +0054:012 +0055:366 +0056:1e9 +0057:052 +0058:130 +0059:014 +005a:366 +005b:153 +005c:226 +005d:366 +005e:187 +005f:088 +0060:2d9 +0061:000 +0062:305 +0063:050 +0064:08c +0065:3ef +0066:20b +0067:014 +0068:073 +0069:081 +006a:000 +006b:133 +006c:060 +006d:000 +006e:000 +006f:000 +0070:158 +0071:173 +0072:0f4 +0073:0ec +0074:0fe +0075:0d7 +0076:1a3 +0077:0cc +0078:327 +0079:210 +007a:29c +007b:102 +007c:1b8 +007d:202 +007e:1a8 +007f:093 +0080:156 +0081:177 +0082:0e9 +0083:0ea +0084:16f +0085:1c9 +0086:00e +0087:155 +0088:1ae +0089:26d +008a:00c +008b:131 +008c:018 +008d:01b +008e:304 +008f:204 +0090:244 +0091:284 +0092:104 +0093:144 +0094:06e +0095:235 +0096:008 +0097:06e +0098:20c +0099:0cf +009a:304 +009b:38c +009c:001 +009d:023 +009e:184 +009f:344 +00a0:21d +00a1:01c +00a2:38c +00a3:269 +00a4:044 +00a5:084 +00a6:35c +00a7:006 +00a8:1d9 +00a9:042 +00aa:04e +00ab:220 +00ac:330 +00ad:05a +00ae:1bc +00af:170 +00b0:2e0 +00b1:3e0 +00b2:0e1 +00b3:00c +00b4:091 +00b5:032 +00b6:3c8 +00b7:3cc +00b8:3f7 +00b9:130 +00ba:004 +00bb:3c8 +00bc:3cc +00bd:266 +00be:3eb +00bf:3e0 +00c0:157 +00c1:14f +00c2:0f7 +00c3:0eb +00c4:0ff +00c5:0d3 +00c6:000 +00c7:0cd +00c8:182 +00c9:0d4 +00ca:173 +00cb:166 +00cc:166 +00cd:0d4 +00ce:173 +00cf:0d1 +00d0:00c +00d1:09c +00d2:16b +00d3:2cc +00d4:37d +00d5:007 +00d6:153 +00d7:2cc +00d8:1bd +00d9:04f +00da:214 +00db:1bf +00dc:314 +00dd:1af +00de:154 +00df:09f +00e0:254 +00e1:013 +00e2:00c +00e3:141 +00e4:006 +00e5:006 +00e6:05c +00e7:004 +00e8:133 +00e9:166 +00ea:166 +00eb:166 +00ec:166 +00ed:166 +00ee:154 +00ef:107 +00f0:054 +00f1:0f7 +00f2:166 +00f3:166 +00f4:294 +00f5:0d7 +00f6:166 +00f7:166 +00f8:094 +00f9:0b7 +00fa:166 +00fb:166 +00fc:166 +00fd:166 +00fe:166 +00ff:166 +0100:2cc +0101:13f +0102:354 +0103:14f +0104:054 +0105:08b +0106:356 +0107:02b +0108:130 +0109:110 +010a:1c6 +010b:14b +010c:166 +010d:3e6 +010e:183 +010f:31c +0110:17d +0111:042 +0112:31c +0113:162 +0114:39c +0115:143 +0116:356 +0117:127 +0118:130 +0119:006 +011a:154 +011b:02f +011c:294 +011d:06b +011e:146 +011f:0a3 +0120:39c +0121:302 +0122:01b +0123:146 +0124:07b +0125:31c +0126:162 +0127:063 +0128:19c +0129:01b +012a:04c +012b:047 +012c:3e6 +012d:016 +012e:1b6 +012f:3dc +0130:2d4 +0131:3eb +0132:386 +0133:0a6 +0134:044 +0135:004 +0136:054 +0137:12d +0138:00b +0139:0b9 +013a:022 +013b:3e6 +013c:048 +013d:016 +013e:135 +013f:02c +0140:1e1 +0141:042 +0142:38c +0143:027 +0144:388 +0145:001 +0146:022 +0147:384 +0148:245 +0149:002 +014a:166 +014b:166 +014c:166 +014d:166 +014e:166 +014f:166 +0150:166 +0151:166 +0152:166 +0153:166 +0154:166 +0155:166 +0156:166 +0157:166 +0158:166 +0159:2cc +015a:02f +015b:0d4 +015c:02f +015d:25c +015e:023 +015f:11c +0160:013 +0161:29c +0162:0bd +0163:00c +0164:0b1 +0165:006 +0166:0d4 +0167:2df +0168:314 +0169:137 +016a:214 +016b:127 +016c:2cc +016d:33f +016e:31b +016f:2cc +0170:31b +0171:29c +0172:1c3 +0173:2cc +0174:279 +0175:013 +0176:2f3 +0177:2cc +0178:1ff +0179:0d4 +017a:03f +017b:38c +017c:021 +017d:017 +017e:354 +017f:001 +0180:053 +0181:2e3 +0182:166 +0183:2cc +0184:277 +0185:0d4 +0186:267 +0187:166 +0188:31c +0189:153 +018a:31c +018b:162 +018c:162 +018d:166 +018e:166 +018f:130 +0190:050 +0191:146 +0192:2c4 +0193:3ed +0194:002 +0195:314 +0196:3c7 +0197:214 +0198:3b7 +0199:254 +019a:387 +019b:2cc +019c:14d +019d:007 +019e:1f8 +019f:1bc +01a0:046 +01a1:03c +01a2:1e8 +01a3:0d4 +01a4:305 +01a5:013 +01a6:2bd +01a7:012 +01a8:15c +01a9:166 +01aa:0d1 +01ab:00c +01ac:3fd +01ad:002 +01ae:2cc +01af:3cf +01b0:0d4 +01b1:297 +01b2:21c +01b3:0d1 +01b4:00c +01b5:3e1 +01b6:002 +01b7:0f1 +01b8:00c +01b9:38c +01ba:02f +01bb:1b8 +01bc:1fe +01bd:013 +01be:1fe +01bf:279 +01c0:002 +01c1:0b0 +01c2:05e +01c3:27e +01c4:10e +01c5:088 +01c6:004 +01c7:205 +01c8:024 +01c9:2d9 +01ca:000 +01cb:1a9 +01cc:032 +01cd:21c +01ce:1d0 +01cf:116 +01d0:196 +01d1:04e +01d2:0b6 +01d3:17c +01d4:09c +01d5:0aa +01d6:35c +01d7:350 +01d8:2d0 +01d9:25c +01da:3d0 +01db:3d0 +01dc:290 +01dd:2d0 +01de:323 +01df:3e9 +01e0:02c +01e1:05a +01e2:2e6 +01e3:02f +01e4:21c +01e5:1d0 +01e6:3d0 +01e7:350 +01e8:0f6 +01e9:056 +01ea:31c +01eb:222 +01ec:222 +01ed:39c +01ee:1e6 +01ef:106 +01f0:1ee +01f1:146 +01f2:1e6 +01f3:146 +01f4:04e +01f5:270 +01f6:1b8 +01f7:27c +01f8:3c6 +01f9:3c6 +01fa:2a2 +01fb:222 +01fc:01b +01fd:130 +01fe:010 +01ff:05a +0200:01a +0201:260 +0202:1c6 +0203:257 +0204:2a0 +0205:17a +0206:3db +0207:3e6 +0208:21c +0209:150 +020a:05a +020b:27a +020c:09c +020d:316 +020e:10f +020f:110 +0210:1d6 +0211:316 +0212:0d7 +0213:1d6 +0214:316 +0215:0cf +0216:3da +0217:3da +0218:3e6 +0219:166 +021a:316 +021b:01f +021c:166 +021d:1d6 +021e:01c +021f:176 +0220:276 +0221:316 +0222:013 +0223:090 +0224:0a6 +0225:2fc +0226:3c6 +0227:21c +0228:3d0 +0229:0d0 +022a:1bc +022b:0bb +022c:090 +022d:013 +022e:0d0 +022f:0a6 +0230:2f6 +0231:01f +0232:276 +0233:3da +0234:37c +0235:06b +0236:11c +0237:3d0 +0238:3d0 +0239:3e6 +023a:05c +023b:3d0 +023c:3ea +023d:0aa +023e:11c +023f:222 +0240:02b +0241:3d0 +0242:11c +0243:0aa +0244:3e0 +0245:262 +0246:0a6 +0247:2dc +0248:350 +0249:0be +024a:3c3 +024b:346 +024c:183 +024d:284 +024e:2a0 +024f:04e +0250:130 +0251:204 +0252:306 +0253:10b +0254:130 +0255:007 +0256:260 +0257:23a +0258:2a0 +0259:1c6 +025a:3e3 +025b:146 +025c:260 +025d:23a +025e:23a +025f:39c +0260:342 +0261:01f +0262:146 +0263:27a +0264:01a +0265:1ba +0266:25a +0267:046 +0268:03c +0269:3ee +026a:3ee +026b:0b6 +026c:0a6 +026d:3e9 +026e:02c +026f:2e6 +0270:023 +0271:31c +0272:24a +0273:023 +0274:05c +0275:17d +0276:042 +0277:2ea +0278:027 +0279:236 +027a:256 +027b:3cb +027c:08c +027d:315 +027e:023 +027f:3f5 +0280:02c +0281:30c +0282:03f +0283:20c +0284:02f +0285:3b8 +0286:05e +0287:3a8 +0288:04e +0289:0a6 +028a:3e8 +028b:0c5 +028c:032 +028d:20c +028e:01f +028f:30c +0290:0ab +0291:3e9 +0292:02c +0293:106 +0294:3f8 +0295:366 +0296:01f +0297:046 +0298:063 +0299:260 +029a:21c +029b:2e6 +029c:053 +029d:116 +029e:1d0 +029f:316 +02a0:04b +02a1:0b6 +02a2:236 +02a3:2dc +02a4:2f0 +02a5:3e0 +02a6:130 +02a7:1fc +02a8:3db +02a9:266 +02aa:21c +02ab:050 +02ac:3bb +02ad:3e9 +02ae:02c +02af:10e +02b0:130 +02b1:3f0 +02b2:1e6 +02b3:366 +02b4:203 +02b5:0ae +02b6:265 +02b7:00a +02b8:3f5 +02b9:02c +02ba:106 +02bb:056 +02bc:270 +02bd:038 +02be:1b6 +02bf:1b6 +02c0:360 +02c1:3ce +02c2:3ce +02c3:3e3 +02c4:0ae +02c5:1d8 +02c6:0ae +02c7:05e +02c8:05a +02c9:00e +02ca:2e6 +02cb:0eb +02cc:19c +02cd:250 +02ce:162 +02cf:1d0 +02d0:0ba +02d1:2a0 +02d2:15a +02d3:276 +02d4:3f3 +02d5:0dc +02d6:1d0 +02d7:260 +02d8:226 +02d9:39c +02da:2a0 +02db:1da +02dc:260 +02dd:262 +02de:3e3 +02df:31c +02e0:222 +02e1:03f +02e2:2a0 +02e3:35c +02e4:050 +02e5:050 +02e6:090 +02e7:15a +02e8:260 +02e9:25c +02ea:1aa +02eb:3e0 +02ec:276 +02ed:2f6 +02ee:05f +02ef:21c +02f0:1d0 +02f1:22a +02f2:0a6 +02f3:130 +02f4:0fd +02f5:0a6 +02f6:36a +02f7:017 +02f8:046 +02f9:2f0 +02fa:3e0 +02fb:026 +02fc:023 +02fd:3f5 +02fe:02c +02ff:0e6 +0300:3e9 +0301:02c +0302:05e +0303:3a8 +0304:04e +0305:0e6 +0306:3e8 +0307:3e0 +0308:2cc +0309:141 +030a:007 +030b:0d4 +030c:02f +030d:0d1 +030e:00c +030f:166 +0310:25c +0311:3f1 +0312:002 +0313:2cc +0314:057 +0315:0d4 +0316:02f +0317:0d1 +0318:00c +0319:008 +031a:3b3 +031b:0d1 +031c:00c +031d:39c +031e:001 +031f:006 +0320:2cc +0321:027 +0322:2c8 +0323:0d4 +0324:043 +0325:19c +0326:01b +0327:0dc +0328:2c4 +0329:044 +032a:004 +032b:0c4 +032c:0f9 +032d:006 +032e:35c +032f:044 +0330:3e6 +0331:016 +0332:386 +0333:04b +0334:0c1 +0335:00c +0336:176 +0337:3e0 +0338:344 +0339:044 +033a:0c4 +033b:084 +033c:184 +033d:004 +033e:2c4 +033f:3e0 +0340:013 +0341:033 +0342:073 +0343:0c3 +0344:083 +0345:082 +0346:0c2 +0347:072 +0348:032 +0349:012 +034a:010 +034b:030 +034c:070 +034d:0c0 +034e:080 +034f:087 +0350:0c7 +0351:077 +0352:037 +0353:017 +0354:011 +0355:031 +0356:071 +0357:0c1 +0358:081 +0359:084 +035a:0c4 +035b:074 +035c:034 +035d:014 +035e:018 +035f:038 +0360:078 +0361:0c8 +0362:088 +0363:084 +0364:0c5 +0365:075 +0366:035 +0367:015 +0368:130 +0369:151 +036a:2a6 +036b:0a6 +036c:04e +036d:270 +036e:1f8 +036f:1bc +0370:366 +0371:3a0 +0372:130 +0373:004 +0374:39c +0375:058 +0376:130 +0377:00b +0378:169 +0379:014 +037a:04e +037b:270 +037c:35c +037d:090 +037e:310 +037f:3d0 +0380:1a8 +0381:3c4 +0382:2c4 +0383:1a0 +0384:070 +0385:26e +0386:11c +0387:350 +0388:290 +0389:3d0 +038a:1b1 +038b:042 +038c:260 +038d:0a0 +038e:2e5 +038f:000 +0390:3cc +0391:360 +0392:060 +0393:000 +0394:1b8 +0395:13c +0396:31c +0397:04a +0398:17c +0399:1a8 +039a:3e0 +039b:08e +039c:158 +039d:138 +039e:0e8 +039f:1b8 +03a0:106 +03a1:1f8 +03a2:27c +03a3:31c +03a4:0aa +03a5:0bc +03a6:1e8 +03a7:06e +03a8:198 +03a9:3e0 +03aa:2dc +03ab:150 +03ac:2d4 +03ad:3f3 +03ae:04c +03af:3a0 +03b0:1ee +03b1:3e0 +03b2:0ee +03b3:1b8 +03b4:17c +03b5:3d8 +03b6:044 +03b7:0cc +03b8:013 +03b9:048 +03ba:3d8 +03bb:13c +03bc:1a8 +03bd:0ee +03be:3e0 +03bf:315 +03c0:00c +03c1:3cb +03c2:315 +03c3:00c +03c4:393 +03c5:0ee +03c6:1b8 +03c7:17c +03c8:3d8 +03c9:084 +03ca:2cc +03cb:3a0 +03cc:088 +03cd:3e0 +03ce:04e +03cf:15c +03d0:222 +03d1:39c +03d2:013 +03d3:1ee +03d4:1a2 +03d5:3f3 +03d6:10e +03d7:1b8 +03d8:0ae +03d9:3e0 +03da:0ae +03db:04e +03dc:270 +03dd:038 +03de:0ae +03df:3e0 +03e0:1bc +03e1:088 +03e2:1e4 +03e3:1e8 +03e4:0d8 +03e5:178 +03e6:17c +03e7:0a8 +03e8:1fc +03e9:1f8 +03ea:044 +03eb:040 +03ec:14c +03ed:0f4 +03ee:174 +03ef:000 +03f0:1bc +03f1:088 +03f2:1e4 +03f3:1e8 +03f4:0d8 +03f5:178 +03f6:17c +03f7:0a8 +03f8:1fc +03f9:1f8 +03fa:0fc +03fb:15c +03fc:134 +03fd:1cc +03fe:174 +03ff:074 +0400:3bf +0401:2c3 +0402:3be +0403:2c4 +0404:155 +0405:0c5 +0406:1bc +0407:0cc +0408:000 +0409:0d3 +040a:018 +040b:0d6 +040c:209 +040d:3e5 +040e:1f5 +040f:3e4 +0410:374 +0411:2e8 +0412:064 +0413:2d4 +0414:385 +0415:2e9 +0416:388 +0417:2e0 +0418:36c +0419:2d0 +041a:1de +041b:1c0 +041c:1af +041d:1b0 +041e:000 +041f:000 +0420:333 +0421:373 +0422:32f +0423:374 +0424:332 +0425:375 +0426:331 +0427:376 +0428:3ab +0429:0f4 +042a:399 +042b:0f9 +042c:38d +042d:2f6 +042e:282 +042f:194 +0430:353 +0431:071 +0432:00a +0433:284 +0434:0f1 +0435:29f +0436:21a +0437:190 +0438:21f +0439:180 +043a:24b +043b:170 +043c:237 +043d:160 +043e:042 +043f:0d5 +0440:200 +0441:023 +0442:1fc +0443:024 +0444:1ff +0445:025 +0446:1fe +0447:026 +0448:004 +0449:033 +044a:021 +044b:036 +044c:38e +044d:2f5 +044e:053 +044f:231 +0450:077 +0451:24e +0452:007 +0453:034 +0454:0b0 +0455:049 +0456:182 +0457:040 +0458:17f +0459:030 +045a:1ce +045b:020 +045c:1b1 +045d:010 +045e:371 +045f:2a0 +0460:368 +0461:2a1 +0462:37f +0463:2a2 +0464:37c +0465:2a3 +0466:028 +0467:2c1 +0468:3b1 +0469:2f3 +046a:3b8 +046b:2f8 +046c:3e2 +046d:1a7 +046e:19d +046f:0a8 +0470:1ae +0471:1a9 +0472:2ee +0473:1aa +0474:2ae +0475:1ab +0476:2bb +0477:1ac +0478:2b6 +0479:1ad +047a:2d8 +047b:1ae +047c:2d9 +047d:1af +047e:3a0 +047f:072 +0480:210 +0481:051 +0482:20f +0483:052 +0484:211 +0485:053 +0486:218 +0487:154 +0488:224 +0489:155 +048a:22b +048b:156 +048c:312 +048d:157 +048e:313 +048f:158 +0490:1c2 +0491:159 +0492:2b3 +0493:15a +0494:2b0 +0495:15b +0496:2bc +0497:15c +0498:2b7 +0499:15d +049a:2d6 +049b:15e +049c:2da +049d:15f +049e:3ed +049f:008 +04a0:38c +04a1:063 +04a2:3b8 +04a3:2e6 +04a4:04b +04a5:266 +04a6:0a6 +04a7:046 +04a8:3a8 +04a9:130 +04aa:0fd +04ab:179 +04ac:014 +04ad:241 +04ae:002 +04af:308 +04b0:3f5 +04b1:02c +04b2:38c +04b3:033 +04b4:245 +04b5:008 +04b6:0e9 +04b7:054 +04b8:3bb +04b9:2e6 +04ba:3e7 +04bb:284 +04bc:2ee +04bd:3bb +04be:3c5 +04bf:03c +04c0:3b3 +04c1:0e1 +04c2:00c +04c3:3f5 +04c4:02c +04c5:308 +04c6:2e6 +04c7:053 +04c8:3b1 +04c9:008 +04ca:38c +04cb:01f +04cc:088 +04cd:284 +04ce:0e9 +04cf:054 +04d0:38b +04d1:3b8 +04d2:106 +04d3:3f8 +04d4:0a6 +04d5:3e8 +04d6:3a3 +04d7:0ee +04d8:2b5 +04d9:008 +04da:245 +04db:008 +04dc:106 +04dd:056 +04de:270 +04df:038 +04e0:39c +04e1:11a +04e2:11e +04e3:0a6 +04e4:3ee +04e5:3ee +04e6:06e +04e7:276 +04e8:02b +04e9:3dc +04ea:3dc +04eb:3ee +04ec:3ee +04ed:276 +04ee:3db +04ef:056 +04f0:236 +04f1:3dc +04f2:3aa +04f3:3aa +04f4:06e +04f5:12a +04f6:0ae +04f7:2f0 +04f8:3e9 +04f9:02c +04fa:31c +04fb:36a +04fc:027 +04fd:3f5 +04fe:008 +04ff:27b +0500:086 +0501:19c +0502:00a +0503:0ae +0504:37c +0505:0ee +0506:266 +0507:2ab +0508:3e9 +0509:02c +050a:1d8 +050b:3f8 +050c:2e6 +050d:001 +050e:022 +050f:276 +0510:31c +0511:01b +0512:3dc +0513:3dc +0514:276 +0515:3eb +0516:056 +0517:270 +0518:0ee +0519:038 +051a:0ae +051b:3ea +051c:3ea +051d:38e +051e:38e +051f:1d8 +0520:06e +0521:31c +0522:36a +0523:093 +0524:1aa +0525:1d8 +0526:0ae +0527:270 +0528:0ae +0529:038 +052a:23c +052b:0ae +052c:19c +052d:06a +052e:226 +052f:270 +0530:0ae +0531:2f0 +0532:1a6 +0533:198 +0534:36b +0535:0ae +0536:270 +0537:1b6 +0538:356 +0539:07f +053a:04e +053b:2f0 +053c:3e9 +053d:02c +053e:3b1 +053f:008 +0540:3f5 +0541:02c +0542:3b1 +0543:008 +0544:3f5 +0545:008 +0546:245 +0547:002 +0548:0ee +0549:393 +054a:20c +054b:017 +054c:320 +054d:260 +054e:28c +054f:360 +0550:24c +0551:1a1 +0552:038 +0553:104 +0554:288 +0555:01a +0556:01e +0557:1ba +0558:04e +0559:3e0 +055a:0a6 +055b:130 +055c:0df +055d:0a6 +055e:056 +055f:260 +0560:02e +0561:31c +0562:26a +0563:36a +0564:3a0 +0565:270 +0566:0ee +0567:2f0 +0568:0ee +0569:3cb +056a:2e5 +056b:018 +056c:108 +056d:184 +056e:0a1 +056f:018 +0570:2cc +0571:3a0 +0572:0c8 +0573:2c4 +0574:3e0 +0575:2dd +0576:018 +0577:2e5 +0578:018 +0579:39c +057a:2e2 +057b:013 +057c:0c8 +057d:0a2 +057e:386 +057f:33c +0580:3e0 +0581:144 +0582:1b8 +0583:0fc +0584:284 +0585:108 +0586:276 +0587:360 +0588:104 +0589:288 +058a:276 +058b:360 +058c:284 +058d:3e0 +058e:084 +058f:0ae +0590:1d8 +0591:0ee +0592:1d8 +0593:12e +0594:023 +0595:226 +0596:013 +0597:088 +0598:1d8 +0599:0ee +059a:1d8 +059b:0ae +059c:126 +059d:3a0 +059e:088 +059f:3e0 +05a0:066 +05a1:1d8 +05a2:084 +05a3:0ae +05a4:1d8 +05a5:0ee +05a6:1d8 +05a7:18e +05a8:023 +05a9:266 +05aa:013 +05ab:088 +05ac:1d8 +05ad:0ee +05ae:1d8 +05af:0ae +05b0:186 +05b1:3a0 +05b2:363 +05b3:07d +05b4:038 +05b5:0ae +05b6:1d8 +05b7:3b0 +05b8:1d8 +05b9:0ae +05ba:0ee +05bb:3b0 +05bc:0ee +05bd:3e0 +05be:0ae +05bf:1d8 +05c0:370 +05c1:1d8 +05c2:0ae +05c3:0ee +05c4:370 +05c5:3bb +05c6:066 +05c7:1d8 +05c8:1b8 +05c9:37c +05ca:11e +05cb:2fc +05cc:046 +05cd:2fc +05ce:226 +05cf:1e6 +05d0:1e6 +05d1:1e6 +05d2:106 +05d3:04e +05d4:1be +05d5:360 +05d6:386 +05d7:1be +05d8:360 +05d9:0a6 +05da:33c +05db:1be +05dc:3f3 +05dd:3e0 +05de:066 +05df:1d8 +05e0:04c +05e1:289 +05e2:015 +05e3:04c +05e4:239 +05e5:014 +05e6:08c +05e7:3a0 +05e8:0c8 +05e9:28c +05ea:3a0 +05eb:04c +05ec:1ab +05ed:26e +05ee:3a0 +05ef:1a6 +05f0:3a0 +05f1:28c +05f2:3df +05f3:3e0 +05f4:301 +05f5:018 +05f6:139 +05f7:018 +05f8:3c9 +05f9:02c +05fa:31d +05fb:018 +05fc:119 +05fd:018 +05fe:035 +05ff:018 +0600:00c +0601:013 +0602:184 +0603:021 +0604:018 +0605:06e +0606:1d8 +0607:3e0 +0608:06e +0609:1d8 +060a:01b +060b:301 +060c:018 +060d:10c +060e:360 +060f:0ae +0610:33c +0611:3d8 +0612:28c +0613:02f +0614:3d8 +0615:2fc +0616:0ae +0617:3e0 +0618:3d8 +0619:2fc +061a:0ae +061b:3b1 +061c:02c +061d:07d +061e:038 +061f:28c +0620:360 +0621:22e +0622:3a0 +0623:166 +0624:3a0 +0625:28c +0626:3df +0627:3e0 +0628:319 +0629:014 +062a:10c +062b:2e5 +062c:019 +062d:18c +062e:023 +062f:28c +0630:085 +0631:018 +0632:281 +0633:014 +0634:08c +0635:017 +0636:2c8 +0637:239 +0638:014 +0639:18c +063a:3a0 +063b:313 +063c:108 +063d:02b +063e:301 +063f:018 +0640:139 +0641:018 +0642:3c9 +0643:02c +0644:31d +0645:018 +0646:08e +0647:158 +0648:1f8 +0649:106 +064a:0b0 +064b:3e0 +064c:229 +064d:018 +064e:070 +064f:1f8 +0650:0a6 +0651:1e8 +0652:3bb +0653:121 +0654:018 +0655:145 +0656:038 +0657:0a8 +0658:1f8 +0659:2bc +065a:31c +065b:0aa +065c:2bc +065d:3a3 +065e:0f1 +065f:018 +0660:028 +0661:1d8 +0662:070 +0663:1f8 +0664:03c +0665:31c +0666:0aa +0667:1bc +0668:0ea +0669:343 +066a:301 +066b:018 +066c:035 +066d:018 +066e:346 +066f:0c7 +0670:34d +0671:018 +0672:30e +0673:0a3 +0674:0ae +0675:31c +0676:1ea +0677:1ea +0678:23c +0679:2be +067a:11e +067b:05e +067c:1ee +067d:1ee +067e:130 +067f:010 +0680:013 +0681:1e6 +0682:27e +0683:3f3 +0684:349 +0685:014 +0686:243 +0687:21c +0688:17d +0689:042 +068a:2b5 +068b:018 +068c:04e +068d:26e +068e:0e2 +068f:0ee +0690:1be +0691:0af +0692:002 +0693:0ee +0694:33c +0695:0ee +0696:3d4 +0697:2d4 +0698:3c3 +0699:198 +069a:1be +069b:03f +069c:042 +069d:0ee +069e:33c +069f:0ee +06a0:3d4 +06a1:3cb +06a2:06e +06a3:3b0 +06a4:066 +06a5:3e0 +06a6:1f8 +06a7:0a6 +06a8:06e +06a9:3b0 +06aa:106 +06ab:198 +06ac:3e0 +06ad:260 +06ae:016 +06af:158 +06b0:1b8 +06b1:37c +06b2:11e +06b3:1bc +06b4:31c +06b5:0e2 +06b6:3e0 +06b7:2e5 +06b8:018 +06b9:0ae +06ba:1e6 +06bb:0ae +06bc:1ee +06bd:3a0 +06be:166 +06bf:3e0 +06c0:34c +06c1:121 +06c2:01b +06c3:321 +06c4:014 +06c5:119 +06c6:018 +06c7:10c +06c8:360 +06c9:289 +06ca:014 +06cb:08c +06cc:239 +06cd:015 +06ce:08c +06cf:289 +06d0:014 +06d1:084 +06d2:3e0 +06d3:10e +06d4:1b8 +06d5:1bc +06d6:31c +06d7:042 +06d8:056 +06d9:39c +06da:2a2 +06db:1e6 +06dc:1e6 +06dd:226 +06de:1fe +06df:013 +06e0:226 +06e1:1fe +06e2:013 +06e3:226 +06e4:1fe +06e5:013 +06e6:226 +06e7:05a +06e8:05e +06e9:3e0 +06ea:39c +06eb:2a0 +06ec:01e +06ed:01a +06ee:016 +06ef:346 +06f0:1cb +06f1:3e6 +06f2:2fc +06f3:102 +06f4:1d8 +06f5:130 +06f6:015 +06f7:05a +06f8:0cb +06f9:1fa +06fa:0ba +06fb:1fa +06fc:013 +06fd:17a +06fe:0ba +06ff:1fa +0700:0ba +0701:1fa +0702:013 +0703:17a +0704:0ba +0705:1fa +0706:0ba +0707:1fa +0708:013 +0709:17a +070a:0ba +070b:1fa +070c:0ba +070d:1fa +070e:013 +070f:17a +0710:0ba +0711:1d8 +0712:02e +0713:07a +0714:3ee +0715:2fc +0716:102 +0717:1d8 +0718:17a +0719:1ba +071a:13a +071b:013 +071c:23a +071d:266 +071e:2db +071f:01e +0720:38e +0721:38e +0722:38e +0723:05e +0724:046 +0725:2bc +0726:25c +0727:0aa +0728:16b +0729:2ee +072a:15b +072b:10e +072c:130 +072d:013 +072e:01b +072f:3ee +0730:266 +0731:35e +0732:3eb +0733:0ae +0734:158 +0735:130 +0736:011 +0737:306 +0738:047 +0739:0ae +073a:00e +073b:05a +073c:1d8 +073d:1bc +073e:106 +073f:29b +0740:198 +0741:0a6 +0742:00e +0743:03b +0744:0ae +0745:1ee +0746:1ee +0747:1ee +0748:1ee +0749:0ae +074a:02e +074b:0e6 +074c:2fc +074d:226 +074e:266 +074f:0e6 +0750:12e +0751:266 +0752:393 +0753:0ae +0754:00e +0755:260 +0756:3e0 +0757:0ee +0758:1b8 +0759:17c +075a:3d8 +075b:104 +075c:04c +075d:013 +075e:108 +075f:3d8 +0760:0ce +0761:3e0 +0762:14e +0763:178 +0764:276 +0765:067 +0766:168 +0767:3e0 +0768:178 +0769:276 +076a:3e3 +076b:1b0 +076c:0ae +076d:1ed +076e:01c +076f:015 +0770:02e +0771:1b0 +0772:0ae +0773:201 +0774:01c +0775:04e +0776:268 +0777:3c3 +0778:10e +0779:278 +077a:370 +077b:268 +077c:02b +077d:10e +077e:2b8 +077f:370 +0780:2a8 +0781:18c +0782:02b +0783:3cc +0784:3a0 +0785:348 +0786:3e0 +0787:34c +0788:360 +0789:3c8 +078a:3cc +078b:360 +078c:188 +078d:2e5 +078e:002 +078f:05a +0790:05c +0791:0d0 +0792:033 +0793:05a +0794:05c +0795:0d0 +0796:20c +0797:01f +0798:3d0 +0799:013 +079a:390 +079b:2fc +079c:330 +079d:0f6 +079e:05a +079f:056 +07a0:3e0 +07a1:34c +07a2:16b +07a3:02e +07a4:0fa +07a5:0ae +07a6:35e +07a7:1f1 +07a8:037 +07a9:03e +07aa:0ce +07ab:2ee +07ac:0f1 +07ad:036 +07ae:06e +07af:1ee +07b0:1ee +07b1:20e +07b2:0ee +07b3:05a +07b4:10e +07b5:1ee +07b6:1e6 +07b7:013 +07b8:2ba +07b9:14e +07ba:39c +07bb:342 +07bc:017 +07bd:3ae +07be:38e +07bf:04e +07c0:06e +07c1:2dc +07c2:150 +07c3:3ce +07c4:04b +07c5:222 +07c6:1ce +07c7:3f3 +07c8:14e +07c9:3ee +07ca:394 +07cb:30f +07cc:3d4 +07cd:3ca +07ce:3c3 +07cf:02d +07d0:018 +07d1:346 +07d2:03f +07d3:2ee +07d4:02f +07d5:121 +07d6:018 +07d7:2c9 +07d8:00e +07d9:18c +07da:1f1 +07db:037 +07dc:2dd +07dd:018 +07de:2e5 +07df:018 +07e0:0a6 +07e1:03c +07e2:0ae +07e3:0e6 +07e4:04e +07e5:2dc +07e6:210 +07e7:3ce +07e8:073 +07e9:222 +07ea:1ce +07eb:3f3 +07ec:14e +07ed:06e +07ee:0ee +07ef:1bc +07f0:0b6 +07f1:23c +07f2:3e6 +07f3:0ee +07f4:06e +07f5:3d4 +07f6:3ca +07f7:054 +07f8:393 +07f9:04a +07fa:0bc +07fb:34e +07fc:013 +07fd:0c8 +07fe:00e +07ff:2c3 +0800:0e1 +0801:00c +0802:3f5 +0803:02c +0804:311 +0805:008 +0806:01e +0807:1be +0808:2d0 +0809:25c +080a:0a2 +080b:2e6 +080c:063 +080d:2e1 +080e:008 +080f:38c +0810:023 +0811:0f5 +0812:020 +0813:02b +0814:388 +0815:0f5 +0816:020 +0817:384 +0818:006 +0819:38c +081a:279 +081b:003 +081c:388 +081d:205 +081e:024 +081f:384 +0820:2d9 +0821:000 +0822:2e0 +0823:2e1 +0824:008 +0825:30c +0826:38d +0827:04c +0828:10e +0829:1d8 +082a:0ae +082b:08c +082c:261 +082d:003 +082e:38c +082f:35d +0830:013 +0831:0e1 +0832:00c +0833:0a6 +0834:04e +0835:270 +0836:1b8 +0837:1fe +0838:023 +0839:1fe +083a:013 +083b:348 +083c:0a6 +083d:260 +083e:056 +083f:106 +0840:04e +0841:270 +0842:31c +0843:162 +0844:249 +0845:023 +0846:1a2 +0847:130 +0848:0a1 +0849:306 +084a:269 +084b:023 +084c:1c6 +084d:016 +084e:21c +084f:110 +0850:08e +0851:0ca +0852:1ea +0853:1bc +0854:330 +0855:0e6 +0856:23a +0857:330 +0858:106 +0859:05e +085a:05a +085b:010 +085c:1ee +085d:1ee +085e:1ee +085f:290 +0860:39c +0861:302 +0862:02f +0863:2f6 +0864:01f +0865:23e +0866:142 +0867:38c +0868:01d +0869:00b +086a:066 +086b:2fe +086c:023 +086d:34c +086e:251 +086f:002 +0870:34c +0871:01b +0872:2f6 +0873:3df +0874:2fa +0875:251 +0876:00c +0877:04e +0878:130 +0879:089 +087a:1bc +087b:170 +087c:04e +087d:21c +087e:310 +087f:206 +0880:1bc +0881:170 +0882:34c +0883:013 +0884:2a0 +0885:34c +0886:205 +0887:014 +0888:121 +0889:018 +088a:128 +088b:1b8 +088c:31c +088d:0aa +088e:10a +088f:1a8 +0890:138 +0891:3e0 +0892:38c +0893:211 +0894:032 +0895:15c +0896:3d0 +0897:3d0 +0898:3e6 +0899:13b +089a:3e6 +089b:21c +089c:0d0 +089d:38c +089e:01f +089f:38a +08a0:39c +08a1:1b6 +08a2:05b +08a3:38c +08a4:241 +08a5:002 +08a6:11c +08a7:110 +08a8:0d0 +08a9:090 +08aa:090 +08ab:0e5 +08ac:00a +08ad:316 +08ae:06d +08af:027 +08b0:1d6 +08b1:1b6 +08b2:03b +08b3:38c +08b4:073 +08b5:15c +08b6:090 +08b7:090 +08b8:043 +08b9:1b6 +08ba:1a3 +08bb:38c +08bc:03b +08bd:15c +08be:090 +08bf:050 +08c0:3d5 +08c1:022 +08c2:0c8 +08c3:0e5 +08c4:050 +08c5:3f5 +08c6:02c +08c7:284 +08c8:244 +08c9:0cc +08ca:205 +08cb:00b +08cc:06e +08cd:30c +08ce:047 +08cf:20c +08d0:037 +08d1:208 +08d2:001 +08d3:00c +08d4:009 +08d5:022 +08d6:3b8 +08d7:2fe +08d8:023 +08d9:09c +08da:17d +08db:042 +08dc:245 +08dd:008 +08de:10e +08df:176 +08e0:3b8 +08e1:3ee +08e2:3ee +08e3:0be +08e4:3ee +08e5:066 +08e6:0ae +08e7:3e8 +08e8:3b8 +08e9:0a6 +08ea:0ae +08eb:3a8 +08ec:261 +08ed:002 +08ee:1b6 +08ef:0a3 +08f0:38c +08f1:043 +08f2:15c +08f3:110 +08f4:150 +08f5:0d9 +08f6:00a +08f7:31c +08f8:162 +08f9:016 +08fa:251 +08fb:00c +08fc:375 +08fd:040 +08fe:24c +08ff:1a1 +0900:038 +0901:22d +0902:002 +0903:1b6 +0904:02b +0905:38c +0906:38b +0907:1be +0908:353 +0909:1b6 +090a:06b +090b:38c +090c:03b +090d:15c +090e:110 +090f:110 +0910:32b +0911:31c +0912:162 +0913:016 +0914:0a1 +0915:044 +0916:0f3 +0917:1be +0918:38c +0919:3a7 +091a:3bb +091b:190 +091c:3dc +091d:302 +091e:15b +091f:09c +0920:1b6 +0921:0ff +0922:1b6 +0923:09f +0924:38c +0925:043 +0926:190 +0927:11c +0928:110 +0929:0d0 +092a:3d0 +092b:0e5 +092c:00a +092d:339 +092e:00c +092f:3b0 +0930:17c +0931:2e6 +0932:245 +0933:008 +0934:241 +0935:002 +0936:38c +0937:01b +0938:150 +0939:373 +093a:339 +093b:00c +093c:2ae +093d:000 +093e:3b0 +093f:043 +0940:38c +0941:01b +0942:110 +0943:323 +0944:339 +0945:00c +0946:370 +0947:1a8 +0948:363 +0949:1c2 +094a:1b6 +094b:0a3 +094c:38c +094d:03b +094e:11c +094f:110 +0950:090 +0951:0d0 +0952:190 +0953:2c3 +0954:1b8 +0955:13c +0956:31c +0957:0aa +0958:1ea +0959:1ea +095a:1ea +095b:17c +095c:1a8 +095d:245 +095e:002 +095f:1b6 +0960:017 +0961:142 +0962:38c +0963:083 +0964:11c +0965:110 +0966:090 +0967:110 +0968:150 +0969:31c +096a:290 +096b:31c +096c:362 +096d:337 +096e:05c +096f:110 +0970:210 +0971:0f9 +0972:00a +0973:0ae +0974:058 +0975:1b8 +0976:11e +0977:2dc +0978:310 +0979:37e +097a:31b +097b:38d +097c:04c +097d:205 +097e:014 +097f:161 +0980:05e +0981:35c +0982:348 +0983:013 +0984:344 +0985:184 +0986:260 +0987:205 +0988:01c +0989:04e +098a:270 +098b:0ae +098c:128 +098d:398 +098e:0a6 +098f:1b8 +0990:0a6 +0991:1a8 +0992:044 +0993:30c +0994:013 +0995:084 +0996:0c4 +0997:38c +0998:047 +0999:1fe +099a:033 +099b:1fe +099c:023 +099d:0c8 +099e:208 +099f:053 +09a0:208 +09a1:0a0 +09a2:014 +09a3:037 +09a4:38c +09a5:027 +09a6:08c +09a7:017 +09a8:204 +09a9:138 +09aa:0e0 +09ab:0cc +09ac:17f +09ad:31c +09ae:098 +09af:20c +09b0:0ff +09b1:00c +09b2:0bb +09b3:2f6 +09b4:0a7 +09b5:106 +09b6:31c +09b7:210 +09b8:31c +09b9:0a6 +09ba:302 +09bb:06f +09bc:208 +09bd:2fc +09be:01c +09bf:3dc +09c0:276 +09c1:3f3 +09c2:138 +09c3:2d0 +09c4:31c +09c5:098 +09c6:222 +09c7:013 +09c8:048 +09c9:2f6 +09ca:02f +09cb:106 +09cc:3e6 +09cd:0b6 +09ce:01b +09cf:21c +09d0:290 +09d1:006 +09d2:276 +09d3:02f +09d4:2f6 +09d5:027 +09d6:28c +09d7:013 +09d8:236 +09d9:168 +09da:073 +09db:1fe +09dc:01b +09dd:1fe +09de:38f +09df:10c +09e0:37b +09e1:09c +09e2:2e2 +09e3:01f +09e4:3d0 +09e5:353 +09e6:2d0 +09e7:343 +09e8:33c +09e9:0a0 +09ea:014 +09eb:187 +09ec:0e0 +09ed:08c +09ee:177 +09ef:38c +09f0:127 +09f1:0cc +09f2:157 +09f3:00c +09f4:01f +09f5:20c +09f6:137 +09f7:1b8 +09f8:1fe +09f9:04b +09fa:2dc +09fb:04e +09fc:310 +09fd:310 +09fe:010 +09ff:090 +0a00:14e +0a01:1b3 +0a02:1fe +0a03:033 +0a04:04e +0a05:2dc +0a06:150 +0a07:310 +0a08:3b3 +0a09:1fe +0a0a:02b +0a0b:04e +0a0c:2dc +0a0d:110 +0a0e:3cb +0a0f:04e +0a10:2dc +0a11:150 +0a12:310 +0a13:36b +0a14:3f5 +0a15:02c +0a16:0ee +0a17:04e +0a18:270 +0a19:0ee +0a1a:2ee +0a1b:07b +0a1c:178 +0a1d:33c +0a1e:0cc +0a1f:23d +0a20:01c +0a21:0cc +0a22:24d +0a23:01d +0a24:2d6 +0a25:01b +0a26:35c +0a27:090 +0a28:23c +0a29:14e +0a2a:0e0 +0a2b:18d +0a2c:01c +0a2d:23c +0a2e:24d +0a2f:01c +0a30:2d6 +0a31:01b +0a32:19c +0a33:210 +0a34:07c +0a35:18d +0a36:02c +0a37:18d +0a38:01c +0a39:03c +0a3a:24d +0a3b:01c +0a3c:2d6 +0a3d:01b +0a3e:01c +0a3f:210 +0a40:13c +0a41:189 +0a42:01c +0a43:07c +0a44:24d +0a45:01c +0a46:2d6 +0a47:01b +0a48:19c +0a49:210 +0a4a:0fc +0a4b:189 +0a4c:01c +0a4d:0bc +0a4e:24d +0a4f:01c +0a50:2d6 +0a51:013 +0a52:090 +0a53:2fc +0a54:18d +0a55:02c +0a56:0ae +0a57:201 +0a58:01c +0a59:00e +0a5a:1a1 +0a5b:01c +0a5c:17c +0a5d:24d +0a5e:01c +0a5f:2d6 +0a60:01b +0a61:15c +0a62:090 +0a63:0bc +0a64:18d +0a65:02c +0a66:1a1 +0a67:01c +0a68:2bc +0a69:24d +0a6a:01c +0a6b:2d6 +0a6c:01b +0a6d:25c +0a6e:090 +0a6f:2bc +0a70:14e +0a71:1a1 +0a72:01c +0a73:13c +0a74:24d +0a75:01c +0a76:2d6 +0a77:01b +0a78:09c +0a79:210 +0a7a:03c +0a7b:18d +0a7c:02c +0a7d:1a1 +0a7e:01c +0a7f:27c +0a80:24d +0a81:01c +0a82:2d6 +0a83:01b +0a84:35c +0a85:210 +0a86:189 +0a87:02c +0a88:1a1 +0a89:01c +0a8a:0fc +0a8b:24d +0a8c:01c +0a8d:2d6 +0a8e:01b +0a8f:29c +0a90:210 +0a91:0fc +0a92:14e +0a93:0ae +0a94:1ed +0a95:01c +0a96:1a0 +0a97:138 +0a98:11e +0a99:17e +0a9a:0bf +0a9b:304 +0a9c:1b8 +0a9d:29c +0a9e:1e2 +0a9f:013 +0aa0:308 +0aa1:17e +0aa2:057 +0aa3:17e +0aa4:07b +0aa5:26d +0aa6:04c +0aa7:1bc +0aa8:18d +0aa9:02c +0aaa:27c +0aab:023 +0aac:249 +0aad:04c +0aae:17c +0aaf:14e +0ab0:06e +0ab1:3fd +0ab2:02a +0ab3:138 +0ab4:2a0 +0ab5:2be +0ab6:260 +0ab7:00e +0ab8:2fc +0ab9:39c +0aba:102 +0abb:249 +0abc:04c +0abd:28c +0abe:023 +0abf:14c +0ac0:017 +0ac1:04e +0ac2:1a2 +0ac3:097 +0ac4:1a2 +0ac5:0f7 +0ac6:1a2 +0ac7:13f +0ac8:1a2 +0ac9:07f +0aca:1a2 +0acb:0df +0acc:1a2 +0acd:137 +0ace:1a2 +0acf:06f +0ad0:1a2 +0ad1:0d7 +0ad2:1a2 +0ad3:11f +0ad4:06b +0ad5:07c +0ad6:269 +0ad7:04c +0ad8:189 +0ad9:02c +0ada:241 +0adb:04c +0adc:17c +0add:18d +0ade:02c +0adf:26d +0ae0:04c +0ae1:0bc +0ae2:0ab +0ae3:17c +0ae4:269 +0ae5:04c +0ae6:1bc +0ae7:18d +0ae8:02c +0ae9:241 +0aea:04c +0aeb:33c +0aec:14e +0aed:05b +0aee:17c +0aef:18d +0af0:02c +0af1:241 +0af2:04c +0af3:37c +0af4:269 +0af5:04c +0af6:1bc +0af7:14e +0af8:19c +0af9:0b0 +0afa:2fe +0afb:023 +0afc:110 +0afd:19c +0afe:142 +0aff:278 +0b00:370 +0b01:268 +0b02:06e +0b03:1f9 +0b04:01c +0b05:04e +0b06:0dc +0b07:38c +0b08:013 +0b09:050 +0b0a:10e +0b0b:1b8 +0b0c:29c +0b0d:1e2 +0b0e:1e2 +0b0f:1e2 +0b10:033 +0b11:0ae +0b12:01c +0b13:110 +0b14:0ae +0b15:29c +0b16:1e2 +0b17:02b +0b18:0ae +0b19:11c +0b1a:050 +0b1b:10e +0b1c:00c +0b1d:01f +0b1e:20c +0b1f:087 +0b20:1b8 +0b21:13c +0b22:31c +0b23:2ea +0b24:02b +0b25:0ae +0b26:0dc +0b27:210 +0b28:0ae +0b29:2cc +0b2a:02b +0b2b:04e +0b2c:11c +0b2d:210 +0b2e:14e +0b2f:1f9 +0b30:01c +0b31:2c4 +0b32:04e +0b33:01c +0b34:2cc +0b35:01b +0b36:222 +0b37:03b +0b38:0a0 +0b39:0d4 +0b3a:023 +0b3b:0e0 +0b3c:21c +0b3d:050 +0b3e:0e0 +0b3f:04c +0b40:01b +0b41:19c +0b42:110 +0b43:1e1 +0b44:01c +0b45:138 +0b46:0ee +0b47:0a0 +0b48:2e0 +0b49:320 +0b4a:1b8 +0b4b:3d8 +0b4c:3e0 +0b4d:0e0 +0b4e:0ae +0b4f:128 +0b50:398 +0b51:0a6 +0b52:1b8 +0b53:0a6 +0b54:1a8 +0b55:044 +0b56:04e +0b57:2ae +0b58:01c +0b59:390 +0b5a:390 +0b5b:10e +0b5c:278 +0b5d:3b0 +0b5e:268 +0b5f:184 +0b60:344 +0b61:28b +0b62:27c +0b63:1ee +0b64:1ee +0b65:14e +0b66:3e0 +0b67:20c +0b68:017 +0b69:320 +0b6a:1b8 +0b6b:1fe +0b6c:15f +0b6d:1fe +0b6e:10f +0b6f:1fe +0b70:077 +0b71:365 +0b72:02c +0b73:39c +0b74:0b0 +0b75:2fc +0b76:0a2 +0b77:158 +0b78:1f8 +0b79:0a6 +0b7a:3e6 +0b7b:102 +0b7c:0ee +0b7d:08b +0b7e:130 +0b7f:008 +0b80:359 +0b81:02c +0b82:086 +0b83:121 +0b84:018 +0b85:2dd +0b86:018 +0b87:2e5 +0b88:018 +0b89:066 +0b8a:39c +0b8b:202 +0b8c:066 +0b8d:158 +0b8e:0b3 +0b8f:130 +0b90:002 +0b91:359 +0b92:02c +0b93:086 +0b94:121 +0b95:018 +0b96:38b +0b97:130 +0b98:00a +0b99:359 +0b9a:02c +0b9b:0ae +0b9c:33c +0b9d:0fe +0b9e:1f8 +0b9f:106 +0ba0:0b0 +0ba1:285 +0ba2:04c +0ba3:158 +0ba4:198 +0ba5:356 +0ba6:177 +0ba7:2bd +0ba8:018 +0ba9:1be +0baa:0df +0bab:342 +0bac:147 +0bad:0ee +0bae:33c +0baf:0ee +0bb0:3d4 +0bb1:2d4 +0bb2:3bb +0bb3:0a6 +0bb4:1d8 +0bb5:1be +0bb6:047 +0bb7:2e2 +0bb8:0e7 +0bb9:0ee +0bba:33c +0bbb:0ee +0bbc:3d4 +0bbd:3c3 +0bbe:06e +0bbf:302 +0bc0:0a7 +0bc1:070 +0bc2:198 +0bc3:0ae +0bc4:043 +0bc5:0ee +0bc6:0ae +0bc7:302 +0bc8:067 +0bc9:0ae +0bca:198 +0bcb:070 +0bcc:13d +0bcd:018 +0bce:39c +0bcf:098 +0bd0:31c +0bd1:22a +0bd2:39c +0bd3:058 +0bd4:251 +0bd5:002 +0bd6:39c +0bd7:302 +0bd8:3e3 +0bd9:28c +0bda:360 +0bdb:24c +0bdc:1a1 +0bdd:038 +0bde:39c +0bdf:130 +0be0:001 +0be1:058 +0be2:251 +0be3:00c +0be4:04e +0be5:070 +0be6:1f8 +0be7:046 +0be8:1e8 +0be9:288 +0bea:244 +0beb:3e0 +0bec:18c +0bed:01f +0bee:188 +0bef:3e0 +0bf0:184 +0bf1:3e0 +0bf2:1f8 +0bf3:03c +0bf4:106 +0bf5:016 +0bf6:04e +0bf7:270 +0bf8:038 +0bf9:3e0 +0bfa:130 +0bfb:0fe +0bfc:3db +0bfd:130 +0bfe:0ff +0bff:3eb +0c00:14d +0c01:018 +0c02:14d +0c03:018 +0c04:14d +0c05:018 +0c06:0cb +0c07:179 +0c08:018 +0c09:0b3 +0c0a:3f5 +0c0b:02c +0c0c:04e +0c0d:368 +0c0e:3b8 +0c0f:05a +0c10:3a8 +0c11:2e6 +0c12:01f +0c13:130 +0c14:0fe +0c15:169 +0c16:014 +0c17:17b +0c18:24c +0c19:1a1 +0c1a:038 +0c1b:1f8 +0c1c:27c +0c1d:106 +0c1e:0f8 +0c1f:22d +0c20:002 +0c21:1a1 +0c22:038 +0c23:113 +0c24:3f5 +0c25:02c +0c26:2e6 +0c27:067 +0c28:3e9 +0c29:02c +0c2a:244 +0c2b:30c +0c2c:0e7 +0c2d:20c +0c2e:0df +0c2f:3ed +0c30:008 +0c31:284 +0c32:0fb +0c33:3cc +0c34:033 +0c35:081 +0c36:000 +0c37:28c +0c38:017 +0c39:14b +0c3a:06e +0c3b:2e1 +0c3c:008 +0c3d:06e +0c3e:0c5 +0c3f:022 +0c40:251 +0c41:00c +0c42:1a0 +0c43:139 +0c44:018 +0c45:248 +0c46:245 +0c47:002 +0c48:204 +0c49:284 +0c4a:3c5 +0c4b:03c +0c4c:2e6 +0c4d:327 +0c4e:2ee +0c4f:3d7 +0c50:204 +0c51:261 +0c52:002 +0c53:3f5 +0c54:02c +0c55:20c +0c56:057 +0c57:30c +0c58:0d7 +0c59:208 +0c5a:284 +0c5b:2e6 +0c5c:009 +0c5d:023 +0c5e:2f1 +0c5f:012 +0c60:245 +0c61:008 +0c62:284 +0c63:36b +0c64:284 +0c65:269 +0c66:044 +0c67:2e0 +0c68:205 +0c69:024 +0c6a:046 +0c6b:21c +0c6c:210 +0c6d:266 +0c6e:3fb +0c6f:20c +0c70:38d +0c71:04d +0c72:2a3 +0c73:10c +0c74:0c7 +0c75:148 +0c76:0b3 +0c77:28c +0c78:3df +0c79:148 +0c7a:006 +0c7b:0b0 +0c7c:129 +0c7d:014 +0c7e:01c +0c7f:162 +0c80:0a3 +0c81:3ea +0c82:3dc +0c83:3e3 +0c84:34c +0c85:19d +0c86:02e +0c87:3e6 +0c88:3e6 +0c89:21c +0c8a:290 +0c8b:316 +0c8c:163 +0c8d:28c +0c8e:01f +0c8f:144 +0c90:35b +0c91:10c +0c92:19f +0c93:343 +0c94:1a2 +0c95:014 +0c96:117 +0c97:2d4 +0c98:027 +0c99:14c +0c9a:017 +0c9b:17e +0c9c:3d4 +0c9d:3d4 +0c9e:08e +0c9f:1aa +0ca0:0ee +0ca1:23c +0ca2:0dc +0ca3:3ca +0ca4:1bc +0ca5:0ae +0ca6:0ee +0ca7:35c +0ca8:11e +0ca9:2a0 +0caa:35a +0cab:09f +0cac:00e +0cad:0ae +0cae:06e +0caf:063 +0cb0:34c +0cb1:291 +0cb2:036 +0cb3:28c +0cb4:01b +0cb5:10c +0cb6:1a7 +0cb7:2fa +0cb8:251 +0cb9:002 +0cba:2be +0cbb:244 +0cbc:0f0 +0cbd:3db +0cbe:342 +0cbf:377 +0cc0:1a6 +0cc1:3fa +0cc2:3e3 +0cc3:026 +0cc4:09b +0cc5:05c +0cc6:3ea +0cc7:08e +0cc8:0b0 +0cc9:2a0 +0cca:09c +0ccb:38a +0ccc:38a +0ccd:38a +0cce:086 +0ccf:006 +0cd0:31c +0cd1:2d6 +0cd2:02b +0cd3:18a +0cd4:37b +0cd5:08a +0cd6:006 +0cd7:0ae +0cd8:2fc +0cd9:0ae +0cda:126 +0cdb:01c +0cdc:35e +0cdd:02f +0cde:1a6 +0cdf:3ee +0ce0:38a +0ce1:3db +0ce2:0a6 +0ce3:06e +0ce4:119 +0ce5:040 +0ce6:354 +0ce7:22d +0ce8:002 +0ce9:293 +0cea:09c +0ceb:0a2 +0cec:2a2 +0ced:0a2 +0cee:2cb +0cef:284 +0cf0:248 +0cf1:28c +0cf2:0d7 +0cf3:135 +0cf4:014 +0cf5:144 +0cf6:02e +0cf7:35c +0cf8:222 +0cf9:102 +0cfa:09c +0cfb:1d8 +0cfc:046 +0cfd:270 +0cfe:1b8 +0cff:0aa +0d00:0a6 +0d01:1a8 +0d02:0a6 +0d03:0aa +0d04:1d8 +0d05:06a +0d06:108 +0d07:35a +0d08:30f +0d09:104 +0d0a:06a +0d0b:2f3 +0d0c:2fa +0d0d:313 +0d0e:0ee +0d0f:2dc +0d10:1d0 +0d11:0ee +0d12:33e +0d13:2b3 +0d14:10c +0d15:2a7 +0d16:02e +0d17:31b +0d18:02e +0d19:07a +0d1a:158 +0d1b:046 +0d1c:03e +0d1d:05e +0d1e:1d8 +0d1f:206 +0d20:25e +0d21:013 +0d22:29e +0d23:00e +0d24:1d8 +0d25:2dc +0d26:3dc +0d27:38e +0d28:013 +0d29:12e +0d2a:262 +0d2b:3f3 +0d2c:354 +0d2d:3cb +0d2e:198 +0d2f:0ae +0d30:158 +0d31:198 +0d32:2fe +0d33:01b +0d34:166 +0d35:3ce +0d36:0ae +0d37:35c +0d38:34a +0d39:0bf +0d3a:0ee +0d3b:0ae +0d3c:35c +0d3d:10e +0d3e:1e6 +0d3f:06b +0d40:23a +0d41:05b +0d42:0c6 +0d43:226 +0d44:222 +0d45:0de +0d46:06e +0d47:2fa +0d48:360 +0d49:04e +0d4a:01e +0d4b:3e0 +0d4c:0c6 +0d4d:3c3 +0d4e:06e +0d4f:363 +0d50:342 +0d51:34f +0d52:266 +0d53:3ea +0d54:3e3 +0d55:285 +0d56:01e +0d57:02e +0d58:07a +0d59:158 +0d5a:046 +0d5b:03e +0d5c:2fa +0d5d:0fb +0d5e:1d8 +0d5f:246 +0d60:25e +0d61:013 +0d62:29e +0d63:1d8 +0d64:05e +0d65:0ae +0d66:06e +0d67:32e +0d68:02b +0d69:1d8 +0d6a:3ee +0d6b:266 +0d6c:1d8 +0d6d:35c +0d6e:04e +0d6f:013 +0d70:222 +0d71:18e +0d72:3f3 +0d73:12e +0d74:3ee +0d75:3d4 +0d76:2d4 +0d77:3d3 +0d78:0ae +0d79:198 +0d7a:0e9 +0d7b:036 +0d7c:39c +0d7d:17d +0d7e:042 +0d7f:34c +0d80:04b +0d81:2be +0d82:34c +0d83:03b +0d84:369 +0d85:00c +0d86:001 +0d87:040 +0d88:17b +0d89:048 +0d8a:0f9 +0d8b:018 +0d8c:379 +0d8d:014 +0d8e:035 +0d8f:018 +0d90:0a1 +0d91:018 +0d92:10c +0d93:033 +0d94:2cc +0d95:01f +0d96:0c4 +0d97:013 +0d98:0c8 +0d99:145 +0d9a:038 +0d9b:309 +0d9c:00e +0d9d:05e +0d9e:34c +0d9f:360 +0da0:02d +0da1:018 +0da2:184 +0da3:03b +0da4:301 +0da5:018 +0da6:075 +0da7:018 +0da8:035 +0da9:018 +0daa:0a1 +0dab:018 +0dac:2fd +0dad:00e +0dae:008 +0daf:145 +0db0:056 +0db1:34c +0db2:08b +0db3:369 +0db4:00c +0db5:15d +0db6:034 +0db7:145 +0db8:038 +0db9:119 +0dba:040 +0dbb:38b +0dbc:00e +0dbd:35c +0dbe:162 +0dbf:15d +0dc0:034 +0dc1:3c3 +0dc2:008 +0dc3:3d1 +0dc4:014 +0dc5:389 +0dc6:054 +0dc7:3ad +0dc8:05c +0dc9:145 +0dca:038 +0dcb:00c +0dcc:27b +0dcd:3e0 +0dce:34c +0dcf:033 +0dd0:369 +0dd1:00c +0dd2:061 +0dd3:034 +0dd4:31b +0dd5:3d1 +0dd6:014 +0dd7:339 +0dd8:054 +0dd9:3ad +0dda:05c +0ddb:145 +0ddc:038 +0ddd:27b +0dde:3d1 +0ddf:014 +0de0:339 +0de1:054 +0de2:18c +0de3:365 +0de4:05d +0de5:139 +0de6:018 +0de7:179 +0de8:058 +0de9:329 +0dea:05c +0deb:121 +0dec:018 +0ded:131 +0dee:018 +0def:179 +0df0:018 +0df1:351 +0df2:05c +0df3:2c4 +0df4:34b +0df5:1b8 +0df6:13c +0df7:31c +0df8:26a +0df9:0a3 +0dfa:04a +0dfb:093 +0dfc:176 +0dfd:176 +0dfe:176 +0dff:176 +0e00:1b8 +0e01:1bc +0e02:0b6 +0e03:1f6 +0e04:03c +0e05:34c +0e06:319 +0e07:05b +0e08:06b +0e09:1b8 +0e0a:13c +0e0b:31c +0e0c:22a +0e0d:17c +0e0e:3bb +0e0f:176 +0e10:176 +0e11:1b8 +0e12:0fc +0e13:0b6 +0e14:07c +0e15:1a8 +0e16:245 +0e17:002 +0e18:1a9 +0e19:018 +0e1a:0f1 +0e1b:018 +0e1c:2f9 +0e1d:014 +0e1e:18b +0e1f:0ae +0e20:2a6 +0e21:0ae +0e22:2ae +0e23:3e0 +0e24:1a9 +0e25:018 +0e26:0f1 +0e27:018 +0e28:07d +0e29:038 +0e2a:11b +0e2b:1a9 +0e2c:018 +0e2d:12d +0e2e:038 +0e2f:206 +0e30:2ee +0e31:245 +0e32:008 +0e33:3d9 +0e34:02c +0e35:121 +0e36:01a +0e37:0f1 +0e38:018 +0e39:2cd +0e3a:014 +0e3b:0b0 +0e3c:1d8 +0e3d:070 +0e3e:1f8 +0e3f:0e6 +0e40:1e8 +0e41:03c +0e42:106 +0e43:016 +0e44:3d9 +0e45:02c +0e46:2cd +0e47:014 +0e48:121 +0e49:018 +0e4a:293 +0e4b:0f1 +0e4c:018 +0e4d:2d5 +0e4e:014 +0e4f:06e +0e50:1d8 +0e51:08e +0e52:158 +0e53:04e +0e54:270 +0e55:038 +0e56:070 +0e57:078 +0e58:028 +0e59:0b8 +0e5a:068 +0e5b:1f8 +0e5c:10e +0e5d:11c +0e5e:3ca +0e5f:3ca +0e60:3c6 +0e61:15c +0e62:10a +0e63:0ae +0e64:1e8 +0e65:06e +0e66:198 +0e67:3e0 +0e68:08e +0e69:158 +0e6a:078 +0e6b:0a8 +0e6c:04e +0e6d:270 +0e6e:038 +0e6f:068 +0e70:0b0 +0e71:028 +0e72:1f8 +0e73:10e +0e74:11c +0e75:3e6 +0e76:3ea +0e77:3ea +0e78:106 +0e79:353 +0e7a:050 +0e7b:0e3 +0e7c:1e2 +0e7d:01f +0e7e:0d0 +0e7f:0c3 +0e80:1d0 +0e81:0b3 +0e82:02d +0e83:018 +0e84:346 +0e85:02f +0e86:10e +0e87:130 +0e88:041 +0e89:30e +0e8a:21d +0e8b:01a +0e8c:0ae +0e8d:1ee +0e8e:1ee +0e8f:39c +0e90:1e2 +0e91:35f +0e92:1e2 +0e93:33f +0e94:3d0 +0e95:31c +0e96:262 +0e97:31c +0e98:2a2 +0e99:10a +0e9a:1b8 +0e9b:0fc +0e9c:0aa +0e9d:07c +0e9e:1a8 +0e9f:01a +0ea0:17a +0ea1:17a +0ea2:17a +0ea3:14d +0ea4:018 +0ea5:131 +0ea6:018 +0ea7:07a +0ea8:1ba +0ea9:3d3 +0eaa:145 +0eab:038 +0eac:121 +0ead:01a +0eae:301 +0eaf:018 +0eb0:1d5 +0eb1:014 +0eb2:0fb +0eb3:1a9 +0eb4:014 +0eb5:0e3 +0eb6:148 +0eb7:048 +0eb8:1d5 +0eb9:014 +0eba:023 +0ebb:148 +0ebc:1a9 +0ebd:014 +0ebe:15d +0ebf:01c +0ec0:0cc +0ec1:093 +0ec2:14c +0ec3:01b +0ec4:10c +0ec5:05b +0ec6:04c +0ec7:02f +0ec8:284 +0ec9:085 +0eca:018 +0ecb:02b +0ecc:319 +0ecd:014 +0ece:239 +0ecf:014 +0ed0:2c4 +0ed1:2c9 +0ed2:00e +0ed3:14c +0ed4:3e3 +0ed5:37b +0ed6:008 +0ed7:01b +0ed8:008 +0ed9:148 +0eda:02d +0edb:018 +0edc:066 +0edd:34d +0ede:018 +0edf:0ae +0ee0:14c +0ee1:013 +0ee2:166 +0ee3:2c6 +0ee4:01f +0ee5:30e +0ee6:01b +0ee7:229 +0ee8:03a +0ee9:1bc +0eea:11a +0eeb:2a9 +0eec:038 +0eed:10b +0eee:01a +0eef:346 +0ef0:01f +0ef1:2ee +0ef2:04b +0ef3:1a9 +0ef4:014 +0ef5:17a +0ef6:0cc +0ef7:3e3 +0ef8:1ba +0ef9:1d5 +0efa:014 +0efb:139 +0efc:018 +0efd:1a1 +0efe:038 +0eff:006 +0f00:04e +0f01:0ba +0f02:03c +0f03:3e0 +0f04:0c4 +0f05:00c +0f06:2f1 +0f07:039 +0f08:00c +0f09:2dd +0f0a:038 +0f0b:229 +0f0c:018 +0f0d:07a +0f0e:1ba +0f0f:3ab +0f10:225 +0f11:002 +0f12:048 +0f13:02d +0f14:018 +0f15:346 +0f16:06f +0f17:2ee +0f18:0b3 +0f19:34d +0f1a:018 +0f1b:0ae +0f1c:36e +0f1d:017 +0f1e:048 +0f1f:04c +0f20:013 +0f21:24e +0f22:006 +0f23:1b9 +0f24:018 +0f25:086 +0f26:158 +0f27:006 +0f28:04e +0f29:289 +0f2a:014 +0f2b:04c +0f2c:07d +0f2d:038 +0f2e:3e0 +0f2f:176 +0f30:176 +0f31:176 +0f32:176 +0f33:04e +0f34:0b6 +0f35:1f6 +0f36:284 +0f37:03c +0f38:0ee +0f39:1b8 +0f3a:10e +0f3b:13c +0f3c:09c +0f3d:102 +0f3e:07e +0f3f:0ae +0f40:1a8 +0f41:06e +0f42:37e +0f43:251 +0f44:00d +0f45:3b5 +0f46:044 +0f47:205 +0f48:024 +0f49:2d9 +0f4a:000 +0f4b:1b8 +0f4c:10e +0f4d:17c +0f4e:11e +0f4f:0ae +0f50:1a8 +0f51:1a9 +0f52:032 +0f53:191 +0f54:044 +0f55:04c +0f56:179 +0f57:043 +0f58:375 +0f59:040 +0f5a:158 +0f5b:086 +0f5c:121 +0f5d:018 +0f5e:1d8 +0f5f:066 +0f60:139 +0f61:018 +0f62:0ba +0f63:07c +0f64:106 +0f65:0b1 +0f66:044 +0f67:093 +0f68:109 +0f69:04c +0f6a:2be +0f6b:01f +0f6c:191 +0f6d:04c +0f6e:2fe +0f6f:043 +0f70:04b +0f71:109 +0f72:04c +0f73:01b +0f74:191 +0f75:04c +0f76:2ee +0f77:245 +0f78:008 +0f79:0cd +0f7a:038 +0f7b:11b +0f7c:109 +0f7d:04c +0f7e:383 +0f7f:191 +0f80:04c +0f81:2ee +0f82:3ab +0f83:2be +0f84:357 +0f85:109 +0f86:04c +0f87:01b +0f88:191 +0f89:04c +0f8a:2ee +0f8b:367 +0f8c:36b +0f8d:0c8 +0f8e:191 +0f8f:044 +0f90:04c +0f91:027 +0f92:130 +0f93:010 +0f94:306 +0f95:1d1 +0f96:00a +0f97:30d +0f98:022 +0f99:075 +0f9a:044 +0f9b:24c +0f9c:1a1 +0f9d:038 +0f9e:22d +0f9f:002 +0fa0:075 +0fa1:044 +0fa2:229 +0fa3:020 +0fa4:301 +0fa5:018 +0fa6:229 +0fa7:044 +0fa8:0ad +0fa9:000 +0faa:3a3 +0fab:191 +0fac:044 +0fad:04c +0fae:047 +0faf:3e9 +0fb0:022 +0fb1:191 +0fb2:044 +0fb3:04c +0fb4:051 +0fb5:026 +0fb6:179 +0fb7:042 +0fb8:301 +0fb9:018 +0fba:229 +0fbb:044 +0fbc:241 +0fbd:002 +0fbe:048 +0fbf:075 +0fc0:044 +0fc1:34c +0fc2:08f +0fc3:04c +0fc4:085 +0fc5:019 +0fc6:04c +0fc7:3b5 +0fc8:014 +0fc9:229 +0fca:044 +0fcb:035 +0fcc:018 +0fcd:346 +0fce:027 +0fcf:2ee +0fd0:245 +0fd1:008 +0fd2:353 +0fd3:10e +0fd4:04e +0fd5:04c +0fd6:017 +0fd7:2be +0fd8:35c +0fd9:050 +0fda:001 +0fdb:040 +0fdc:006 +0fdd:229 +0fde:044 +0fdf:2f6 +0fe0:387 +0fe1:373 +0fe2:01a +0fe3:2ee +0fe4:01f +0fe5:346 +0fe6:043 +0fe7:0c4 +0fe8:1d5 +0fe9:014 +0fea:0cc +0feb:3c3 +0fec:17a +0fed:3b3 +0fee:0ba +0fef:03c +0ff0:3e0 +0ff1:3b8 +0ff2:10e +0ff3:3f8 +0ff4:3ce +0ff5:0be +0ff6:3ce +0ff7:3ce +0ff8:276 +0ff9:013 +0ffa:056 +0ffb:3e8 +0ffc:0ae +0ffd:3a8 +0ffe:0ae +0fff:3e0 +1000:02e +1001:07a +1002:158 +1003:046 +1004:03e +1005:05e +1006:1d8 +1007:31c +1008:3d4 +1009:176 +100a:236 +100b:354 +100c:3e3 +100d:0ee +100e:2ee +100f:16b +1010:1d8 +1011:06e +1012:2ee +1013:14b +1014:326 +1015:087 +1016:1d8 +1017:06e +1018:326 +1019:3df +101a:0ae +101b:1d8 +101c:30e +101d:023 +101e:1d8 +101f:0ae +1020:02b +1021:1d8 +1022:0ae +1023:1d8 +1024:06e +1025:19e +1026:35e +1027:05b +1028:28e +1029:11e +102a:326 +102b:03b +102c:1d8 +102d:2fc +102e:1d8 +102f:06e +1030:1a6 +1031:06e +1032:326 +1033:04b +1034:166 +1035:3ce +1036:0be +1037:11e +1038:3d4 +1039:2d4 +103a:3c3 +103b:04e +103c:0ae +103d:198 +103e:0ee +103f:12e +1040:276 +1041:276 +1042:276 +1043:000 +1044:0bd +1045:036 +1046:2c4 +1047:2fa +1048:017 +1049:04e +104a:2a0 +104b:35c +104c:2f6 +104d:02b +104e:286 +104f:2f6 +1050:01f +1051:286 +1052:3e0 +1053:1f6 +1054:01f +1055:04e +1056:033 +1057:04a +1058:26a +1059:056 +105a:2c8 +105b:3d4 +105c:3d4 +105d:3e0 +105e:01c +105f:04e +1060:004 +1061:204 +1062:304 +1063:2c4 +1064:260 +1065:26e +1066:02e +1067:3d4 +1068:236 +1069:2d4 +106a:3eb +106b:11c +106c:390 +106d:290 +106e:290 +106f:310 +1070:290 +1071:1bc +1072:0ae +1073:01c +1074:184 +1075:344 +1076:219 +1077:024 +1078:34c +1079:029 +107a:003 +107b:18c +107c:02f +107d:30c +107e:360 +107f:2d9 +1080:000 +1081:04e +1082:270 +1083:260 +1084:26e +1085:228 +1086:1f8 +1087:1bc +1088:130 +1089:151 +108a:2a6 +108b:03c +108c:1e8 +108d:060 +108e:000 +108f:1b8 +1090:37c +1091:11e +1092:01a +1093:260 +1094:0ae +1095:10e +1096:0fc +1097:0fa +1098:0a6 +1099:106 +109a:05a +109b:1bc +109c:11a +109d:05a +109e:21a +109f:17e +10a0:3f3 +10a1:2dc +10a2:090 +10a3:1fa +10a4:11a +10a5:013 +10a6:1fa +10a7:1fa +10a8:1fa +10a9:15a +10aa:27e +10ab:3db +10ac:05e +10ad:0ba +10ae:1fa +10af:1fa +10b0:1fa +10b1:2bc +10b2:106 +10b3:046 +10b4:23c +10b5:1fa +10b6:11a +10b7:1fa +10b8:21a +10b9:1fa +10ba:21a +10bb:2fc +10bc:11e +10bd:3e9 +10be:02c +10bf:056 +10c0:2e6 +10c1:01f +10c2:130 +10c3:0fd +10c4:0a6 +10c5:0da +10c6:11a +10c7:07c +10c8:2be +10c9:21e +10ca:02f +10cb:23e +10cc:01f +10cd:23e +10ce:013 +10cf:1a6 +10d0:0fc +10d1:0a6 +10d2:31c +10d3:1a2 +10d4:1a2 +10d5:306 +10d6:179 +10d7:042 +10d8:130 +10d9:0e0 +10da:306 +10db:3a0 +10dc:3d3 +10dd:23d +10de:040 +10df:086 +10e0:0c6 +10e1:270 +10e2:038 +10e3:0ee +10e4:226 +10e5:270 +10e6:038 +10e7:023 +10e8:33c +10e9:3ae +10ea:0fe +10eb:1be +10ec:3e3 +10ed:106 +10ee:016 +10ef:0ba +10f0:11a +10f1:31c +10f2:07c +10f3:27e +10f4:05f +10f5:002 +10f6:39c +10f7:27e +10f8:03f +10f9:002 +10fa:01b +10fb:3d4 +10fc:022 +10fd:27e +10fe:3eb +10ff:181 +1100:044 +1101:34c +1102:3a0 +1103:2a0 +1104:346 +1105:0af +1106:08e +1107:10e +1108:16e +1109:1ae +110a:36e +110b:07f +110c:35e +110d:01b +110e:17e +110f:05b +1110:356 +1111:01b +1112:176 +1113:03b +1114:06e +1115:35c +1116:2e2 +1117:360 +1118:2ee +1119:3a0 +111a:15c +111b:17d +111c:042 +111d:130 +111e:0fe +111f:270 +1120:378 +1121:10e +1122:3b8 +1123:046 +1124:270 +1125:03c +1126:0ae +1127:2d3 +1128:0b0 +1129:158 +112a:1f8 +112b:0ee +112c:23d +112d:040 +112e:06e +112f:198 +1130:0ae +1131:0a0 +1132:39c +1133:0e0 +1134:39c +1135:04b +1136:0ee +1137:3dc +1138:0a0 +1139:3dc +113a:0e0 +113b:0be +113c:3ee +113d:2fc +113e:0ee +113f:27e +1140:3b3 +1141:0ee +1142:158 +1143:0ce +1144:07c +1145:0fe +1146:198 +1147:0ee +1148:023 +1149:2d4 +114a:027 +114b:3dc +114c:23e +114d:3e3 +114e:270 +114f:158 +1150:038 +1151:0b2 +1152:2f0 +1153:0a0 +1154:198 +1155:2fe +1156:053 +1157:2dc +1158:3dc +1159:23e +115a:3f3 +115b:226 +115c:270 +115d:038 +115e:0ea +115f:2f0 +1160:04e +1161:270 +1162:0ce +1163:3e0 +1164:044 +1165:075 +1166:044 +1167:260 +1168:34c +1169:05f +116a:035 +116b:018 +116c:346 +116d:013 +116e:048 +116f:0a6 +1170:2ee +1171:013 +1172:048 +1173:3e0 +1174:05e +1175:006 +1176:2f6 +1177:013 +1178:04e +1179:2e6 +117a:05b +117b:266 +117c:2e6 +117d:3af +117e:2fc +117f:130 +1180:00a +1181:013 +1182:146 +1183:27e +1184:3f3 +1185:05e +1186:046 +1187:37c +1188:146 +1189:3e0 +118a:158 +118b:130 +118c:0fe +118d:270 +118e:3b8 +118f:03c +1190:0a6 +1191:106 +1192:1bc +1193:3a8 +1194:198 +1195:368 +1196:04e +1197:270 +1198:198 +1199:3e0 +119a:004 +119b:04e +119c:270 +119d:1b8 +119e:1fe +119f:3b5 +11a0:046 +11a1:1fe +11a2:3eb +11a3:28c +11a4:360 +11a5:2a0 +11a6:0b0 +11a7:10e +11a8:31c +11a9:098 +11aa:056 +11ab:3c6 +11ac:0ae +11ad:01e +11ae:158 +11af:35c +11b0:05e +11b1:3d4 +11b2:1a6 +11b3:3f3 +11b4:314 +11b5:067 +11b6:2f6 +11b7:0c7 +11b8:266 +11b9:01b +11ba:006 +11bb:0c3 +11bc:214 +11bd:017 +11be:3d4 +11bf:23e +11c0:3c3 +11c1:198 +11c2:05e +11c3:31c +11c4:2f6 +11c5:013 +11c6:28a +11c7:09c +11c8:10e +11c9:3ea +11ca:3ea +11cb:3ea +11cc:108 +11cd:21c +11ce:093 +11cf:006 +11d0:38e +11d1:226 +11d2:3f3 +11d3:02e +11d4:08a +11d5:06e +11d6:12e +11d7:35a +11d8:05f +11d9:35e +11da:04f +11db:2fa +11dc:32f +11dd:35e +11de:05f +11df:11e +11e0:260 +11e1:1aa +11e2:3e0 +11e3:00a +11e4:34e +11e5:3c7 +11e6:3d4 +11e7:06e +11e8:35b +11e9:23e +11ea:3d4 +11eb:38e +11ec:39b +11ed:2c4 +11ee:260 +11ef:1b8 +11f0:2bc +11f1:05a +11f2:33c +11f3:106 +11f4:1f8 +11f5:05a +11f6:05e +11f7:0ee +11f8:1b8 +11f9:1fe +11fa:193 +11fb:28c +11fc:013 +11fd:2c8 +11fe:0c4 +11ff:18c +1200:013 +1201:0c8 +1202:344 +1203:084 +1204:184 +1205:205 +1206:014 +1207:02d +1208:018 +1209:284 +120a:2cc +120b:013 +120c:288 +120d:2c4 +120e:18c +120f:013 +1210:008 +1211:184 +1212:0cc +1213:013 +1214:188 +1215:0e6 +1216:205 +1217:01c +1218:0e6 +1219:3a9 +121a:018 +121b:0ee +121c:205 +121d:01c +121e:1b8 +121f:13c +1220:056 +1221:0ae +1222:023 +1223:3ae +1224:33c +1225:0fe +1226:1a6 +1227:3e3 +1228:0ee +1229:2ce +122a:0cf +122b:093 +122c:1fe +122d:345 +122e:04b +122f:1fe +1230:26d +1231:04b +1232:0b0 +1233:1a6 +1234:03f +1235:3ce +1236:0ee +1237:33c +1238:0ee +1239:0fe +123a:3cb +123b:2c6 +123c:03f +123d:0e0 +123e:39c +123f:0a0 +1240:11c +1241:2f2 +1242:013 +1243:2c8 +1244:27c +1245:10e +1246:1b8 +1247:15c +1248:1e2 +1249:1a3 +124a:1fe +124b:3f7 +124c:1fe +124d:0c7 +124e:1fe +124f:0d7 +1250:1bc +1251:31c +1252:042 +1253:056 +1254:39c +1255:2a2 +1256:226 +1257:106 +1258:1bc +1259:31c +125a:166 +125b:1ca +125c:013 +125d:18b +125e:130 +125f:00a +1260:306 +1261:017 +1262:2c8 +1263:0a6 +1264:0fb +1265:355 +1266:018 +1267:106 +1268:093 +1269:355 +126a:018 +126b:06e +126c:266 +126d:1ee +126e:10e +126f:1ee +1270:14e +1271:18d +1272:02c +1273:18d +1274:02c +1275:38e +1276:38e +1277:066 +1278:06e +1279:166 +127a:1b8 +127b:13c +127c:2eb +127d:28c +127e:0d7 +127f:130 +1280:00a +1281:2cc +1282:013 +1283:09b +1284:34e +1285:067 +1286:1b8 +1287:13c +1288:31c +1289:2ea +128a:027 +128b:130 +128c:002 +128d:04b +128e:130 +128f:001 +1290:033 +1291:2dc +1292:3d4 +1293:266 +1294:342 +1295:3eb +1296:39c +1297:058 +1298:01e +1299:1be +129a:3e0 +129b:0b0 +129c:1a6 +129d:0c7 +129e:11e +129f:1ee +12a0:3ce +12a1:0e0 +12a2:2dc +12a3:0a0 +12a4:35c +12a5:392 +12a6:0ae +12a7:1f2 +12a8:15e +12a9:0ee +12aa:158 +12ab:33c +12ac:1fe +12ad:15e +12ae:198 +12af:1ee +12b0:33c +12b1:0ae +12b2:066 +12b3:03a +12b4:343 +12b5:2c6 +12b6:03f +12b7:0e0 +12b8:39c +12b9:0a0 +12ba:15c +12bb:2f2 +12bc:013 +12bd:2c8 +12be:02e +12bf:39c +12c0:1ee +12c1:10e +12c2:3dc +12c3:042 +12c4:3d4 +12c5:1ee +12c6:1ee +12c7:1ee +12c8:33c +12c9:0e2 +12ca:0c2 +12cb:0ae +12cc:3dc +12cd:194 +12ce:393 +12cf:0ce +12d0:1bb +12d1:0b0 +12d2:1a6 +12d3:107 +12d4:11e +12d5:1ee +12d6:1ee +12d7:1ee +12d8:3ce +12d9:0e0 +12da:2dc +12db:0a0 +12dc:35c +12dd:392 +12de:0ae +12df:1f2 +12e0:1f2 +12e1:1f2 +12e2:15e +12e3:0ee +12e4:158 +12e5:33c +12e6:1fe +12e7:1fe +12e8:1fe +12e9:15e +12ea:198 +12eb:1ee +12ec:1ee +12ed:1ee +12ee:33c +12ef:0ae +12f0:066 +12f1:03a +12f2:303 +12f3:2c6 +12f4:03f +12f5:0e0 +12f6:39c +12f7:0a0 +12f8:21c +12f9:2f2 +12fa:013 +12fb:2c8 +12fc:00e +12fd:25c +12fe:1e6 +12ff:1e6 +1300:1e6 +1301:013 +1302:162 +1303:3d4 +1304:2d4 +1305:3db +1306:0ae +1307:026 +1308:111 +1309:04a +130a:0ee +130b:06e +130c:1d8 +130d:00e +130e:04e +130f:39c +1310:290 +1311:004 +1312:389 +1313:054 +1314:093 +1315:121 +1316:018 +1317:0ee +1318:1b8 +1319:1fe +131a:387 +131b:1fe +131c:117 +131d:1fe +131e:02f +131f:0ee +1320:1e5 +1321:014 +1322:023 +1323:0ee +1324:1dd +1325:014 +1326:139 +1327:018 +1328:346 +1329:04f +132a:2ee +132b:03f +132c:1b8 +132d:15c +132e:1e2 +132f:01b +1330:101 +1331:032 +1332:39c +1333:098 +1334:31c +1335:26a +1336:10a +1337:130 +1338:002 +1339:30a +133a:3b7 +133b:0aa +133c:349 +133d:02e +133e:0ee +133f:1d5 +1340:014 +1341:32b +1342:34c +1343:0e7 +1344:0f9 +1345:018 +1346:10c +1347:06b +1348:281 +1349:014 +134a:08c +134b:073 +134c:188 +134d:04e +134e:23a +134f:18c +1350:06b +1351:2a0 +1352:2be +1353:3e0 +1354:048 +1355:379 +1356:014 +1357:035 +1358:018 +1359:346 +135a:39f +135b:2ee +135c:38f +135d:2a0 +135e:3e0 +135f:369 +1360:00c +1361:2be +1362:001 +1363:043 +1364:34c +1365:047 +1366:301 +1367:018 +1368:02e +1369:1d8 +136a:04e +136b:1d8 +136c:2d3 +136d:00e +136e:39b +136f:351 +1370:018 +1371:00e +1372:3a9 +1373:018 +1374:2ba +1375:17c +1376:29c +1377:2d0 +1378:0dc +1379:2d0 +137a:10e +137b:1b8 +137c:33c +137d:19c +137e:102 +137f:15c +1380:042 +1381:1ea +1382:09c +1383:3ca +1384:1ea +1385:05c +1386:3ca +1387:1ea +1388:01c +1389:3ca +138a:1ea +138b:15c +138c:10a +138d:0ae +138e:309 +138f:006 +1390:06e +1391:053 +1392:04e +1393:130 +1394:008 +1395:30c +1396:3a0 +1397:130 +1398:00c +1399:3e0 +139a:14e +139b:04e +139c:130 +139d:008 +139e:30c +139f:360 +13a0:3bb +13a1:086 +13a2:158 +13a3:0ee +13a4:1d8 +13a5:0ee +13a6:0ae +13a7:1e6 +13a8:0ae +13a9:1ee +13aa:013 +13ab:166 +13ac:0ae +13ad:1e6 +13ae:0ae +13af:1ee +13b0:013 +13b1:166 +13b2:1d8 +13b3:146 +13b4:1d8 +13b5:0ae +13b6:12e +13b7:013 +13b8:226 +13b9:1e6 +13ba:0ae +13bb:1ee +13bc:013 +13bd:166 +13be:0ae +13bf:0ee +13c0:198 +13c1:05a +13c2:046 +13c3:2fc +13c4:0ee +13c5:12e +13c6:013 +13c7:226 +13c8:0ae +13c9:3e0 +13ca:2dc +13cb:290 +13cc:02e +13cd:044 +13ce:006 +13cf:11e +13d0:260 +13d1:1be +13d2:043 +13d3:04c +13d4:06f +13d5:048 +13d6:2dc +13d7:250 +13d8:11e +13d9:0ba +13da:2fc +13db:0ee +13dc:285 +13dd:04c +13de:0ee +13df:1d8 +13e0:38b +13e1:0ee +13e2:3e0 +13e3:0ee +13e4:04e +13e5:270 +13e6:2dc +13e7:0d0 +13e8:110 +13e9:090 +13ea:310 +13eb:010 +13ec:2d0 +13ed:050 +13ee:050 +13ef:268 +13f0:04e +13f1:25c +13f2:210 +13f3:010 +13f4:3d0 +13f5:210 +13f6:2d0 +13f7:010 +13f8:090 +13f9:2a8 +13fa:0ee +13fb:030 +13fc:3e0 +13fd:0b2 +13fe:123 +13ff:0ab +1400:28c +1401:101 +1402:032 +1403:260 +1404:1b8 +1405:1fe +1406:013 +1407:1fe +1408:055 +1409:04e +140a:10c +140b:0d7 +140c:2dc +140d:250 +140e:01c +140f:162 +1410:033 +1411:354 +1412:027 +1413:3dc +1414:27e +1415:3d3 +1416:14c +1417:03b +1418:37e +1419:037 +141a:1a2 +141b:3d4 +141c:144 +141d:02b +141e:1be +141f:002 +1420:354 +1421:307 +1422:0b0 +1423:279 +1424:032 +1425:006 +1426:09c +1427:34a +1428:047 +1429:104 +142a:3d9 +142b:02c +142c:1b8 +142d:10a +142e:251 +142f:002 +1430:05c +1431:34a +1432:027 +1433:09c +1434:002 +1435:013 +1436:38a +1437:31d +1438:032 +1439:260 +143a:3e6 +143b:016 +143c:386 +143d:066 +143e:3e9 +143f:02c +1440:2e6 +1441:1d1 +1442:00a +1443:158 +1444:3f8 +1445:2e6 +1446:01f +1447:130 +1448:1fc +1449:106 +144a:198 +144b:2dc +144c:1d0 +144d:31c +144e:36a +144f:01f +1450:088 +1451:03c +1452:23e +1453:0fe +1454:0a6 +1455:106 +1456:056 +1457:270 +1458:038 +1459:01e +145a:17e +145b:1b6 +145c:356 +145d:01b +145e:23c +145f:3db +1460:06a +1461:36a +1462:08b +1463:23c +1464:17e +1465:33e +1466:3df +1467:066 +1468:08c +1469:033 +146a:04c +146b:2b7 +146c:048 +146d:084 +146e:2cb +146f:016 +1470:176 +1471:1a6 +1472:2c3 +1473:0be +1474:1bc +1475:0f6 +1476:066 +1477:084 +1478:044 +1479:3e0 +147a:1a0 +147b:31c +147c:110 +147d:19c +147e:050 +147f:320 +1480:013 +1481:278 +1482:1ee +1483:268 +1484:2a8 +1485:086 +1486:2d9 +1487:000 +1488:04e +1489:05c +148a:090 +148b:26e +148c:107 +148d:3cc +148e:3eb +148f:130 +1490:340 +1491:206 +1492:05a +1493:1bc +1494:330 +1495:106 +1496:220 +1497:03c +1498:056 +1499:366 +149a:097 +149b:06e +149c:166 +149d:130 +149e:028 +149f:306 +14a0:30f +14a1:04e +14a2:26e +14a3:11c +14a4:050 +14a5:190 +14a6:10e +14a7:01c +14a8:211 +14a9:024 +14aa:09d +14ab:002 +14ac:066 +14ad:04e +14ae:2a0 +14af:226 +14b0:260 +14b1:1a6 +14b2:3e3 +14b3:03c +14b4:04b +14b5:04e +14b6:226 +14b7:226 +14b8:23c +14b9:023 +14ba:04e +14bb:3e3 +14bc:04e +14bd:25c +14be:0f0 +14bf:17d +14c0:042 +14c1:38d +14c2:04c +14c3:0b0 +14c4:128 +14c5:044 +14c6:019 +14c7:054 +14c8:06e +14c9:2a9 +14ca:00c +14cb:0ae +14cc:0f0 +14cd:198 +14ce:36e +14cf:35f +14d0:1a0 +14d1:21c +14d2:310 +14d3:106 +14d4:226 +14d5:0e6 +14d6:130 +14d7:018 +14d8:27c +14d9:0ba +14da:023 +14db:23a +14dc:37a +14dd:033 +14de:330 +14df:146 +14e0:3db +14e1:126 +14e2:3cb +14e3:186 +14e4:346 +14e5:287 +14e6:048 +14e7:019 +14e8:054 +14e9:06e +14ea:0b0 +14eb:1ce +14ec:04e +14ed:23a +14ee:130 +14ef:1f3 +14f0:2a6 +14f1:36e +14f2:247 +14f3:2a9 +14f4:00c +14f5:10e +14f6:198 +14f7:36e +14f8:217 +14f9:04e +14fa:270 +14fb:138 +14fc:070 +14fd:04e +14fe:26e +14ff:268 +1500:2a8 +1501:3cc +1502:3a0 +1503:084 +1504:081 +1505:002 +1506:1a0 +1507:2a9 +1508:00c +1509:0f0 +150a:0f0 +150b:1d8 +150c:1d8 +150d:0d8 +150e:0d8 +150f:3d8 +1510:3d8 +1511:0ee +1512:06e +1513:2a9 +1514:00c +1515:1ce +1516:34e +1517:2f1 +1518:053 +1519:158 +151a:04e +151b:130 +151c:007 +151d:270 +151e:0ee +151f:038 +1520:14e +1521:0ae +1522:04c +1523:0a7 +1524:12e +1525:0ae +1526:1d8 +1527:2f0 +1528:04e +1529:038 +152a:1d8 +152b:2f0 +152c:130 +152d:0e0 +152e:0ae +152f:0ee +1530:366 +1531:3a0 +1532:06e +1533:266 +1534:34b +1535:056 +1536:33b +1537:18e +1538:000 +1539:363 +153a:009 +153b:020 +153c:1f8 +153d:1bc +153e:2e6 +153f:047 +1540:130 +1541:10c +1542:03c +1543:1e8 +1544:1bc +1545:1e6 +1546:1e6 +1547:3c8 +1548:3cc +1549:023 +154a:266 +154b:3e3 +154c:3e0 +154d:2e5 +154e:000 +154f:205 +1550:042 +1551:02d +1552:018 +1553:139 +1554:018 +1555:18c +1556:013 +1557:048 +1558:184 +1559:109 +155a:018 +155b:021 +155c:018 +155d:0e5 +155e:018 +155f:3ee +1560:3ee +1561:31c +1562:37c +1563:0aa +1564:02e +1565:0ae +1566:0ee +1567:158 +1568:1b8 +1569:37c +156a:35c +156b:2be +156c:1e2 +156d:3fb +156e:2a2 +156f:185 +1570:059 +1571:0ee +1572:229 +1573:058 +1574:158 +1575:1f8 +1576:0bc +1577:056 +1578:146 +1579:06e +157a:078 +157b:14e +157c:198 +157d:0ee +157e:0ae +157f:18c +1580:365 +1581:05d +1582:00c +1583:027 +1584:04c +1585:3b1 +1586:02d +1587:3a5 +1588:054 +1589:3ad +158a:05c +158b:2cc +158c:039 +158d:05b +158e:145 +158f:038 +1590:325 +1591:036 +1592:0a0 +1593:044 +1594:35c +1595:01e +1596:01a +1597:03e +1598:03a +1599:0e0 +159a:29c +159b:0aa +159c:0bc +159d:0e6 +159e:1d8 +159f:0ee +15a0:070 +15a1:0ae +15a2:1bc +15a3:01c +15a4:04b +15a5:12e +15a6:013 +15a7:226 +15a8:0ae +15a9:1d8 +15aa:146 +15ab:1d8 +15ac:0ae +15ad:262 +15ae:3bb +15af:0ee +15b0:0f0 +15b1:3b2 +15b2:33c +15b3:0fe +15b4:0ae +15b5:33c +15b6:11e +15b7:0ae +15b8:0f0 +15b9:0ee +15ba:33c +15bb:11e +15bc:2fc +15bd:3c6 +15be:3dc +15bf:194 +15c0:36b +15c1:0a0 +15c2:04c +15c3:04f +15c4:048 +15c5:0ae +15c6:1d8 +15c7:0ba +15c8:0a2 +15c9:0e0 +15ca:01c +15cb:303 +15cc:0ae +15cd:3e0 +15ce:249 +15cf:054 +15d0:0ae +15d1:2e6 +15d2:01f +15d3:34e +15d4:013 +15d5:2c8 +15d6:0ee +15d7:0f0 +15d8:0f2 +15d9:37c +15da:19c +15db:06a +15dc:0ee +15dd:37c +15de:0ae +15df:37c +15e0:0ee +15e1:3e0 +15e2:139 +15e3:018 +15e4:06e +15e5:1d8 +15e6:02e +15e7:01e +15e8:01a +15e9:0e0 +15ea:39c +15eb:0a0 +15ec:05c +15ed:032 +15ee:23c +15ef:35c +15f0:0f2 +15f1:0ae +15f2:23c +15f3:0b2 +15f4:0ae +15f5:0ee +15f6:23c +15f7:112 +15f8:37c +15f9:01c +15fa:3ca +15fb:3ca +15fc:0f0 +15fd:0ee +15fe:0f0 +15ff:158 +1600:1f8 +1601:05e +1602:05a +1603:1d8 +1604:0ae +1605:1d8 +1606:306 +1607:06f +1608:366 +1609:02f +160a:1d8 +160b:0ae +160c:32e +160d:04f +160e:0ad +160f:000 +1610:139 +1611:018 +1612:1f1 +1613:036 +1614:1d8 +1615:0ae +1616:0a0 +1617:35c +1618:0e0 +1619:19c +161a:044 +161b:013 +161c:222 +161d:0ae +161e:1d8 +161f:1c6 +1620:05f +1621:1d8 +1622:0ae +1623:18e +1624:3c3 +1625:266 +1626:3b3 +1627:226 +1628:12e +1629:0ae +162a:1d8 +162b:146 +162c:3d4 +162d:214 +162e:043 +162f:04c +1630:0df +1631:048 +1632:0dc +1633:0a0 +1634:0ba +1635:0a2 +1636:1d8 +1637:0ee +1638:0f0 +1639:0a0 +163a:3e6 +163b:39c +163c:2fc +163d:0ee +163e:2fc +163f:102 +1640:0c2 +1641:0ee +1642:33c +1643:0be +1644:2fc +1645:35c +1646:3f2 +1647:0e0 +1648:0f0 +1649:0ee +164a:2a3 +164b:0a0 +164c:1d8 +164d:00c +164e:360 +164f:2ee +1650:01f +1651:346 +1652:013 +1653:0c8 +1654:1d8 +1655:086 +1656:0ae +1657:03c +1658:0ae +1659:27c +165a:056 +165b:29c +165c:0aa +165d:3e0 +165e:158 +165f:1b8 +1660:37c +1661:0e0 +1662:05c +1663:0a0 +1664:35c +1665:0f2 +1666:198 +1667:39c +1668:06e +1669:0ee +166a:01b +166b:1f5 +166c:058 +166d:17e +166e:3eb +166f:35c +1670:3f2 +1671:39c +1672:0ae +1673:01b +1674:229 +1675:058 +1676:1fe +1677:3eb +1678:0ae +1679:1f5 +167a:058 +167b:0ae +167c:0c3 +167d:3ae +167e:33c +167f:0fe +1680:2fc +1681:0a2 +1682:33c +1683:392 +1684:18c +1685:3a0 +1686:0e0 +1687:1a2 +1688:0a0 +1689:3e0 +168a:1f2 +168b:0ae +168c:1ee +168d:013 +168e:172 +168f:0ae +1690:0ee +1691:1ee +1692:013 +1693:16e +1694:0ee +1695:3e0 +1696:130 +1697:004 +1698:0e6 +1699:04e +169a:22e +169b:03b +169c:2a0 +169d:1ee +169e:1ee +169f:1ee +16a0:1ee +16a1:260 +16a2:186 +16a3:3cb +16a4:126 +16a5:2a0 +16a6:013 +16a7:1ee +16a8:1a6 +16a9:3f3 +16aa:006 +16ab:2a0 +16ac:0c9 +16ad:034 +16ae:130 +16af:012 +16b0:146 +16b1:3e0 +16b2:168 +16b3:04e +16b4:130 +16b5:012 +16b6:158 +16b7:35c +16b8:210 +16b9:1d0 +16ba:250 +16bb:190 +16bc:010 +16bd:250 +16be:0d0 +16bf:010 +16c0:090 +16c1:090 +16c2:090 +16c3:010 +16c4:210 +16c5:3e0 +16c6:1a8 +16c7:38d +16c8:04c +16c9:205 +16ca:014 +16cb:0b0 +16cc:2fa +16cd:155 +16ce:05e +16cf:2f6 +16d0:013 +16d1:148 +16d2:2fe +16d3:013 +16d4:188 +16d5:02e +16d6:0fa +16d7:10e +16d8:04e +16d9:130 +16da:02b +16db:1bc +16dc:130 +16dd:013 +16de:168 +16df:178 +16e0:306 +16e1:05f +16e2:23e +16e3:2c9 +16e4:058 +16e5:14c +16e6:071 +16e7:035 +16e8:14c +16e9:16d +16ea:034 +16eb:3a3 +16ec:260 +16ed:01a +16ee:013 +16ef:15a +16f0:27e +16f1:3f3 +16f2:0ba +16f3:14c +16f4:013 +16f5:29a +16f6:11a +16f7:05a +16f8:23a +16f9:23a +16fa:23a +16fb:2a0 +16fc:266 +16fd:0ee +16fe:158 +16ff:04e +1700:35c +1701:222 +1702:05b +1703:260 +1704:19a +1705:2a0 +1706:1ee +1707:1ee +1708:1ee +1709:2fe +170a:01b +170b:166 +170c:3ce +170d:326 +170e:3af +170f:0ee +1710:0ae +1711:00e +1712:168 +1713:1d8 +1714:071 +1715:034 +1716:198 +1717:1bc +1718:0ba +1719:05a +171a:0fc +171b:329 +171c:04c +171d:3ce +171e:158 +171f:178 +1720:00e +1721:0ba +1722:130 +1723:010 +1724:1bc +1725:15a +1726:0dc +1727:198 +1728:013 +1729:1ba +172a:158 +172b:1ea +172c:3eb +172d:198 +172e:0ae +172f:02e +1730:086 +1731:12a +1732:033 +1733:23a +1734:0ae +1735:04e +1736:210 +1737:0ae +1738:0ae +1739:046 +173a:03c +173b:006 +173c:10c +173d:0e5 +173e:018 +173f:131 +1740:018 +1741:0fa +1742:1a1 +1743:038 +1744:11a +1745:144 +1746:15a +1747:01b +1748:148 +1749:29a +174a:046 +174b:05e +174c:006 +174d:03c +174e:10c +174f:027 +1750:14c +1751:075 +1752:019 +1753:22d +1754:002 +1755:1a1 +1756:038 +1757:3e3 +1758:02d +1759:018 +175a:18c +175b:013 +175c:148 +175d:008 +175e:3d1 +175f:014 +1760:004 +1761:346 +1762:013 +1763:048 +1764:0ae +1765:04e +1766:068 +1767:0a8 +1768:0e8 +1769:1e8 +176a:130 +176b:190 +176c:30e +176d:017 +176e:048 +176f:1b8 +1770:2dc +1771:310 +1772:19c +1773:090 +1774:3d0 +1775:1a8 +1776:0ae +1777:168 +1778:066 +1779:1d8 +177a:346 +177b:027 +177c:2ee +177d:319 +177e:05e +177f:04c +1780:177 +1781:3a9 +1782:018 +1783:01e +1784:09c +1785:04b +1786:3ce +1787:2fc +1788:39c +1789:0a2 +178a:33c +178b:17e +178c:09c +178d:38a +178e:34a +178f:3bf +1790:0ae +1791:2fc +1792:0ae +1793:2ad +1794:058 +1795:0ce +1796:229 +1797:020 +1798:178 +1799:106 +179a:05e +179b:260 +179c:130 +179d:02b +179e:013 +179f:23e +17a0:1c6 +17a1:3f3 +17a2:168 +17a3:146 +17a4:259 +17a5:059 +17a6:178 +17a7:27e +17a8:077 +17a9:2c9 +17aa:058 +17ab:071 +17ac:034 +17ad:3cb +17ae:04e +17af:2a0 +17b0:23a +17b1:236 +17b2:14c +17b3:07b +17b4:2b6 +17b5:06f +17b6:0ae +17b7:158 +17b8:0ad +17b9:000 +17ba:01e +17bb:0ee +17bc:14c +17bd:16d +17be:035 +17bf:14c +17c0:071 +17c1:034 +17c2:18c +17c3:01b +17c4:2be +17c5:000 +17c6:2dd +17c7:034 +17c8:22d +17c9:002 +17ca:168 +17cb:1b8 +17cc:23c +17cd:31c +17ce:0aa +17cf:10a +17d0:37c +17d1:1a8 +17d2:178 +17d3:3e0 +17d4:1b8 +17d5:23c +17d6:106 +17d7:016 +17d8:3d3 +17d9:2ae +17da:0ae +17db:2ae +17dc:0ae +17dd:0ee +17de:01c +17df:2aa +17e0:0ee +17e1:28c +17e2:360 +17e3:22e +17e4:3a0 +17e5:16e +17e6:3a0 +17e7:0ee +17e8:22a +17e9:0ee +17ea:3e0 +17eb:0a1 +17ec:018 +17ed:10c +17ee:360 +17ef:2cc +17f0:3a0 +17f1:066 +17f2:1d8 +17f3:18c +17f4:027 +17f5:2cd +17f6:014 +17f7:033 +17f8:28c +17f9:017 +17fa:26e +17fb:2f9 +17fc:014 +17fd:066 +17fe:1d8 +17ff:3e0 diff --git a/16c/16c-0-0.png b/16c/16c-0-0.png new file mode 100644 index 0000000..f7a634f Binary files /dev/null and b/16c/16c-0-0.png differ diff --git a/16c/16c-0-1.png b/16c/16c-0-1.png new file mode 100644 index 0000000..3cab727 Binary files /dev/null and b/16c/16c-0-1.png differ diff --git a/16c/16c-0-2.png b/16c/16c-0-2.png new file mode 100644 index 0000000..256aa07 Binary files /dev/null and b/16c/16c-0-2.png differ diff --git a/16c/16c-0-3.png b/16c/16c-0-3.png new file mode 100644 index 0000000..84e59c2 Binary files /dev/null and b/16c/16c-0-3.png differ diff --git a/16c/16c-0-4.png b/16c/16c-0-4.png new file mode 100644 index 0000000..5f88615 Binary files /dev/null and b/16c/16c-0-4.png differ diff --git a/16c/16c-0-5.png b/16c/16c-0-5.png new file mode 100644 index 0000000..1fefe73 Binary files /dev/null and b/16c/16c-0-5.png differ diff --git a/16c/16c-0-6.png b/16c/16c-0-6.png new file mode 100644 index 0000000..b37183b Binary files /dev/null and b/16c/16c-0-6.png differ diff --git a/16c/16c-0-7.png b/16c/16c-0-7.png new file mode 100644 index 0000000..2d7088f Binary files /dev/null and b/16c/16c-0-7.png differ diff --git a/16c/16c-0-8.png b/16c/16c-0-8.png new file mode 100644 index 0000000..2fef58c Binary files /dev/null and b/16c/16c-0-8.png differ diff --git a/16c/16c-0-9.png b/16c/16c-0-9.png new file mode 100644 index 0000000..cc09f45 Binary files /dev/null and b/16c/16c-0-9.png differ diff --git a/16c/16c-1-0.png b/16c/16c-1-0.png new file mode 100644 index 0000000..e4a8b8d Binary files /dev/null and b/16c/16c-1-0.png differ diff --git a/16c/16c-1-1.png b/16c/16c-1-1.png new file mode 100644 index 0000000..ef2f24b Binary files /dev/null and b/16c/16c-1-1.png differ diff --git a/16c/16c-1-2.png b/16c/16c-1-2.png new file mode 100644 index 0000000..69692bd Binary files /dev/null and b/16c/16c-1-2.png differ diff --git a/16c/16c-1-3.png b/16c/16c-1-3.png new file mode 100644 index 0000000..94da2bd Binary files /dev/null and b/16c/16c-1-3.png differ diff --git a/16c/16c-1-4.png b/16c/16c-1-4.png new file mode 100644 index 0000000..0fdd3cc Binary files /dev/null and b/16c/16c-1-4.png differ diff --git a/16c/16c-1-6.png b/16c/16c-1-6.png new file mode 100644 index 0000000..f3a2a07 Binary files /dev/null and b/16c/16c-1-6.png differ diff --git a/16c/16c-1-7.png b/16c/16c-1-7.png new file mode 100644 index 0000000..08e2a66 Binary files /dev/null and b/16c/16c-1-7.png differ diff --git a/16c/16c-1-8.png b/16c/16c-1-8.png new file mode 100644 index 0000000..b6d860a Binary files /dev/null and b/16c/16c-1-8.png differ diff --git a/16c/16c-1-9.png b/16c/16c-1-9.png new file mode 100644 index 0000000..c5f8d96 Binary files /dev/null and b/16c/16c-1-9.png differ diff --git a/16c/16c-2-0.png b/16c/16c-2-0.png new file mode 100644 index 0000000..cc87311 Binary files /dev/null and b/16c/16c-2-0.png differ diff --git a/16c/16c-2-1.png b/16c/16c-2-1.png new file mode 100644 index 0000000..6d748b2 Binary files /dev/null and b/16c/16c-2-1.png differ diff --git a/16c/16c-2-2.png b/16c/16c-2-2.png new file mode 100644 index 0000000..9253c36 Binary files /dev/null and b/16c/16c-2-2.png differ diff --git a/16c/16c-2-3.png b/16c/16c-2-3.png new file mode 100644 index 0000000..9b9486e Binary files /dev/null and b/16c/16c-2-3.png differ diff --git a/16c/16c-2-4.png b/16c/16c-2-4.png new file mode 100644 index 0000000..a412d62 Binary files /dev/null and b/16c/16c-2-4.png differ diff --git a/16c/16c-2-5.png b/16c/16c-2-5.png new file mode 100644 index 0000000..6aef5f8 Binary files /dev/null and b/16c/16c-2-5.png differ diff --git a/16c/16c-2-6.png b/16c/16c-2-6.png new file mode 100644 index 0000000..b19ee60 Binary files /dev/null and b/16c/16c-2-6.png differ diff --git a/16c/16c-2-7.png b/16c/16c-2-7.png new file mode 100644 index 0000000..0d2d725 Binary files /dev/null and b/16c/16c-2-7.png differ diff --git a/16c/16c-2-8.png b/16c/16c-2-8.png new file mode 100644 index 0000000..f143c1b Binary files /dev/null and b/16c/16c-2-8.png differ diff --git a/16c/16c-2-9.png b/16c/16c-2-9.png new file mode 100644 index 0000000..28c8230 Binary files /dev/null and b/16c/16c-2-9.png differ diff --git a/16c/16c-3-0.png b/16c/16c-3-0.png new file mode 100644 index 0000000..e4a75f5 Binary files /dev/null and b/16c/16c-3-0.png differ diff --git a/16c/16c-3-1.png b/16c/16c-3-1.png new file mode 100644 index 0000000..b553407 Binary files /dev/null and b/16c/16c-3-1.png differ diff --git a/16c/16c-3-2.png b/16c/16c-3-2.png new file mode 100644 index 0000000..3862f3b Binary files /dev/null and b/16c/16c-3-2.png differ diff --git a/16c/16c-3-3.png b/16c/16c-3-3.png new file mode 100644 index 0000000..6752de2 Binary files /dev/null and b/16c/16c-3-3.png differ diff --git a/16c/16c-3-4.png b/16c/16c-3-4.png new file mode 100644 index 0000000..cccb745 Binary files /dev/null and b/16c/16c-3-4.png differ diff --git a/16c/16c-3-5.png b/16c/16c-3-5.png new file mode 100644 index 0000000..b015c81 Binary files /dev/null and b/16c/16c-3-5.png differ diff --git a/16c/16c-3-6.png b/16c/16c-3-6.png new file mode 100644 index 0000000..f592537 Binary files /dev/null and b/16c/16c-3-6.png differ diff --git a/16c/16c-3-7.png b/16c/16c-3-7.png new file mode 100644 index 0000000..02a12b3 Binary files /dev/null and b/16c/16c-3-7.png differ diff --git a/16c/16c-3-8.png b/16c/16c-3-8.png new file mode 100644 index 0000000..1024897 Binary files /dev/null and b/16c/16c-3-8.png differ diff --git a/16c/16c-3-9.png b/16c/16c-3-9.png new file mode 100644 index 0000000..3bc64e6 Binary files /dev/null and b/16c/16c-3-9.png differ diff --git a/16c/16c-background.png b/16c/16c-background.png new file mode 100644 index 0000000..8364487 Binary files /dev/null and b/16c/16c-background.png differ diff --git a/Classes/HP16AppDelegate (original).m b/Classes/HP16AppDelegate (original).m new file mode 100644 index 0000000..6d83a60 --- /dev/null +++ b/Classes/HP16AppDelegate (original).m @@ -0,0 +1,73 @@ +// +// HP16AppDelegate.m +// HPcalc +// +// Created by Ken on 8/5/08. +// Copyright Ken Staton 2008. All rights reserved. +// + + +#import "HP16AppDelegate.h" +#import "HP16ViewController.h" +#import "DisplayView.h" +#import "DisplayView.h" +#import "hpcalc.h" +#import + + + +@implementation HP16AppDelegate + +@synthesize window; +@synthesize hp16ViewController; +@synthesize display; +@synthesize calc; + + +- (void)applicationDidFinishLaunching:(UIApplication *)application { + HP16ViewController *aViewController = [[HP16ViewController alloc] + initWithNibName:@"ControllerView" bundle:[NSBundle mainBundle]]; + self.hp16ViewController = aViewController; + [aViewController release]; + + UIView *controllersView = [hp16ViewController view]; + + CGRect frame = CGRectMake(230, 0, 320, 480); + + display = [[DisplayView alloc] initWithFrame: frame]; + + [window addSubview:controllersView]; + [window addSubview:display]; + //[display displayString:@"42"]; + + [window makeKeyAndVisible]; + + calc = [[HPCalc alloc] initWithDisplay:display]; + + [hp16ViewController calcInstance:calc]; // tell the view controller about this calc instance + + //NSLog(@"done DidFinishLaunch"); +} + +- (void)awakeFromNib +{ + + //NSLog(@"awakeFromNib"); +} + + +- (void) applicationWillTerminate:(UIApplication *)application { + [calc shutdown]; + //NSLog(@"applicationWillTerminate"); +} + + +- (void)dealloc { + [display release]; + [hp16ViewController release]; + [window release]; + [super dealloc]; +} + + +@end diff --git a/Classes/HP16AppDelegate.h b/Classes/HP16AppDelegate.h new file mode 100644 index 0000000..b567fa8 --- /dev/null +++ b/Classes/HP16AppDelegate.h @@ -0,0 +1,30 @@ +// +// HPcalc_hp16AppDelegate.h +// HPcalc +// +// Created by Ken on 8/5/08. +// Copyright Ken Staton 2008. All rights reserved. +// + +#import + +@class HP16ViewController; +@class DisplayView; +@class HPCalc; + + +@interface HP16AppDelegate : NSObject { + IBOutlet UIWindow *window; + HP16ViewController *hp16ViewController; + DisplayView *display; + HPCalc *calc; +} + + +@property (nonatomic, strong) UIWindow *window; +@property (nonatomic, strong) HP16ViewController *hp16ViewController; +@property (nonatomic, strong) DisplayView *display; +@property (nonatomic, strong) HPCalc *calc; + +@end + diff --git a/Classes/HP16AppDelegate.m b/Classes/HP16AppDelegate.m new file mode 100644 index 0000000..70915d1 --- /dev/null +++ b/Classes/HP16AppDelegate.m @@ -0,0 +1,76 @@ +// +// HP16AppDelegate.m +// HPcalc +// +// Created by Ken on 8/5/08. +// Copyright Ken Staton 2008. All rights reserved. +// + + +#import "HP16AppDelegate.h" +#import "HP16ViewController.h" +#import "DisplayView.h" +#import "DisplayView.h" +#import "hpcalc.h" +#import + + + +@implementation HP16AppDelegate + +@synthesize window; +@synthesize hp16ViewController; +@synthesize display; +@synthesize calc; + +// KLS see NSAutoreleasePool +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions +{ + HP16ViewController *aViewController = [[HP16ViewController alloc] + initWithNibName:@"ControllerView" bundle:[NSBundle mainBundle]]; + self.hp16ViewController = aViewController; + + UIView *controllersView = [hp16ViewController view]; + + // this is the location of the Calculator's LCD display + // x,y,w,h + //CGRect frame = CGRectMake(230, 0, 320, 480); //ORIGINAL + CGRect frame = CGRectMake(74, 24, 314, 52); + + + display = [[DisplayView alloc] initWithFrame: frame]; + //display.backgroundColor=[UIColor redColor]; //kls + display.opaque=TRUE; + display.alpha=1.0; + + self.window.rootViewController = self.hp16ViewController; + [self.window addSubview:controllersView]; + [self.window addSubview:display]; + [self.window bringSubviewToFront:display]; + [self.window makeKeyAndVisible]; + calc = [[HPCalc alloc] initWithDisplay:display]; + + [hp16ViewController calcInstance:calc]; // tell the view controller about this calc instance + + NSLog(@"done DidFinishLaunchWithOptions"); + return YES; +} + + +- (void)awakeFromNib +{ + + NSLog(@"awakeFromNib"); + [super awakeFromNib]; +} + + +- (void) applicationWillTerminate:(UIApplication *)application { + [calc shutdown]; + NSLog(@"applicationWillTerminate"); +} + + + + +@end diff --git a/Classes/HP16ViewController (original).m b/Classes/HP16ViewController (original).m new file mode 100644 index 0000000..64f0aa0 --- /dev/null +++ b/Classes/HP16ViewController (original).m @@ -0,0 +1,99 @@ +// +// HP16ViewController.m +// HPcalc +// +// Created by Ken on 8/5/08. +// Copyright 2008 Ken Staton. All rights reserved. +// + +#import "HP16ViewController.h" +#import "HP16AppDelegate.h" +#import "hpcalc.h" +#import +#import + + +@implementation HP16ViewController + +-(void)calcInstance:(id)calc { + thecalc = calc; +} + + +- (IBAction)keyPressed:(id)sender { + + NSInteger code = [sender tag]; + //NSLog(@"in vc keyPressed. key = %d",code); + + [thecalc processKeypress: code]; + [thecalc processKeypress: -1]; + + AudioServicesPlaySystemSound(1105); // key click +} + + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { + // Initialization code + //NSLog(@"initWithNibName"); + } + return self; +} + + + +/* + Implement loadView if you want to create a view hierarchy programmatically +- (void)loadView { +} + */ + + +// If you need to do additional setup after loading the view, override viewDidLoad. + +- (void)viewDidLoad { + //UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; + [super viewDidLoad]; + //if (orientation == UIInterfaceOrientationLandscapeLeft) { + if (TRUE) { + CGAffineTransform transform = self.view.transform; + // Use the status bar frame to determine the center point of the window's content area. + //CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; + //CGRect bounds = CGRectMake(0, 0, statusBarFrame.size.height, statusBarFrame.origin.x); + //CGPoint center = CGPointMake(bounds.size.height / 2.0, bounds.size.width / 2.0); + + CGPoint center = CGPointMake(320 / 2.0, 480 / 2.0); + // Set the center point of the view to the center point of the window's content area. + self.view.center = center; + + // Rotate the view 90 degrees around center point. + transform = CGAffineTransformRotate(transform, (M_PI / 2.0)); + self.view.transform = transform; + } + +} + + + + + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations + //return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); + //return YES; + return NO; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview + // Release anything that's not essential, such as cached data +} + + +- (void)dealloc { + [super dealloc]; +} + + +@end diff --git a/Classes/HP16ViewController.h b/Classes/HP16ViewController.h new file mode 100644 index 0000000..5414036 --- /dev/null +++ b/Classes/HP16ViewController.h @@ -0,0 +1,23 @@ +// +// HP16ViewController.h +// HPcalc +// +// Created by Ken on 8/5/08. +// Copyright 2008 Ken Staton. All rights reserved. +// + +#import + +@class HPCalc; + + + +@interface HP16ViewController : UIViewController { + HPCalc *thecalc; +} + +- (void)calcInstance:(id)calc; +- (IBAction)keyPressed:(id)sender; + + +@end diff --git a/Classes/HP16ViewController.m b/Classes/HP16ViewController.m new file mode 100644 index 0000000..d24753a --- /dev/null +++ b/Classes/HP16ViewController.m @@ -0,0 +1,133 @@ +// +// HP16ViewController.m +// HPcalc +// +// Created by Ken on 8/5/08. +// Copyright 2008 Ken Staton. All rights reserved. +// +/* + The UIScreen bounds behavior has changed in iOS8. + Previously it would always give you width and height of the screen in portrait (so 320 x 568 on the iPhone 5), + but in iOS8 it will give you width and height with respect to whatever orientation you're in, + i.e. in landscape you would get 568 x 320. + + If you want to get the bounds in portrait (like before), use: + + [UIScreen mainScreen].fixedCoordinateSpace.bounds.size + */ + +// landscape on iPhone 6: +// 667 x 375 +// 1334 x 750 (@2x) + +// landscape on iPadPro 9": +// + +// landscape on iPhone 11pro: +// 812 x 375 points +// 1624 x 750 (@2x) + + +#import "HP16ViewController.h" +#import "HP16AppDelegate.h" +#import "hpcalc.h" +#import +#import + + +@implementation HP16ViewController + +-(void)calcInstance:(id)calc { + thecalc = calc; +} + + +- (IBAction)keyPressed:(id)sender { + + NSInteger code = [sender tag]; + NSLog(@"in vc keyPressed. key = %ld",(long)code); + + PowerState PWR = thecalc->_PWR; + + [thecalc processKeypress: (int)code]; + [thecalc processKeypress: -1]; + + if (code == 24) { + //NSLog(@"power button pressed %lu",(unsigned long)PWR); + if (PWR == ON) { thecalc->_PWR=OFF;} + else { thecalc->_PWR=ON;} + } + if (PWR == ON) { // key click only when "on" + AudioServicesPlaySystemSound(1105); + } + +} + + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { + // Initialization code + NSLog(@"initWithNibName"); + } + return self; +} + + + +//Implement loadView if you want to create a view hierarchy programmatically +/*- (void)loadView { + [super loadView]; + NSLog(@"loadview"); +}*/ + + + +// If you need to do additional setup after loading the view, override viewDidLoad. + +- (void)viewDidLoad { + [super viewDidLoad]; + if (FALSE) { + NSLog(@"transform_rotate"); + CGAffineTransform transform = self.view.transform; + //CGPoint center = CGPointMake(bounds.size.height / 2.0, bounds.size.width / 2.0); + + //CGPoint center = CGPointMake(667 / 4.0, 375 / 4.0); + //CGPoint center = CGPointMake(812 / 2.0, 375 / 2.0); + //CGPoint center = CGPointMake(1624 / 2.0, 750 / 2.0); + CGPoint center = CGPointMake(375 / 2.0, 812 / 2.0); + // Set the center point of the view to the center point of the window's content area. + self.view.center = center; + + // Rotate the view 90 degrees around center point. + transform = CGAffineTransformRotate(transform, (M_PI / 2.0)); + self.view.transform = transform; + } + NSLog(@"viewDidLoad"); + NSLog(@"H %f, W %f", [UIScreen mainScreen].fixedCoordinateSpace.bounds.size.height, [UIScreen mainScreen].fixedCoordinateSpace.bounds.size.width); + +} + +/* +- (BOOL)shouldAutorotate:(UIInterfaceOrientation)interfaceOrientation { + // Return YES for supported orientations + //return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); + return NO; +} +*/ + +- (UIInterfaceOrientationMask)supportedInterfaceOrientations +{ + return UIInterfaceOrientationMaskLandscape; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview + // Release anything that's not essential, such as cached data + NSLog(@"Memory Warning"); +} + + + + +@end diff --git a/ControllerView.xib b/ControllerView.xib new file mode 100644 index 0000000..315f651 --- /dev/null +++ b/ControllerView.xib @@ -0,0 +1,705 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Default-568h@2x.png b/Default-568h@2x.png new file mode 100644 index 0000000..0891b7a Binary files /dev/null and b/Default-568h@2x.png differ diff --git a/Default.png b/Default.png new file mode 100644 index 0000000..ff802ee Binary files /dev/null and b/Default.png differ diff --git a/HP16.xcodeproj/ken.mode1v3 b/HP16.xcodeproj/ken.mode1v3 new file mode 100644 index 0000000..2783881 --- /dev/null +++ b/HP16.xcodeproj/ken.mode1v3 @@ -0,0 +1,1410 @@ + + + + + ActivePerspectiveName + Project + AllowedModules + + + BundleLoadPath + + MaxInstances + n + Module + PBXSmartGroupTreeModule + Name + Groups and Files Outline View + + + BundleLoadPath + + MaxInstances + n + Module + PBXNavigatorGroup + Name + Editor + + + BundleLoadPath + + MaxInstances + n + Module + XCTaskListModule + Name + Task List + + + BundleLoadPath + + MaxInstances + n + Module + XCDetailModule + Name + File and Smart Group Detail Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXBuildResultsModule + Name + Detailed Build Results Viewer + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXProjectFindModule + Name + Project Batch Find Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCProjectFormatConflictsModule + Name + Project Format Conflicts List + + + BundleLoadPath + + MaxInstances + n + Module + PBXBookmarksModule + Name + Bookmarks Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXClassBrowserModule + Name + Class Browser + + + BundleLoadPath + + MaxInstances + n + Module + PBXCVSModule + Name + Source Code Control Tool + + + BundleLoadPath + + MaxInstances + n + Module + PBXDebugBreakpointsModule + Name + Debug Breakpoints Tool + + + BundleLoadPath + + MaxInstances + n + Module + XCDockableInspector + Name + Inspector + + + BundleLoadPath + + MaxInstances + n + Module + PBXOpenQuicklyModule + Name + Open Quickly Tool + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugSessionModule + Name + Debugger + + + BundleLoadPath + + MaxInstances + 1 + Module + PBXDebugCLIModule + Name + Debug Console + + + BundleLoadPath + + MaxInstances + n + Module + XCSnapshotModule + Name + Snapshots Tool + + + BundlePath + /Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources + Description + DefaultDescriptionKey + DockingSystemVisible + + Extension + mode1v3 + FavBarConfig + + PBXProjectModuleGUID + BEA725B90E783C02007330D2 + XCBarModuleItemNames + + XCBarModuleItems + + + FirstTimeWindowDisplayed + + Identifier + com.apple.perspectives.project.mode1v3 + MajorVersion + 33 + MinorVersion + 0 + Name + Default + Notifications + + OpenEditors + + PerspectiveWidths + + -1 + -1 + + Perspectives + + + ChosenToolbarItems + + active-combo-popup + action + NSToolbarFlexibleSpaceItem + debugger-enable-breakpoints + build-and-go + com.apple.ide.PBXToolbarStopButton + get-info + NSToolbarFlexibleSpaceItem + com.apple.pbx.toolbar.searchfield + + ControllerClassBaseName + + IconName + WindowOfProjectWithEditor + Identifier + perspective.project + IsVertical + + Layout + + + BecomeActive + + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 716}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 734}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 309 90 1066 775 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 203pt + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20306471E060097A5F4 + PBXProjectModuleLabel + Info.plist + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CE0B20406471E060097A5F4 + PBXProjectModuleLabel + Info.plist + _historyCapacity + 0 + bookmark + BEEBA94B13A4292900A96A2C + history + + BEA727910E78442D007330D2 + BEA727920E78442D007330D2 + BEA727930E78442D007330D2 + BEA727940E78442D007330D2 + BEA727950E78442D007330D2 + BEA727960E78442D007330D2 + BEA727970E78442D007330D2 + BEA727980E78442D007330D2 + BEA728FD0E786A6B007330D2 + BEA728FE0E786A6B007330D2 + BECA84740E81F7B8007B596D + BECA84750E81F7B8007B596D + BECA84770E81F7B8007B596D + BECA84780E81F7B8007B596D + BECA84790E81F7B8007B596D + BECA847A0E81F7B8007B596D + BE2ABBC512A60F3900E4CB66 + BEF117D912CFC9F40017A4E6 + + + SplitCount + 1 + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {858, 493}} + RubberWindowFrame + 309 90 1066 775 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 493pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CE0B20506471E060097A5F4 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{0, 498}, {858, 236}} + RubberWindowFrame + 309 90 1066 775 0 0 1440 878 + + Module + XCDetailModule + Proportion + 236pt + + + Proportion + 858pt + + + Name + Project + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + XCModuleDock + PBXNavigatorGroup + XCDetailModule + + TableOfContents + + BEEBA93813A428B900A96A2C + 1CE0B1FE06471DED0097A5F4 + BEEBA93913A428B900A96A2C + 1CE0B20306471E060097A5F4 + 1CE0B20506471E060097A5F4 + + ToolbarConfigUserDefaultsMinorVersion + 2 + ToolbarConfiguration + xcode.toolbar.config.defaultV3 + + + ControllerClassBaseName + + IconName + WindowOfProject + Identifier + perspective.morph + IsVertical + 0 + Layout + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C37FBAC04509CD000000102 + 1C37FAAC04509CD000000102 + 1C08E77C0454961000C914BD + 1C37FABC05509CD000000102 + 1C37FABC05539CD112110102 + E2644B35053B69B200211256 + 1C37FABC04509CD000100104 + 1CC0EA4004350EF90044410B + 1CC0EA4004350EF90041110B + + PBXProjectModuleGUID + 11E0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + yes + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 186 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 29B97314FDCFA39411CA2CEA + 1C37FABC05509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {186, 337}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 1 + XCSharingToken + com.apple.Xcode.GFSharingToken + + GeometryConfiguration + + Frame + {{0, 0}, {203, 355}} + GroupTreeTableConfiguration + + MainColumn + 186 + + RubberWindowFrame + 373 269 690 397 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 100% + + + Name + Morph + PreferredWidth + 300 + ServiceClasses + + XCModuleDock + PBXSmartGroupTreeModule + + TableOfContents + + 11E0B1FE06471DED0097A5F4 + + ToolbarConfiguration + xcode.toolbar.config.default.shortV3 + + + PerspectivesBarVisible + + ShelfIsVisible + + SourceDescription + file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecificationMode1.xcperspec' + StatusbarIsVisible + + TimeStamp + 0.0 + ToolbarDisplayMode + 1 + ToolbarIsVisible + + ToolbarSizeMode + 1 + Type + Perspectives + UpdateMessage + The Default Workspace in this version of Xcode now includes support to hide and show the detail view (what has been referred to as the "Metro-Morph" feature). You must discard your current Default Workspace settings and update to the latest Default Workspace in order to gain this feature. Do you wish to update to the latest Workspace defaults for project '%@'? + WindowJustification + 5 + WindowOrderList + + BEEBA94C13A4292900A96A2C + BEEBA94D13A4292900A96A2C + 1C78EAAD065D492600B07095 + 1CD10A99069EF8BA00B06720 + BEA728F30E7869F1007330D2 + /Users/ken/Rolltop/iPhone Programming/Projects/hpcalc/HP16/HP16.xcodeproj + + WindowString + 309 90 1066 775 0 0 1440 878 + WindowToolsV3 + + + FirstTimeWindowDisplayed + + Identifier + windowTool.build + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528F0623707200166675 + PBXProjectModuleLabel + + StatusBarVisibility + + + GeometryConfiguration + + Frame + {{0, 0}, {659, 309}} + RubberWindowFrame + 8 146 659 591 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 309pt + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + XCMainBuildResultsModuleGUID + PBXProjectModuleLabel + Build Results + XCBuildResultsTrigger_Collapse + 1021 + XCBuildResultsTrigger_Open + 1011 + + GeometryConfiguration + + Frame + {{0, 314}, {659, 236}} + RubberWindowFrame + 8 146 659 591 0 0 1440 878 + + Module + PBXBuildResultsModule + Proportion + 236pt + + + Proportion + 550pt + + + Name + Build Results + ServiceClasses + + PBXBuildResultsModule + + StatusbarIsVisible + + TableOfContents + + BEA728F30E7869F1007330D2 + BEEBA93413A428B000A96A2C + 1CD0528F0623707200166675 + XCMainBuildResultsModuleGUID + + ToolbarConfiguration + xcode.toolbar.config.buildV3 + WindowString + 8 146 659 591 0 0 1440 878 + WindowToolGUID + BEA728F30E7869F1007330D2 + WindowToolIsVisible + + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debugger + IsVertical + + Layout + + + Dock + + + ContentConfiguration + + Debugger + + HorizontalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {316, 203}} + {{316, 0}, {378, 203}} + + + VerticalSplitView + + _collapsingFrameDimension + 0.0 + _indexOfCollapsedView + 0 + _percentageOfCollapsedView + 0.0 + isCollapsed + yes + sizes + + {{0, 0}, {694, 203}} + {{0, 203}, {694, 178}} + + + + LauncherConfigVersion + 8 + PBXProjectModuleGUID + 1C162984064C10D400B95A72 + PBXProjectModuleLabel + Debug - GLUTExamples (Underwater) + + GeometryConfiguration + + DebugConsoleVisible + None + DebugConsoleWindowFrame + {{200, 200}, {500, 300}} + DebugSTDIOWindowFrame + {{200, 200}, {500, 300}} + Frame + {{0, 0}, {694, 381}} + PBXDebugSessionStackFrameViewKey + + DebugVariablesTableConfiguration + + Name + 120 + Value + 85 + Summary + 148 + + Frame + {{316, 0}, {378, 203}} + RubberWindowFrame + 239 410 694 422 0 0 1440 878 + + RubberWindowFrame + 239 410 694 422 0 0 1440 878 + + Module + PBXDebugSessionModule + Proportion + 381pt + + + Proportion + 381pt + + + Name + Debugger + ServiceClasses + + PBXDebugSessionModule + + StatusbarIsVisible + + TableOfContents + + 1CD10A99069EF8BA00B06720 + BEEBA93A13A428B900A96A2C + 1C162984064C10D400B95A72 + BEEBA93B13A428B900A96A2C + BEEBA93C13A428B900A96A2C + BEEBA93D13A428B900A96A2C + BEEBA93E13A428B900A96A2C + BEEBA93F13A428B900A96A2C + + ToolbarConfiguration + xcode.toolbar.config.debugV3 + WindowString + 239 410 694 422 0 0 1440 878 + WindowToolGUID + 1CD10A99069EF8BA00B06720 + WindowToolIsVisible + + + + Identifier + windowTool.find + Layout + + + Dock + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1CDD528C0622207200134675 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1CD0528D0623707200166675 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {781, 167}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXNavigatorGroup + Proportion + 781pt + + + Proportion + 50% + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD0528E0623707200166675 + PBXProjectModuleLabel + Project Find + + GeometryConfiguration + + Frame + {{8, 0}, {773, 254}} + RubberWindowFrame + 62 385 781 470 0 0 1440 878 + + Module + PBXProjectFindModule + Proportion + 50% + + + Proportion + 428pt + + + Name + Project Find + ServiceClasses + + PBXProjectFindModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C530D57069F1CE1000CFCEE + 1C530D58069F1CE1000CFCEE + 1C530D59069F1CE1000CFCEE + 1CDD528C0622207200134675 + 1C530D5A069F1CE1000CFCEE + 1CE0B1FE06471DED0097A5F4 + 1CD0528E0623707200166675 + + WindowString + 62 385 781 470 0 0 1440 878 + WindowToolGUID + 1C530D57069F1CE1000CFCEE + WindowToolIsVisible + 0 + + + Identifier + MENUSEPARATOR + + + FirstTimeWindowDisplayed + + Identifier + windowTool.debuggerConsole + IsVertical + + Layout + + + Dock + + + BecomeActive + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAAC065D492600B07095 + PBXProjectModuleLabel + Debugger Console + + GeometryConfiguration + + Frame + {{0, 0}, {650, 209}} + RubberWindowFrame + 553 387 650 250 0 0 1440 878 + + Module + PBXDebugCLIModule + Proportion + 209pt + + + Proportion + 209pt + + + Name + Debugger Console + ServiceClasses + + PBXDebugCLIModule + + StatusbarIsVisible + + TableOfContents + + 1C78EAAD065D492600B07095 + BEEBA94013A428B900A96A2C + 1C78EAAC065D492600B07095 + + ToolbarConfiguration + xcode.toolbar.config.consoleV3 + WindowString + 553 387 650 250 0 0 1440 878 + WindowToolGUID + 1C78EAAD065D492600B07095 + WindowToolIsVisible + + + + Identifier + windowTool.snapshots + Layout + + + Dock + + + Module + XCSnapshotModule + Proportion + 100% + + + Proportion + 100% + + + Name + Snapshots + ServiceClasses + + XCSnapshotModule + + StatusbarIsVisible + Yes + ToolbarConfiguration + xcode.toolbar.config.snapshots + WindowString + 315 824 300 550 0 0 1440 878 + WindowToolIsVisible + Yes + + + Identifier + windowTool.scm + Layout + + + Dock + + + ContentConfiguration + + PBXProjectModuleGUID + 1C78EAB2065D492600B07095 + PBXProjectModuleLabel + <No Editor> + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 1C78EAB3065D492600B07095 + + SplitCount + 1 + + StatusBarVisibility + 1 + + GeometryConfiguration + + Frame + {{0, 0}, {452, 0}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + + Module + PBXNavigatorGroup + Proportion + 0pt + + + BecomeActive + 1 + ContentConfiguration + + PBXProjectModuleGUID + 1CD052920623707200166675 + PBXProjectModuleLabel + SCM + + GeometryConfiguration + + ConsoleFrame + {{0, 259}, {452, 0}} + Frame + {{0, 7}, {452, 259}} + RubberWindowFrame + 743 379 452 308 0 0 1280 1002 + TableConfiguration + + Status + 30 + FileName + 199 + Path + 197.0950012207031 + + TableFrame + {{0, 0}, {452, 250}} + + Module + PBXCVSModule + Proportion + 262pt + + + Proportion + 266pt + + + Name + SCM + ServiceClasses + + PBXCVSModule + + StatusbarIsVisible + 1 + TableOfContents + + 1C78EAB4065D492600B07095 + 1C78EAB5065D492600B07095 + 1C78EAB2065D492600B07095 + 1CD052920623707200166675 + + ToolbarConfiguration + xcode.toolbar.config.scm + WindowString + 743 379 452 308 0 0 1280 1002 + + + Identifier + windowTool.breakpoints + IsVertical + 0 + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + PBXBottomSmartGroupGIDs + + 1C77FABC04509CD000000102 + + PBXProjectModuleGUID + 1CE0B1FE06471DED0097A5F4 + PBXProjectModuleLabel + Files + PBXProjectStructureProvided + no + PBXSmartGroupTreeModuleColumnData + + PBXSmartGroupTreeModuleColumnWidthsKey + + 168 + + PBXSmartGroupTreeModuleColumnsKey_v4 + + MainColumn + + + PBXSmartGroupTreeModuleOutlineStateKey_v7 + + PBXSmartGroupTreeModuleOutlineStateExpansionKey + + 1C77FABC04509CD000000102 + + PBXSmartGroupTreeModuleOutlineStateSelectionKey + + + 0 + + + PBXSmartGroupTreeModuleOutlineStateVisibleRectKey + {{0, 0}, {168, 350}} + + PBXTopSmartGroupGIDs + + XCIncludePerspectivesSwitch + 0 + + GeometryConfiguration + + Frame + {{0, 0}, {185, 368}} + GroupTreeTableConfiguration + + MainColumn + 168 + + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + PBXSmartGroupTreeModule + Proportion + 185pt + + + ContentConfiguration + + PBXProjectModuleGUID + 1CA1AED706398EBD00589147 + PBXProjectModuleLabel + Detail + + GeometryConfiguration + + Frame + {{190, 0}, {554, 368}} + RubberWindowFrame + 315 424 744 409 0 0 1440 878 + + Module + XCDetailModule + Proportion + 554pt + + + Proportion + 368pt + + + MajorVersion + 3 + MinorVersion + 0 + Name + Breakpoints + ServiceClasses + + PBXSmartGroupTreeModule + XCDetailModule + + StatusbarIsVisible + 1 + TableOfContents + + 1CDDB66807F98D9800BB5817 + 1CDDB66907F98D9800BB5817 + 1CE0B1FE06471DED0097A5F4 + 1CA1AED706398EBD00589147 + + ToolbarConfiguration + xcode.toolbar.config.breakpointsV3 + WindowString + 315 424 744 409 0 0 1440 878 + WindowToolGUID + 1CDDB66807F98D9800BB5817 + WindowToolIsVisible + 1 + + + Identifier + windowTool.debugAnimator + Layout + + + Dock + + + Module + PBXNavigatorGroup + Proportion + 100% + + + Proportion + 100% + + + Name + Debug Visualizer + ServiceClasses + + PBXNavigatorGroup + + StatusbarIsVisible + 1 + ToolbarConfiguration + xcode.toolbar.config.debugAnimatorV3 + WindowString + 100 100 700 500 0 0 1280 1002 + + + Identifier + windowTool.bookmarks + Layout + + + Dock + + + Module + PBXBookmarksModule + Proportion + 100% + + + Proportion + 100% + + + Name + Bookmarks + ServiceClasses + + PBXBookmarksModule + + StatusbarIsVisible + 0 + WindowString + 538 42 401 187 0 0 1280 1002 + + + Identifier + windowTool.projectFormatConflicts + Layout + + + Dock + + + Module + XCProjectFormatConflictsModule + Proportion + 100% + + + Proportion + 100% + + + Name + Project Format Conflicts + ServiceClasses + + XCProjectFormatConflictsModule + + StatusbarIsVisible + 0 + WindowContentMinSize + 450 300 + WindowString + 50 850 472 307 0 0 1440 877 + + + Identifier + windowTool.classBrowser + Layout + + + Dock + + + BecomeActive + 1 + ContentConfiguration + + OptionsSetName + Hierarchy, all classes + PBXProjectModuleGUID + 1CA6456E063B45B4001379D8 + PBXProjectModuleLabel + Class Browser - NSObject + + GeometryConfiguration + + ClassesFrame + {{0, 0}, {374, 96}} + ClassesTreeTableConfiguration + + PBXClassNameColumnIdentifier + 208 + PBXClassBookColumnIdentifier + 22 + + Frame + {{0, 0}, {630, 331}} + MembersFrame + {{0, 105}, {374, 395}} + MembersTreeTableConfiguration + + PBXMemberTypeIconColumnIdentifier + 22 + PBXMemberNameColumnIdentifier + 216 + PBXMemberTypeColumnIdentifier + 97 + PBXMemberBookColumnIdentifier + 22 + + PBXModuleWindowStatusBarHidden2 + 1 + RubberWindowFrame + 385 179 630 352 0 0 1440 878 + + Module + PBXClassBrowserModule + Proportion + 332pt + + + Proportion + 332pt + + + Name + Class Browser + ServiceClasses + + PBXClassBrowserModule + + StatusbarIsVisible + 0 + TableOfContents + + 1C0AD2AF069F1E9B00FABCE6 + 1C0AD2B0069F1E9B00FABCE6 + 1CA6456E063B45B4001379D8 + + ToolbarConfiguration + xcode.toolbar.config.classbrowser + WindowString + 385 179 630 352 0 0 1440 878 + WindowToolGUID + 1C0AD2AF069F1E9B00FABCE6 + WindowToolIsVisible + 0 + + + Identifier + windowTool.refactoring + IncludeInToolsMenu + 0 + Layout + + + Dock + + + BecomeActive + 1 + GeometryConfiguration + + Frame + {0, 0}, {500, 335} + RubberWindowFrame + {0, 0}, {500, 335} + + Module + XCRefactoringModule + Proportion + 100% + + + Proportion + 100% + + + Name + Refactoring + ServiceClasses + + XCRefactoringModule + + WindowString + 200 200 500 356 0 0 1920 1200 + + + + diff --git a/HP16.xcodeproj/ken.pbxuser b/HP16.xcodeproj/ken.pbxuser new file mode 100644 index 0000000..d252701 --- /dev/null +++ b/HP16.xcodeproj/ken.pbxuser @@ -0,0 +1,399 @@ +// !$*UTF8*$! +{ + 1D6058900D05DD3D006BFB54 /* HP16 */ = { + activeExec = 0; + executables = ( + BEA725B00E783BFF007330D2 /* HP16 */, + ); + }; + 29B97313FDCFA39411CA2CEA /* Project object */ = { + activeBuildConfigurationName = Release; + activeExecutable = BEA725B00E783BFF007330D2 /* HP16 */; + activeSDKPreference = iphoneos4.3; + activeTarget = 1D6058900D05DD3D006BFB54 /* HP16 */; + addToTargets = ( + 1D6058900D05DD3D006BFB54 /* HP16 */, + ); + codeSenseManager = BEA725BB0E783C02007330D2 /* Code sense */; + executables = ( + BEA725B00E783BFF007330D2 /* HP16 */, + ); + perUserDictionary = { + PBXConfiguration.PBXFileTableDataSource3.PBXErrorsWarningsDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXErrorsWarningsDataSource_LocationID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 300, + 509, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXErrorsWarningsDataSource_TypeID, + PBXErrorsWarningsDataSource_MessageID, + PBXErrorsWarningsDataSource_LocationID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 619, + 20, + 48, + 43, + 43, + 20, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + PBXFileDataSource_Target_ColumnID, + ); + }; + PBXConfiguration.PBXFileTableDataSource3.PBXFindDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFindDataSource_LocationID; + PBXFileTableDataSourceColumnWidthsKey = ( + 200, + 633, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFindDataSource_MessageID, + PBXFindDataSource_LocationID, + ); + }; + PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = { + PBXFileTableDataSourceColumnSortingDirectionKey = "-1"; + PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID; + PBXFileTableDataSourceColumnWidthsKey = ( + 20, + 579, + 60, + 20, + 48, + 43, + 43, + ); + PBXFileTableDataSourceColumnsKey = ( + PBXFileDataSource_FiletypeID, + PBXFileDataSource_Filename_ColumnID, + PBXTargetDataSource_PrimaryAttribute, + PBXFileDataSource_Built_ColumnID, + PBXFileDataSource_ObjectSize_ColumnID, + PBXFileDataSource_Errors_ColumnID, + PBXFileDataSource_Warnings_ColumnID, + ); + }; + PBXPerProjectTemplateStateSaveDate = 329525342; + PBXWorkspaceStateSaveDate = 329525342; + }; + perUserProjectItems = { + BE2ABBC512A60F3900E4CB66 /* PBXBookmark */ = BE2ABBC512A60F3900E4CB66 /* PBXBookmark */; + BEA727910E78442D007330D2 /* PBXTextBookmark */ = BEA727910E78442D007330D2 /* PBXTextBookmark */; + BEA727920E78442D007330D2 /* PBXTextBookmark */ = BEA727920E78442D007330D2 /* PBXTextBookmark */; + BEA727930E78442D007330D2 /* PBXTextBookmark */ = BEA727930E78442D007330D2 /* PBXTextBookmark */; + BEA727940E78442D007330D2 /* PBXTextBookmark */ = BEA727940E78442D007330D2 /* PBXTextBookmark */; + BEA727950E78442D007330D2 /* PBXTextBookmark */ = BEA727950E78442D007330D2 /* PBXTextBookmark */; + BEA727960E78442D007330D2 /* PBXTextBookmark */ = BEA727960E78442D007330D2 /* PBXTextBookmark */; + BEA727970E78442D007330D2 /* PBXTextBookmark */ = BEA727970E78442D007330D2 /* PBXTextBookmark */; + BEA727980E78442D007330D2 /* PBXTextBookmark */ = BEA727980E78442D007330D2 /* PBXTextBookmark */; + BEA728FD0E786A6B007330D2 /* PBXTextBookmark */ = BEA728FD0E786A6B007330D2 /* PBXTextBookmark */; + BEA728FE0E786A6B007330D2 /* PBXTextBookmark */ = BEA728FE0E786A6B007330D2 /* PBXTextBookmark */; + BECA84740E81F7B8007B596D /* PBXTextBookmark */ = BECA84740E81F7B8007B596D /* PBXTextBookmark */; + BECA84750E81F7B8007B596D /* PBXBookmark */ = BECA84750E81F7B8007B596D /* PBXBookmark */; + BECA84770E81F7B8007B596D /* PBXBookmark */ = BECA84770E81F7B8007B596D /* PBXBookmark */; + BECA84780E81F7B8007B596D /* PBXBookmark */ = BECA84780E81F7B8007B596D /* PBXBookmark */; + BECA84790E81F7B8007B596D /* PBXBookmark */ = BECA84790E81F7B8007B596D /* PBXBookmark */; + BECA847A0E81F7B8007B596D /* PBXBookmark */ = BECA847A0E81F7B8007B596D /* PBXBookmark */; + BEEBA94B13A4292900A96A2C /* PlistBookmark */ = BEEBA94B13A4292900A96A2C /* PlistBookmark */; + BEF117D912CFC9F40017A4E6 /* PlistBookmark */ = BEF117D912CFC9F40017A4E6 /* PlistBookmark */; + }; + sourceControlManager = BEA725BA0E783C02007330D2 /* Source Control */; + userBuildSettings = { + }; + }; + 29B97316FDCFA39411CA2CEA /* main.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {954, 546}}"; + sepNavSelRange = "{140, 0}"; + sepNavVisRange = "{0, 1094}"; + }; + }; + BE2ABBC512A60F3900E4CB66 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = BEA727230E784247007330D2 /* Default.png */; + }; + BEA725B00E783BFF007330D2 /* HP16 */ = { + isa = PBXExecutable; + activeArgIndices = ( + ); + argumentStrings = ( + ); + autoAttachOnCrash = 1; + breakpointsEnabled = 0; + configStateDict = { + }; + customDataFormattersEnabled = 1; + dataTipCustomDataFormattersEnabled = 1; + dataTipShowTypeColumn = 1; + dataTipSortType = 0; + debuggerPlugin = GDBDebugging; + disassemblyDisplayState = 0; + dylibVariantSuffix = ""; + enableDebugStr = 1; + environmentEntries = ( + ); + executableSystemSymbolLevel = 0; + executableUserSymbolLevel = 0; + libgmallocEnabled = 0; + name = HP16; + savedGlobals = { + }; + showTypeColumn = 0; + sourceDirectories = ( + ); + }; + BEA725BA0E783C02007330D2 /* Source Control */ = { + isa = PBXSourceControlManager; + fallbackIsa = XCSourceControlManager; + isSCMEnabled = 0; + scmConfiguration = { + repositoryNamesForRoots = { + "" = ""; + }; + }; + }; + BEA725BB0E783C02007330D2 /* Code sense */ = { + isa = PBXCodeSenseManager; + indexTemplatePath = ""; + }; + BEA727030E7841D7007330D2 /* hpcalc.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {954, 11494}}"; + sepNavSelRange = "{1462, 0}"; + sepNavVisRange = "{1123, 1623}"; + }; + }; + BEA727040E7841D7007330D2 /* DisplayView.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 7798}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 866}"; + }; + }; + BEA727050E7841D7007330D2 /* hpcalc.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 840}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 866}"; + }; + }; + BEA727060E7841D7007330D2 /* version-16c.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 434}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 866}"; + }; + }; + BEA727070E7841D7007330D2 /* DisplayView.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 672}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{0, 866}"; + }; + }; + BEA7271C0E78421B007330D2 /* HP16ViewController.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 1526}}"; + sepNavSelRange = "{310, 0}"; + sepNavVisRange = "{0, 377}"; + }; + }; + BEA7271D0E78421B007330D2 /* HP16AppDelegate.m */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {642, 1036}}"; + sepNavSelRange = "{1503, 0}"; + sepNavVisRange = "{0, 326}"; + }; + }; + BEA7271E0E78421B007330D2 /* HP16AppDelegate.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 476}}"; + sepNavSelRange = "{18, 0}"; + sepNavVisRange = "{0, 380}"; + }; + }; + BEA7271F0E78421B007330D2 /* HP16ViewController.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {590, 406}}"; + sepNavSelRange = "{186, 0}"; + sepNavVisRange = "{0, 318}"; + }; + }; + BEA727280E78425B007330D2 /* define_hp16.h */ = { + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {519, 253}}"; + sepNavSelRange = "{269, 0}"; + sepNavVisRange = "{0, 270}"; + }; + }; + BEA727910E78442D007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA727050E7841D7007330D2 /* hpcalc.h */; + name = "hpcalc.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 866; + vrLoc = 0; + }; + BEA727920E78442D007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA727040E7841D7007330D2 /* DisplayView.m */; + name = "DisplayView.m: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 866; + vrLoc = 0; + }; + BEA727930E78442D007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA727070E7841D7007330D2 /* DisplayView.h */; + name = "DisplayView.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 866; + vrLoc = 0; + }; + BEA727940E78442D007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA727280E78425B007330D2 /* define_hp16.h */; + name = "define_hp16.h: 14"; + rLen = 0; + rLoc = 269; + rType = 0; + vrLen = 270; + vrLoc = 0; + }; + BEA727950E78442D007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA727060E7841D7007330D2 /* version-16c.h */; + name = "version-16c.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 866; + vrLoc = 0; + }; + BEA727960E78442D007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA7271D0E78421B007330D2 /* HP16AppDelegate.m */; + name = "HP16AppDelegate.m: 67"; + rLen = 0; + rLoc = 1503; + rType = 0; + vrLen = 326; + vrLoc = 0; + }; + BEA727970E78442D007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA7271E0E78421B007330D2 /* HP16AppDelegate.h */; + name = "HP16AppDelegate.h: 2"; + rLen = 0; + rLoc = 18; + rType = 0; + vrLen = 380; + vrLoc = 0; + }; + BEA727980E78442D007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA7271C0E78421B007330D2 /* HP16ViewController.m */; + name = "HP16ViewController.m: 16"; + rLen = 0; + rLoc = 310; + rType = 0; + vrLen = 377; + vrLoc = 0; + }; + BEA728FD0E786A6B007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA7271F0E78421B007330D2 /* HP16ViewController.h */; + name = "HP16ViewController.h: 15"; + rLen = 0; + rLoc = 186; + rType = 0; + vrLen = 318; + vrLoc = 0; + }; + BEA728FE0E786A6B007330D2 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 29B97316FDCFA39411CA2CEA /* main.m */; + name = "main.m: 9"; + rLen = 0; + rLoc = 140; + rType = 0; + vrLen = 1094; + vrLoc = 0; + }; + BECA84740E81F7B8007B596D /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = BEA727030E7841D7007330D2 /* hpcalc.m */; + name = "hpcalc.m: 52"; + rLen = 0; + rLoc = 1462; + rType = 0; + vrLen = 1623; + vrLoc = 1123; + }; + BECA84750E81F7B8007B596D /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = BEA727240E784247007330D2 /* icon.png */; + }; + BECA84770E81F7B8007B596D /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = BEA728B70E785F18007330D2 /* 16c-background.png */; + }; + BECA84780E81F7B8007B596D /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = BEA727F80E7844AE007330D2 /* screenshot-15c.png */; + }; + BECA84790E81F7B8007B596D /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = BEA727F50E7844AE007330D2 /* rad.png */; + }; + BECA847A0E81F7B8007B596D /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = BEA727DF0E7844AE007330D2 /* Default-15c.png */; + }; + BEEBA94B13A4292900A96A2C /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D1107310486CEB800E47090 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleName, + ); + name = "/Users/ken/Rolltop/iPhone Programming/Projects/hpcalc/HP16/Info.plist"; + rLen = 0; + rLoc = 9223372036854775807; + }; + BEF117D912CFC9F40017A4E6 /* PlistBookmark */ = { + isa = PlistBookmark; + fRef = 8D1107310486CEB800E47090 /* Info.plist */; + fallbackIsa = PBXBookmark; + isK = 0; + kPath = ( + CFBundleName, + ); + name = "/Users/ken/Rolltop/iPhone Programming/Projects/hpcalc/HP16/Info.plist"; + rLen = 0; + rLoc = 9223372036854775808; + }; +} diff --git a/HP16.xcodeproj/project.pbxproj b/HP16.xcodeproj/project.pbxproj new file mode 100755 index 0000000..31b984c --- /dev/null +++ b/HP16.xcodeproj/project.pbxproj @@ -0,0 +1,988 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 55; + objects = { + +/* Begin PBXBuildFile section */ + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; }; + BE1F9AF4282D5D13005DAB7B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE1F9AF3282D5D13005DAB7B /* Default-568h@2x.png */; }; + BE1F9AF8282D6064005DAB7B /* icon-16c@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE1F9AF7282D6064005DAB7B /* icon-16c@2x.png */; }; + BE7E2C2B1A316B77006FFED4 /* FF@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C1B1A316B77006FFED4 /* FF@2x.png */; }; + BE7E2C2C1A316B77006FFED4 /* E@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C1C1A316B77006FFED4 /* E@2x.png */; }; + BE7E2C2D1A316B77006FFED4 /* d@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C1D1A316B77006FFED4 /* d@2x.png */; }; + BE7E2C2E1A316B77006FFED4 /* CC@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C1E1A316B77006FFED4 /* CC@2x.png */; }; + BE7E2C2F1A316B77006FFED4 /* b@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C1F1A316B77006FFED4 /* b@2x.png */; }; + BE7E2C301A316B77006FFED4 /* a@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C201A316B77006FFED4 /* a@2x.png */; }; + BE7E2C311A316B77006FFED4 /* 9@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C211A316B77006FFED4 /* 9@2x.png */; }; + BE7E2C321A316B77006FFED4 /* 8@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C221A316B77006FFED4 /* 8@2x.png */; }; + BE7E2C331A316B77006FFED4 /* 7@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C231A316B77006FFED4 /* 7@2x.png */; }; + BE7E2C341A316B77006FFED4 /* 6@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C241A316B77006FFED4 /* 6@2x.png */; }; + BE7E2C351A316B78006FFED4 /* 5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C251A316B77006FFED4 /* 5@2x.png */; }; + BE7E2C361A316B78006FFED4 /* 4@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C261A316B77006FFED4 /* 4@2x.png */; }; + BE7E2C371A316B78006FFED4 /* 3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C271A316B77006FFED4 /* 3@2x.png */; }; + BE7E2C381A316B78006FFED4 /* 2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C281A316B77006FFED4 /* 2@2x.png */; }; + BE7E2C391A316B78006FFED4 /* 1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C291A316B77006FFED4 /* 1@2x.png */; }; + BE7E2C3A1A316B78006FFED4 /* 0@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE7E2C2A1A316B77006FFED4 /* 0@2x.png */; }; + BE7E2C3B1A31734F006FFED4 /* ControllerView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BEA727220E784247007330D2 /* ControllerView.xib */; }; + BE86D42F1A32C1CE00E3D4A7 /* begin@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4161A32C1CE00E3D4A7 /* begin@2x.png */; }; + BE86D4301A32C1CE00E3D4A7 /* comma@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4171A32C1CE00E3D4A7 /* comma@2x.png */; }; + BE86D4311A32C1CE00E3D4A7 /* decimal@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4181A32C1CE00E3D4A7 /* decimal@2x.png */; }; + BE86D4321A32C1CE00E3D4A7 /* Default-16c@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4191A32C1CE00E3D4A7 /* Default-16c@2x.png */; }; + BE86D4331A32C1CE00E3D4A7 /* display-15c@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D41A1A32C1CE00E3D4A7 /* display-15c@2x.png */; }; + BE86D4341A32C1CE00E3D4A7 /* display-16c@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D41B1A32C1CE00E3D4A7 /* display-16c@2x.png */; }; + BE86D4351A32C1CE00E3D4A7 /* dmy@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D41C1A32C1CE00E3D4A7 /* dmy@2x.png */; }; + BE86D4361A32C1CE00E3D4A7 /* f@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D41D1A32C1CE00E3D4A7 /* f@2x.png */; }; + BE86D4371A32C1CE00E3D4A7 /* g@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D41E1A32C1CE00E3D4A7 /* g@2x.png */; }; + BE86D4381A32C1CE00E3D4A7 /* grad@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D41F1A32C1CE00E3D4A7 /* grad@2x.png */; }; + BE86D4391A32C1CE00E3D4A7 /* h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4201A32C1CE00E3D4A7 /* h@2x.png */; }; + BE86D43A1A32C1CE00E3D4A7 /* i@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4211A32C1CE00E3D4A7 /* i@2x.png */; }; + BE86D43B1A32C1CE00E3D4A7 /* keypad-15c@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4221A32C1CE00E3D4A7 /* keypad-15c@2x.png */; }; + BE86D43C1A32C1CE00E3D4A7 /* keypad-16c@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4231A32C1CE00E3D4A7 /* keypad-16c@2x.png */; }; + BE86D43D1A32C1CE00E3D4A7 /* n@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4241A32C1CE00E3D4A7 /* n@2x.png */; }; + BE86D43E1A32C1CE00E3D4A7 /* neg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4251A32C1CE00E3D4A7 /* neg@2x.png */; }; + BE86D43F1A32C1CE00E3D4A7 /* O@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4261A32C1CE00E3D4A7 /* O@2x.png */; }; + BE86D4401A32C1CE00E3D4A7 /* Default-15c@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4271A32C1CE00E3D4A7 /* Default-15c@2x.png */; }; + BE86D4411A32C1CE00E3D4A7 /* P@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4281A32C1CE00E3D4A7 /* P@2x.png */; }; + BE86D4421A32C1CE00E3D4A7 /* prgm@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4291A32C1CE00E3D4A7 /* prgm@2x.png */; }; + BE86D4431A32C1CE00E3D4A7 /* r@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D42A1A32C1CE00E3D4A7 /* r@2x.png */; }; + BE86D4441A32C1CE00E3D4A7 /* rad@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D42B1A32C1CE00E3D4A7 /* rad@2x.png */; }; + BE86D4451A32C1CE00E3D4A7 /* RR@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D42C1A32C1CE00E3D4A7 /* RR@2x.png */; }; + BE86D4461A32C1CE00E3D4A7 /* u@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D42D1A32C1CE00E3D4A7 /* u@2x.png */; }; + BE86D4471A32C1CE00E3D4A7 /* user@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D42E1A32C1CE00E3D4A7 /* user@2x.png */; }; + BE86D4491A32C5A700E3D4A7 /* c@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE86D4481A32C5A700E3D4A7 /* c@2x.png */; }; + BE952B9D0E786DEA00E648EB /* 16c.obj in Resources */ = {isa = PBXBuildFile; fileRef = BE952B9C0E786DEA00E648EB /* 16c.obj */; }; + BEA727000E784195007330D2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEA726FF0E784195007330D2 /* CoreGraphics.framework */; }; + BEA727020E7841A5007330D2 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BEA727010E7841A5007330D2 /* AudioToolbox.framework */; }; + BEA727150E7841D7007330D2 /* hpcalc.m in Sources */ = {isa = PBXBuildFile; fileRef = BEA727030E7841D7007330D2 /* hpcalc.m */; }; + BEA727160E7841D7007330D2 /* DisplayView.m in Sources */ = {isa = PBXBuildFile; fileRef = BEA727040E7841D7007330D2 /* DisplayView.m */; }; + BEA727170E7841D7007330D2 /* proc_nut.c in Sources */ = {isa = PBXBuildFile; fileRef = BEA7270A0E7841D7007330D2 /* proc_nut.c */; }; + BEA727180E7841D7007330D2 /* voyager_lcd.c in Sources */ = {isa = PBXBuildFile; fileRef = BEA7270B0E7841D7007330D2 /* voyager_lcd.c */; }; + BEA7271A0E7841D7007330D2 /* macutil.c in Sources */ = {isa = PBXBuildFile; fileRef = BEA727110E7841D7007330D2 /* macutil.c */; }; + BEA7271B0E7841D7007330D2 /* digit_ops.c in Sources */ = {isa = PBXBuildFile; fileRef = BEA727140E7841D7007330D2 /* digit_ops.c */; }; + BEA727200E78421B007330D2 /* HP16ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BEA7271C0E78421B007330D2 /* HP16ViewController.m */; }; + BEA727210E78421B007330D2 /* HP16AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BEA7271D0E78421B007330D2 /* HP16AppDelegate.m */; }; + BEA727260E784247007330D2 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727230E784247007330D2 /* Default.png */; }; + BEA727270E784247007330D2 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727240E784247007330D2 /* icon.png */; }; + BEA727FC0E7844AE007330D2 /* 0.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727C60E7844AE007330D2 /* 0.png */; }; + BEA727FD0E7844AE007330D2 /* 1.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727C70E7844AE007330D2 /* 1.png */; }; + BEA727FE0E7844AE007330D2 /* 2.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727C80E7844AE007330D2 /* 2.png */; }; + BEA727FF0E7844AE007330D2 /* 3.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727C90E7844AE007330D2 /* 3.png */; }; + BEA728000E7844AE007330D2 /* 4.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727CA0E7844AE007330D2 /* 4.png */; }; + BEA728010E7844AE007330D2 /* 5.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727CB0E7844AE007330D2 /* 5.png */; }; + BEA728020E7844AE007330D2 /* 6.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727CC0E7844AE007330D2 /* 6.png */; }; + BEA728030E7844AE007330D2 /* 7.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727CD0E7844AE007330D2 /* 7.png */; }; + BEA728040E7844AE007330D2 /* 8.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727CE0E7844AE007330D2 /* 8.png */; }; + BEA728050E7844AE007330D2 /* 9.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727CF0E7844AE007330D2 /* 9.png */; }; + BEA728060E7844AE007330D2 /* a.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D00E7844AE007330D2 /* a.png */; }; + BEA728070E7844AE007330D2 /* alertbg.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D10E7844AE007330D2 /* alertbg.png */; }; + BEA728080E7844AE007330D2 /* alertbg.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D20E7844AE007330D2 /* alertbg.psd */; }; + BEA728090E7844AE007330D2 /* alertbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D30E7844AE007330D2 /* alertbutton.png */; }; + BEA7280A0E7844AE007330D2 /* alertbutton.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D40E7844AE007330D2 /* alertbutton.psd */; }; + BEA7280B0E7844AE007330D2 /* alertbuttonpressed.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D50E7844AE007330D2 /* alertbuttonpressed.png */; }; + BEA7280C0E7844AE007330D2 /* annunciators.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D60E7844AE007330D2 /* annunciators.psd */; }; + BEA7280D0E7844AE007330D2 /* b.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D70E7844AE007330D2 /* b.png */; }; + BEA7280E0E7844AE007330D2 /* begin.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D80E7844AE007330D2 /* begin.png */; }; + BEA7280F0E7844AE007330D2 /* c.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727D90E7844AE007330D2 /* c.png */; }; + BEA728100E7844AE007330D2 /* CC.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727DA0E7844AE007330D2 /* CC.png */; }; + BEA728110E7844AE007330D2 /* charset.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727DB0E7844AE007330D2 /* charset.psd */; }; + BEA728120E7844AE007330D2 /* comma.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727DC0E7844AE007330D2 /* comma.png */; }; + BEA728130E7844AE007330D2 /* d.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727DD0E7844AE007330D2 /* d.png */; }; + BEA728140E7844AE007330D2 /* decimal.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727DE0E7844AE007330D2 /* decimal.png */; }; + BEA728150E7844AE007330D2 /* Default-15c.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727DF0E7844AE007330D2 /* Default-15c.png */; }; + BEA728160E7844AE007330D2 /* display-15c.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E00E7844AE007330D2 /* display-15c.png */; }; + BEA728170E7844AE007330D2 /* display.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E10E7844AE007330D2 /* display.psd */; }; + BEA728180E7844AE007330D2 /* dmy.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E20E7844AE007330D2 /* dmy.png */; }; + BEA728190E7844AE007330D2 /* E.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E30E7844AE007330D2 /* E.png */; }; + BEA7281A0E7844AE007330D2 /* f.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E40E7844AE007330D2 /* f.png */; }; + BEA7281B0E7844AE007330D2 /* FF.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E50E7844AE007330D2 /* FF.png */; }; + BEA7281C0E7844AE007330D2 /* g.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E60E7844AE007330D2 /* g.png */; }; + BEA7281D0E7844AE007330D2 /* grad.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E70E7844AE007330D2 /* grad.png */; }; + BEA7281E0E7844AE007330D2 /* h.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E80E7844AE007330D2 /* h.png */; }; + BEA7281F0E7844AE007330D2 /* i.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727E90E7844AE007330D2 /* i.png */; }; + BEA728210E7844AE007330D2 /* icon.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727EB0E7844AE007330D2 /* icon.psd */; }; + BEA728220E7844AE007330D2 /* keypad-15c.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727EC0E7844AE007330D2 /* keypad-15c.png */; }; + BEA728230E7844AE007330D2 /* keypad-15c.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727ED0E7844AE007330D2 /* keypad-15c.psd */; }; + BEA728240E7844AE007330D2 /* logo.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727EE0E7844AE007330D2 /* logo.psd */; }; + BEA728250E7844AE007330D2 /* n.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727EF0E7844AE007330D2 /* n.png */; }; + BEA728260E7844AE007330D2 /* neg.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F00E7844AE007330D2 /* neg.png */; }; + BEA728270E7844AE007330D2 /* O.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F10E7844AE007330D2 /* O.png */; }; + BEA728280E7844AE007330D2 /* P.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F20E7844AE007330D2 /* P.png */; }; + BEA728290E7844AE007330D2 /* prgm.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F30E7844AE007330D2 /* prgm.png */; }; + BEA7282A0E7844AE007330D2 /* r.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F40E7844AE007330D2 /* r.png */; }; + BEA7282B0E7844AE007330D2 /* rad.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F50E7844AE007330D2 /* rad.png */; }; + BEA7282C0E7844AE007330D2 /* rawlogo.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F60E7844AE007330D2 /* rawlogo.psd */; }; + BEA7282D0E7844AE007330D2 /* RR.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F70E7844AE007330D2 /* RR.png */; }; + BEA7282E0E7844AE007330D2 /* screenshot-15c.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F80E7844AE007330D2 /* screenshot-15c.png */; }; + BEA7282F0E7844AE007330D2 /* screenshots.psd in Resources */ = {isa = PBXBuildFile; fileRef = BEA727F90E7844AE007330D2 /* screenshots.psd */; }; + BEA728300E7844AE007330D2 /* u.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727FA0E7844AE007330D2 /* u.png */; }; + BEA728310E7844AE007330D2 /* user.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA727FB0E7844AE007330D2 /* user.png */; }; + BEA728B80E785F18007330D2 /* 16c-0-0.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728900E785F18007330D2 /* 16c-0-0.png */; }; + BEA728B90E785F18007330D2 /* 16c-0-1.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728910E785F18007330D2 /* 16c-0-1.png */; }; + BEA728BA0E785F18007330D2 /* 16c-0-2.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728920E785F18007330D2 /* 16c-0-2.png */; }; + BEA728BB0E785F18007330D2 /* 16c-0-3.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728930E785F18007330D2 /* 16c-0-3.png */; }; + BEA728BC0E785F18007330D2 /* 16c-0-4.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728940E785F18007330D2 /* 16c-0-4.png */; }; + BEA728BD0E785F18007330D2 /* 16c-0-5.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728950E785F18007330D2 /* 16c-0-5.png */; }; + BEA728BE0E785F18007330D2 /* 16c-0-6.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728960E785F18007330D2 /* 16c-0-6.png */; }; + BEA728BF0E785F18007330D2 /* 16c-0-7.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728970E785F18007330D2 /* 16c-0-7.png */; }; + BEA728C00E785F18007330D2 /* 16c-0-8.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728980E785F18007330D2 /* 16c-0-8.png */; }; + BEA728C10E785F18007330D2 /* 16c-0-9.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728990E785F18007330D2 /* 16c-0-9.png */; }; + BEA728C20E785F18007330D2 /* 16c-1-0.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA7289A0E785F18007330D2 /* 16c-1-0.png */; }; + BEA728C30E785F18007330D2 /* 16c-1-1.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA7289B0E785F18007330D2 /* 16c-1-1.png */; }; + BEA728C40E785F18007330D2 /* 16c-1-2.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA7289C0E785F18007330D2 /* 16c-1-2.png */; }; + BEA728C50E785F18007330D2 /* 16c-1-3.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA7289D0E785F18007330D2 /* 16c-1-3.png */; }; + BEA728C60E785F18007330D2 /* 16c-1-4.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA7289E0E785F18007330D2 /* 16c-1-4.png */; }; + BEA728C70E785F18007330D2 /* 16c-1-6.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA7289F0E785F18007330D2 /* 16c-1-6.png */; }; + BEA728C80E785F18007330D2 /* 16c-1-7.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A00E785F18007330D2 /* 16c-1-7.png */; }; + BEA728C90E785F18007330D2 /* 16c-1-8.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A10E785F18007330D2 /* 16c-1-8.png */; }; + BEA728CA0E785F18007330D2 /* 16c-1-9.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A20E785F18007330D2 /* 16c-1-9.png */; }; + BEA728CB0E785F18007330D2 /* 16c-2-0.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A30E785F18007330D2 /* 16c-2-0.png */; }; + BEA728CC0E785F18007330D2 /* 16c-2-1.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A40E785F18007330D2 /* 16c-2-1.png */; }; + BEA728CD0E785F18007330D2 /* 16c-2-2.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A50E785F18007330D2 /* 16c-2-2.png */; }; + BEA728CE0E785F18007330D2 /* 16c-2-3.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A60E785F18007330D2 /* 16c-2-3.png */; }; + BEA728CF0E785F18007330D2 /* 16c-2-4.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A70E785F18007330D2 /* 16c-2-4.png */; }; + BEA728D00E785F18007330D2 /* 16c-2-5.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A80E785F18007330D2 /* 16c-2-5.png */; }; + BEA728D10E785F18007330D2 /* 16c-2-6.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728A90E785F18007330D2 /* 16c-2-6.png */; }; + BEA728D20E785F18007330D2 /* 16c-2-7.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728AA0E785F18007330D2 /* 16c-2-7.png */; }; + BEA728D30E785F18007330D2 /* 16c-2-8.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728AB0E785F18007330D2 /* 16c-2-8.png */; }; + BEA728D40E785F18007330D2 /* 16c-2-9.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728AC0E785F18007330D2 /* 16c-2-9.png */; }; + BEA728D50E785F18007330D2 /* 16c-3-0.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728AD0E785F18007330D2 /* 16c-3-0.png */; }; + BEA728D60E785F18007330D2 /* 16c-3-1.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728AE0E785F18007330D2 /* 16c-3-1.png */; }; + BEA728D70E785F18007330D2 /* 16c-3-2.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728AF0E785F18007330D2 /* 16c-3-2.png */; }; + BEA728D80E785F18007330D2 /* 16c-3-3.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728B00E785F18007330D2 /* 16c-3-3.png */; }; + BEA728D90E785F18007330D2 /* 16c-3-4.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728B10E785F18007330D2 /* 16c-3-4.png */; }; + BEA728DA0E785F18007330D2 /* 16c-3-5.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728B20E785F18007330D2 /* 16c-3-5.png */; }; + BEA728DB0E785F18007330D2 /* 16c-3-6.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728B30E785F18007330D2 /* 16c-3-6.png */; }; + BEA728DC0E785F18007330D2 /* 16c-3-7.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728B40E785F18007330D2 /* 16c-3-7.png */; }; + BEA728DD0E785F18007330D2 /* 16c-3-8.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728B50E785F18007330D2 /* 16c-3-8.png */; }; + BEA728DE0E785F18007330D2 /* 16c-3-9.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728B60E785F18007330D2 /* 16c-3-9.png */; }; + BEA728DF0E785F18007330D2 /* 16c-background.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728B70E785F18007330D2 /* 16c-background.png */; }; + BEA728EF0E7869C0007330D2 /* icon-16c.png in Resources */ = {isa = PBXBuildFile; fileRef = BEA728EE0E7869C0007330D2 /* icon-16c.png */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D6058910D05DD3D006BFB54 /* HP16.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HP16.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../main.m; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* HP16_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HP16_Prefix.pch; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BE1F9AF3282D5D13005DAB7B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + BE1F9AF7282D6064005DAB7B /* icon-16c@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-16c@2x.png"; sourceTree = ""; }; + BE7E2C1B1A316B77006FFED4 /* FF@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "FF@2x.png"; sourceTree = ""; }; + BE7E2C1C1A316B77006FFED4 /* E@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "E@2x.png"; sourceTree = ""; }; + BE7E2C1D1A316B77006FFED4 /* d@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "d@2x.png"; sourceTree = ""; }; + BE7E2C1E1A316B77006FFED4 /* CC@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "CC@2x.png"; sourceTree = ""; }; + BE7E2C1F1A316B77006FFED4 /* b@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "b@2x.png"; sourceTree = ""; }; + BE7E2C201A316B77006FFED4 /* a@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "a@2x.png"; sourceTree = ""; }; + BE7E2C211A316B77006FFED4 /* 9@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "9@2x.png"; sourceTree = ""; }; + BE7E2C221A316B77006FFED4 /* 8@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "8@2x.png"; sourceTree = ""; }; + BE7E2C231A316B77006FFED4 /* 7@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "7@2x.png"; sourceTree = ""; }; + BE7E2C241A316B77006FFED4 /* 6@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "6@2x.png"; sourceTree = ""; }; + BE7E2C251A316B77006FFED4 /* 5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "5@2x.png"; sourceTree = ""; }; + BE7E2C261A316B77006FFED4 /* 4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "4@2x.png"; sourceTree = ""; }; + BE7E2C271A316B77006FFED4 /* 3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "3@2x.png"; sourceTree = ""; }; + BE7E2C281A316B77006FFED4 /* 2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "2@2x.png"; sourceTree = ""; }; + BE7E2C291A316B77006FFED4 /* 1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1@2x.png"; sourceTree = ""; }; + BE7E2C2A1A316B77006FFED4 /* 0@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "0@2x.png"; sourceTree = ""; }; + BE86D4161A32C1CE00E3D4A7 /* begin@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "begin@2x.png"; sourceTree = ""; }; + BE86D4171A32C1CE00E3D4A7 /* comma@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "comma@2x.png"; sourceTree = ""; }; + BE86D4181A32C1CE00E3D4A7 /* decimal@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "decimal@2x.png"; sourceTree = ""; }; + BE86D4191A32C1CE00E3D4A7 /* Default-16c@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-16c@2x.png"; sourceTree = ""; }; + BE86D41A1A32C1CE00E3D4A7 /* display-15c@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "display-15c@2x.png"; sourceTree = ""; }; + BE86D41B1A32C1CE00E3D4A7 /* display-16c@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "display-16c@2x.png"; sourceTree = ""; }; + BE86D41C1A32C1CE00E3D4A7 /* dmy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "dmy@2x.png"; sourceTree = ""; }; + BE86D41D1A32C1CE00E3D4A7 /* f@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "f@2x.png"; sourceTree = ""; }; + BE86D41E1A32C1CE00E3D4A7 /* g@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "g@2x.png"; sourceTree = ""; }; + BE86D41F1A32C1CE00E3D4A7 /* grad@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "grad@2x.png"; sourceTree = ""; }; + BE86D4201A32C1CE00E3D4A7 /* h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "h@2x.png"; sourceTree = ""; }; + BE86D4211A32C1CE00E3D4A7 /* i@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "i@2x.png"; sourceTree = ""; }; + BE86D4221A32C1CE00E3D4A7 /* keypad-15c@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "keypad-15c@2x.png"; sourceTree = ""; }; + BE86D4231A32C1CE00E3D4A7 /* keypad-16c@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "keypad-16c@2x.png"; sourceTree = ""; }; + BE86D4241A32C1CE00E3D4A7 /* n@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "n@2x.png"; sourceTree = ""; }; + BE86D4251A32C1CE00E3D4A7 /* neg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "neg@2x.png"; sourceTree = ""; }; + BE86D4261A32C1CE00E3D4A7 /* O@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "O@2x.png"; sourceTree = ""; }; + BE86D4271A32C1CE00E3D4A7 /* Default-15c@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-15c@2x.png"; sourceTree = ""; }; + BE86D4281A32C1CE00E3D4A7 /* P@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "P@2x.png"; sourceTree = ""; }; + BE86D4291A32C1CE00E3D4A7 /* prgm@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "prgm@2x.png"; sourceTree = ""; }; + BE86D42A1A32C1CE00E3D4A7 /* r@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "r@2x.png"; sourceTree = ""; }; + BE86D42B1A32C1CE00E3D4A7 /* rad@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "rad@2x.png"; sourceTree = ""; }; + BE86D42C1A32C1CE00E3D4A7 /* RR@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "RR@2x.png"; sourceTree = ""; }; + BE86D42D1A32C1CE00E3D4A7 /* u@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "u@2x.png"; sourceTree = ""; }; + BE86D42E1A32C1CE00E3D4A7 /* user@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "user@2x.png"; sourceTree = ""; }; + BE86D4481A32C5A700E3D4A7 /* c@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "c@2x.png"; sourceTree = ""; }; + BE952B8C0E786D0000E648EB /* keymacros-16c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "keymacros-16c.h"; path = "src/keymacros-16c.h"; sourceTree = ""; }; + BE952B9C0E786DEA00E648EB /* 16c.obj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = 16c.obj; sourceTree = ""; }; + BEA726FF0E784195007330D2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + BEA727010E7841A5007330D2 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + BEA727030E7841D7007330D2 /* hpcalc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = hpcalc.m; path = ../src/hpcalc.m; sourceTree = ""; }; + BEA727040E7841D7007330D2 /* DisplayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DisplayView.m; path = ../src/DisplayView.m; sourceTree = ""; }; + BEA727050E7841D7007330D2 /* hpcalc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = hpcalc.h; path = ../src/hpcalc.h; sourceTree = ""; }; + BEA727060E7841D7007330D2 /* version-16c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "version-16c.h"; path = "src/version-16c.h"; sourceTree = ""; }; + BEA727070E7841D7007330D2 /* DisplayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DisplayView.h; path = ../src/DisplayView.h; sourceTree = ""; }; + BEA727080E7841D7007330D2 /* keymacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = keymacros.h; path = src/keymacros.h; sourceTree = ""; }; + BEA7270A0E7841D7007330D2 /* proc_nut.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = proc_nut.c; path = src/proc_nut.c; sourceTree = ""; }; + BEA7270B0E7841D7007330D2 /* voyager_lcd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = voyager_lcd.c; path = src/voyager_lcd.c; sourceTree = ""; }; + BEA7270D0E7841D7007330D2 /* voyager_lcd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = voyager_lcd.h; path = src/voyager_lcd.h; sourceTree = ""; }; + BEA7270E0E7841D7007330D2 /* proc_nut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = proc_nut.h; path = src/proc_nut.h; sourceTree = ""; }; + BEA7270F0E7841D7007330D2 /* proc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = proc.h; path = src/proc.h; sourceTree = ""; }; + BEA727100E7841D7007330D2 /* macutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macutil.h; path = src/macutil.h; sourceTree = ""; }; + BEA727110E7841D7007330D2 /* macutil.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = macutil.c; path = src/macutil.c; sourceTree = ""; }; + BEA727120E7841D7007330D2 /* display.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = display.h; path = src/display.h; sourceTree = ""; }; + BEA727130E7841D7007330D2 /* digit_ops.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = digit_ops.h; path = src/digit_ops.h; sourceTree = ""; }; + BEA727140E7841D7007330D2 /* digit_ops.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = digit_ops.c; path = src/digit_ops.c; sourceTree = ""; }; + BEA7271C0E78421B007330D2 /* HP16ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HP16ViewController.m; sourceTree = ""; }; + BEA7271D0E78421B007330D2 /* HP16AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HP16AppDelegate.m; sourceTree = ""; }; + BEA7271E0E78421B007330D2 /* HP16AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HP16AppDelegate.h; sourceTree = ""; }; + BEA7271F0E78421B007330D2 /* HP16ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HP16ViewController.h; sourceTree = ""; }; + BEA727220E784247007330D2 /* ControllerView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ControllerView.xib; sourceTree = ""; }; + BEA727230E784247007330D2 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + BEA727240E784247007330D2 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = ""; }; + BEA727280E78425B007330D2 /* define_hp16.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = define_hp16.h; sourceTree = ""; }; + BEA727C60E7844AE007330D2 /* 0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 0.png; sourceTree = ""; }; + BEA727C70E7844AE007330D2 /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1.png; sourceTree = ""; }; + BEA727C80E7844AE007330D2 /* 2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2.png; sourceTree = ""; }; + BEA727C90E7844AE007330D2 /* 3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3.png; sourceTree = ""; }; + BEA727CA0E7844AE007330D2 /* 4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 4.png; sourceTree = ""; }; + BEA727CB0E7844AE007330D2 /* 5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 5.png; sourceTree = ""; }; + BEA727CC0E7844AE007330D2 /* 6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 6.png; sourceTree = ""; }; + BEA727CD0E7844AE007330D2 /* 7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 7.png; sourceTree = ""; }; + BEA727CE0E7844AE007330D2 /* 8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 8.png; sourceTree = ""; }; + BEA727CF0E7844AE007330D2 /* 9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 9.png; sourceTree = ""; }; + BEA727D00E7844AE007330D2 /* a.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = a.png; sourceTree = ""; }; + BEA727D10E7844AE007330D2 /* alertbg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = alertbg.png; sourceTree = ""; }; + BEA727D20E7844AE007330D2 /* alertbg.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = alertbg.psd; sourceTree = ""; }; + BEA727D30E7844AE007330D2 /* alertbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = alertbutton.png; sourceTree = ""; }; + BEA727D40E7844AE007330D2 /* alertbutton.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = alertbutton.psd; sourceTree = ""; }; + BEA727D50E7844AE007330D2 /* alertbuttonpressed.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = alertbuttonpressed.png; sourceTree = ""; }; + BEA727D60E7844AE007330D2 /* annunciators.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = annunciators.psd; sourceTree = ""; }; + BEA727D70E7844AE007330D2 /* b.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = b.png; sourceTree = ""; }; + BEA727D80E7844AE007330D2 /* begin.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = begin.png; sourceTree = ""; }; + BEA727D90E7844AE007330D2 /* c.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = c.png; sourceTree = ""; }; + BEA727DA0E7844AE007330D2 /* CC.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = CC.png; sourceTree = ""; }; + BEA727DB0E7844AE007330D2 /* charset.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = charset.psd; sourceTree = ""; }; + BEA727DC0E7844AE007330D2 /* comma.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = comma.png; sourceTree = ""; }; + BEA727DD0E7844AE007330D2 /* d.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = d.png; sourceTree = ""; }; + BEA727DE0E7844AE007330D2 /* decimal.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = decimal.png; sourceTree = ""; }; + BEA727DF0E7844AE007330D2 /* Default-15c.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-15c.png"; sourceTree = ""; }; + BEA727E00E7844AE007330D2 /* display-15c.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "display-15c.png"; sourceTree = ""; }; + BEA727E10E7844AE007330D2 /* display.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = display.psd; sourceTree = ""; }; + BEA727E20E7844AE007330D2 /* dmy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dmy.png; sourceTree = ""; }; + BEA727E30E7844AE007330D2 /* E.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = E.png; sourceTree = ""; }; + BEA727E40E7844AE007330D2 /* f.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = f.png; sourceTree = ""; }; + BEA727E50E7844AE007330D2 /* FF.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = FF.png; sourceTree = ""; }; + BEA727E60E7844AE007330D2 /* g.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = g.png; sourceTree = ""; }; + BEA727E70E7844AE007330D2 /* grad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = grad.png; sourceTree = ""; }; + BEA727E80E7844AE007330D2 /* h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = h.png; sourceTree = ""; }; + BEA727E90E7844AE007330D2 /* i.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = i.png; sourceTree = ""; }; + BEA727EB0E7844AE007330D2 /* icon.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = icon.psd; sourceTree = ""; }; + BEA727EC0E7844AE007330D2 /* keypad-15c.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "keypad-15c.png"; sourceTree = ""; }; + BEA727ED0E7844AE007330D2 /* keypad-15c.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = "keypad-15c.psd"; sourceTree = ""; }; + BEA727EE0E7844AE007330D2 /* logo.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = logo.psd; sourceTree = ""; }; + BEA727EF0E7844AE007330D2 /* n.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = n.png; sourceTree = ""; }; + BEA727F00E7844AE007330D2 /* neg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = neg.png; sourceTree = ""; }; + BEA727F10E7844AE007330D2 /* O.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = O.png; sourceTree = ""; }; + BEA727F20E7844AE007330D2 /* P.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = P.png; sourceTree = ""; }; + BEA727F30E7844AE007330D2 /* prgm.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = prgm.png; sourceTree = ""; }; + BEA727F40E7844AE007330D2 /* r.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = r.png; sourceTree = ""; }; + BEA727F50E7844AE007330D2 /* rad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rad.png; sourceTree = ""; }; + BEA727F60E7844AE007330D2 /* rawlogo.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = rawlogo.psd; sourceTree = ""; }; + BEA727F70E7844AE007330D2 /* RR.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = RR.png; sourceTree = ""; }; + BEA727F80E7844AE007330D2 /* screenshot-15c.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "screenshot-15c.png"; sourceTree = ""; }; + BEA727F90E7844AE007330D2 /* screenshots.psd */ = {isa = PBXFileReference; lastKnownFileType = file; path = screenshots.psd; sourceTree = ""; }; + BEA727FA0E7844AE007330D2 /* u.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = u.png; sourceTree = ""; }; + BEA727FB0E7844AE007330D2 /* user.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = user.png; sourceTree = ""; }; + BEA728900E785F18007330D2 /* 16c-0-0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-0.png"; sourceTree = ""; }; + BEA728910E785F18007330D2 /* 16c-0-1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-1.png"; sourceTree = ""; }; + BEA728920E785F18007330D2 /* 16c-0-2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-2.png"; sourceTree = ""; }; + BEA728930E785F18007330D2 /* 16c-0-3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-3.png"; sourceTree = ""; }; + BEA728940E785F18007330D2 /* 16c-0-4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-4.png"; sourceTree = ""; }; + BEA728950E785F18007330D2 /* 16c-0-5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-5.png"; sourceTree = ""; }; + BEA728960E785F18007330D2 /* 16c-0-6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-6.png"; sourceTree = ""; }; + BEA728970E785F18007330D2 /* 16c-0-7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-7.png"; sourceTree = ""; }; + BEA728980E785F18007330D2 /* 16c-0-8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-8.png"; sourceTree = ""; }; + BEA728990E785F18007330D2 /* 16c-0-9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-0-9.png"; sourceTree = ""; }; + BEA7289A0E785F18007330D2 /* 16c-1-0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-0.png"; sourceTree = ""; }; + BEA7289B0E785F18007330D2 /* 16c-1-1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-1.png"; sourceTree = ""; }; + BEA7289C0E785F18007330D2 /* 16c-1-2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-2.png"; sourceTree = ""; }; + BEA7289D0E785F18007330D2 /* 16c-1-3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-3.png"; sourceTree = ""; }; + BEA7289E0E785F18007330D2 /* 16c-1-4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-4.png"; sourceTree = ""; }; + BEA7289F0E785F18007330D2 /* 16c-1-6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-6.png"; sourceTree = ""; }; + BEA728A00E785F18007330D2 /* 16c-1-7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-7.png"; sourceTree = ""; }; + BEA728A10E785F18007330D2 /* 16c-1-8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-8.png"; sourceTree = ""; }; + BEA728A20E785F18007330D2 /* 16c-1-9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-1-9.png"; sourceTree = ""; }; + BEA728A30E785F18007330D2 /* 16c-2-0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-0.png"; sourceTree = ""; }; + BEA728A40E785F18007330D2 /* 16c-2-1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-1.png"; sourceTree = ""; }; + BEA728A50E785F18007330D2 /* 16c-2-2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-2.png"; sourceTree = ""; }; + BEA728A60E785F18007330D2 /* 16c-2-3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-3.png"; sourceTree = ""; }; + BEA728A70E785F18007330D2 /* 16c-2-4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-4.png"; sourceTree = ""; }; + BEA728A80E785F18007330D2 /* 16c-2-5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-5.png"; sourceTree = ""; }; + BEA728A90E785F18007330D2 /* 16c-2-6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-6.png"; sourceTree = ""; }; + BEA728AA0E785F18007330D2 /* 16c-2-7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-7.png"; sourceTree = ""; }; + BEA728AB0E785F18007330D2 /* 16c-2-8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-8.png"; sourceTree = ""; }; + BEA728AC0E785F18007330D2 /* 16c-2-9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-2-9.png"; sourceTree = ""; }; + BEA728AD0E785F18007330D2 /* 16c-3-0.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-0.png"; sourceTree = ""; }; + BEA728AE0E785F18007330D2 /* 16c-3-1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-1.png"; sourceTree = ""; }; + BEA728AF0E785F18007330D2 /* 16c-3-2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-2.png"; sourceTree = ""; }; + BEA728B00E785F18007330D2 /* 16c-3-3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-3.png"; sourceTree = ""; }; + BEA728B10E785F18007330D2 /* 16c-3-4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-4.png"; sourceTree = ""; }; + BEA728B20E785F18007330D2 /* 16c-3-5.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-5.png"; sourceTree = ""; }; + BEA728B30E785F18007330D2 /* 16c-3-6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-6.png"; sourceTree = ""; }; + BEA728B40E785F18007330D2 /* 16c-3-7.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-7.png"; sourceTree = ""; }; + BEA728B50E785F18007330D2 /* 16c-3-8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-8.png"; sourceTree = ""; }; + BEA728B60E785F18007330D2 /* 16c-3-9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-3-9.png"; sourceTree = ""; }; + BEA728B70E785F18007330D2 /* 16c-background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "16c-background.png"; sourceTree = ""; }; + BEA728EE0E7869C0007330D2 /* icon-16c.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-16c.png"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + BEA727000E784195007330D2 /* CoreGraphics.framework in Frameworks */, + BEA727020E7841A5007330D2 /* AudioToolbox.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + BEA7271F0E78421B007330D2 /* HP16ViewController.h */, + BEA7271C0E78421B007330D2 /* HP16ViewController.m */, + BEA7271E0E78421B007330D2 /* HP16AppDelegate.h */, + BEA7271D0E78421B007330D2 /* HP16AppDelegate.m */, + BEA727070E7841D7007330D2 /* DisplayView.h */, + BEA727040E7841D7007330D2 /* DisplayView.m */, + BEA727050E7841D7007330D2 /* hpcalc.h */, + BEA727030E7841D7007330D2 /* hpcalc.m */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + path = Classes; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* HP16.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + BE5517971D511DF000888E2E /* build */, + BEA7288F0E785F18007330D2 /* 16c */, + BEA727C50E7844AE007330D2 /* img */, + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + BEA727280E78425B007330D2 /* define_hp16.h */, + BEA727060E7841D7007330D2 /* version-16c.h */, + BEA727080E7841D7007330D2 /* keymacros.h */, + BE952B8C0E786D0000E648EB /* keymacros-16c.h */, + BEA7270D0E7841D7007330D2 /* voyager_lcd.h */, + BEA7270B0E7841D7007330D2 /* voyager_lcd.c */, + BEA7270E0E7841D7007330D2 /* proc_nut.h */, + BEA7270A0E7841D7007330D2 /* proc_nut.c */, + BEA7270F0E7841D7007330D2 /* proc.h */, + BEA727100E7841D7007330D2 /* macutil.h */, + BEA727110E7841D7007330D2 /* macutil.c */, + BEA727120E7841D7007330D2 /* display.h */, + BEA727130E7841D7007330D2 /* digit_ops.h */, + BEA727140E7841D7007330D2 /* digit_ops.c */, + 32CA4F630368D1EE00C91783 /* HP16_Prefix.pch */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + BE1F9AF3282D5D13005DAB7B /* Default-568h@2x.png */, + BE952B9C0E786DEA00E648EB /* 16c.obj */, + 28AD733E0D9D9553002E5188 /* MainWindow.xib */, + BEA727220E784247007330D2 /* ControllerView.xib */, + BEA727230E784247007330D2 /* Default.png */, + BEA727240E784247007330D2 /* icon.png */, + 8D1107310486CEB800E47090 /* Info.plist */, + ); + name = Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + BEA727010E7841A5007330D2 /* AudioToolbox.framework */, + BEA726FF0E784195007330D2 /* CoreGraphics.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + BE5517971D511DF000888E2E /* build */ = { + isa = PBXGroup; + children = ( + ); + name = build; + sourceTree = ""; + }; + BEA727C50E7844AE007330D2 /* img */ = { + isa = PBXGroup; + children = ( + BE86D4481A32C5A700E3D4A7 /* c@2x.png */, + BE86D4161A32C1CE00E3D4A7 /* begin@2x.png */, + BE86D4171A32C1CE00E3D4A7 /* comma@2x.png */, + BE86D4181A32C1CE00E3D4A7 /* decimal@2x.png */, + BE86D4191A32C1CE00E3D4A7 /* Default-16c@2x.png */, + BE86D41A1A32C1CE00E3D4A7 /* display-15c@2x.png */, + BE86D41B1A32C1CE00E3D4A7 /* display-16c@2x.png */, + BE86D41C1A32C1CE00E3D4A7 /* dmy@2x.png */, + BE86D41D1A32C1CE00E3D4A7 /* f@2x.png */, + BE86D41E1A32C1CE00E3D4A7 /* g@2x.png */, + BE86D41F1A32C1CE00E3D4A7 /* grad@2x.png */, + BE86D4201A32C1CE00E3D4A7 /* h@2x.png */, + BE86D4211A32C1CE00E3D4A7 /* i@2x.png */, + BE86D4221A32C1CE00E3D4A7 /* keypad-15c@2x.png */, + BE86D4231A32C1CE00E3D4A7 /* keypad-16c@2x.png */, + BE86D4241A32C1CE00E3D4A7 /* n@2x.png */, + BE86D4251A32C1CE00E3D4A7 /* neg@2x.png */, + BE86D4261A32C1CE00E3D4A7 /* O@2x.png */, + BE86D4271A32C1CE00E3D4A7 /* Default-15c@2x.png */, + BE86D4281A32C1CE00E3D4A7 /* P@2x.png */, + BE86D4291A32C1CE00E3D4A7 /* prgm@2x.png */, + BE86D42A1A32C1CE00E3D4A7 /* r@2x.png */, + BE86D42B1A32C1CE00E3D4A7 /* rad@2x.png */, + BE86D42C1A32C1CE00E3D4A7 /* RR@2x.png */, + BE86D42D1A32C1CE00E3D4A7 /* u@2x.png */, + BE86D42E1A32C1CE00E3D4A7 /* user@2x.png */, + BE7E2C1B1A316B77006FFED4 /* FF@2x.png */, + BE7E2C1C1A316B77006FFED4 /* E@2x.png */, + BE7E2C1D1A316B77006FFED4 /* d@2x.png */, + BE7E2C1E1A316B77006FFED4 /* CC@2x.png */, + BE7E2C1F1A316B77006FFED4 /* b@2x.png */, + BE7E2C201A316B77006FFED4 /* a@2x.png */, + BE7E2C211A316B77006FFED4 /* 9@2x.png */, + BE7E2C221A316B77006FFED4 /* 8@2x.png */, + BE7E2C231A316B77006FFED4 /* 7@2x.png */, + BE7E2C241A316B77006FFED4 /* 6@2x.png */, + BE7E2C251A316B77006FFED4 /* 5@2x.png */, + BE7E2C261A316B77006FFED4 /* 4@2x.png */, + BE7E2C271A316B77006FFED4 /* 3@2x.png */, + BE7E2C281A316B77006FFED4 /* 2@2x.png */, + BE7E2C291A316B77006FFED4 /* 1@2x.png */, + BE7E2C2A1A316B77006FFED4 /* 0@2x.png */, + BE1F9AF7282D6064005DAB7B /* icon-16c@2x.png */, + BEA728EE0E7869C0007330D2 /* icon-16c.png */, + BEA727C60E7844AE007330D2 /* 0.png */, + BEA727C70E7844AE007330D2 /* 1.png */, + BEA727C80E7844AE007330D2 /* 2.png */, + BEA727C90E7844AE007330D2 /* 3.png */, + BEA727CA0E7844AE007330D2 /* 4.png */, + BEA727CB0E7844AE007330D2 /* 5.png */, + BEA727CC0E7844AE007330D2 /* 6.png */, + BEA727CD0E7844AE007330D2 /* 7.png */, + BEA727CE0E7844AE007330D2 /* 8.png */, + BEA727CF0E7844AE007330D2 /* 9.png */, + BEA727D00E7844AE007330D2 /* a.png */, + BEA727D10E7844AE007330D2 /* alertbg.png */, + BEA727D20E7844AE007330D2 /* alertbg.psd */, + BEA727D30E7844AE007330D2 /* alertbutton.png */, + BEA727D40E7844AE007330D2 /* alertbutton.psd */, + BEA727D50E7844AE007330D2 /* alertbuttonpressed.png */, + BEA727D60E7844AE007330D2 /* annunciators.psd */, + BEA727D70E7844AE007330D2 /* b.png */, + BEA727D80E7844AE007330D2 /* begin.png */, + BEA727D90E7844AE007330D2 /* c.png */, + BEA727DA0E7844AE007330D2 /* CC.png */, + BEA727DB0E7844AE007330D2 /* charset.psd */, + BEA727DC0E7844AE007330D2 /* comma.png */, + BEA727DD0E7844AE007330D2 /* d.png */, + BEA727DE0E7844AE007330D2 /* decimal.png */, + BEA727DF0E7844AE007330D2 /* Default-15c.png */, + BEA727E00E7844AE007330D2 /* display-15c.png */, + BEA727E10E7844AE007330D2 /* display.psd */, + BEA727E20E7844AE007330D2 /* dmy.png */, + BEA727E30E7844AE007330D2 /* E.png */, + BEA727E40E7844AE007330D2 /* f.png */, + BEA727E50E7844AE007330D2 /* FF.png */, + BEA727E60E7844AE007330D2 /* g.png */, + BEA727E70E7844AE007330D2 /* grad.png */, + BEA727E80E7844AE007330D2 /* h.png */, + BEA727E90E7844AE007330D2 /* i.png */, + BEA727EB0E7844AE007330D2 /* icon.psd */, + BEA727EC0E7844AE007330D2 /* keypad-15c.png */, + BEA727ED0E7844AE007330D2 /* keypad-15c.psd */, + BEA727EE0E7844AE007330D2 /* logo.psd */, + BEA727EF0E7844AE007330D2 /* n.png */, + BEA727F00E7844AE007330D2 /* neg.png */, + BEA727F10E7844AE007330D2 /* O.png */, + BEA727F20E7844AE007330D2 /* P.png */, + BEA727F30E7844AE007330D2 /* prgm.png */, + BEA727F40E7844AE007330D2 /* r.png */, + BEA727F50E7844AE007330D2 /* rad.png */, + BEA727F60E7844AE007330D2 /* rawlogo.psd */, + BEA727F70E7844AE007330D2 /* RR.png */, + BEA727F80E7844AE007330D2 /* screenshot-15c.png */, + BEA727F90E7844AE007330D2 /* screenshots.psd */, + BEA727FA0E7844AE007330D2 /* u.png */, + BEA727FB0E7844AE007330D2 /* user.png */, + ); + path = img; + sourceTree = ""; + }; + BEA7288F0E785F18007330D2 /* 16c */ = { + isa = PBXGroup; + children = ( + BEA728900E785F18007330D2 /* 16c-0-0.png */, + BEA728910E785F18007330D2 /* 16c-0-1.png */, + BEA728920E785F18007330D2 /* 16c-0-2.png */, + BEA728930E785F18007330D2 /* 16c-0-3.png */, + BEA728940E785F18007330D2 /* 16c-0-4.png */, + BEA728950E785F18007330D2 /* 16c-0-5.png */, + BEA728960E785F18007330D2 /* 16c-0-6.png */, + BEA728970E785F18007330D2 /* 16c-0-7.png */, + BEA728980E785F18007330D2 /* 16c-0-8.png */, + BEA728990E785F18007330D2 /* 16c-0-9.png */, + BEA7289A0E785F18007330D2 /* 16c-1-0.png */, + BEA7289B0E785F18007330D2 /* 16c-1-1.png */, + BEA7289C0E785F18007330D2 /* 16c-1-2.png */, + BEA7289D0E785F18007330D2 /* 16c-1-3.png */, + BEA7289E0E785F18007330D2 /* 16c-1-4.png */, + BEA7289F0E785F18007330D2 /* 16c-1-6.png */, + BEA728A00E785F18007330D2 /* 16c-1-7.png */, + BEA728A10E785F18007330D2 /* 16c-1-8.png */, + BEA728A20E785F18007330D2 /* 16c-1-9.png */, + BEA728A30E785F18007330D2 /* 16c-2-0.png */, + BEA728A40E785F18007330D2 /* 16c-2-1.png */, + BEA728A50E785F18007330D2 /* 16c-2-2.png */, + BEA728A60E785F18007330D2 /* 16c-2-3.png */, + BEA728A70E785F18007330D2 /* 16c-2-4.png */, + BEA728A80E785F18007330D2 /* 16c-2-5.png */, + BEA728A90E785F18007330D2 /* 16c-2-6.png */, + BEA728AA0E785F18007330D2 /* 16c-2-7.png */, + BEA728AB0E785F18007330D2 /* 16c-2-8.png */, + BEA728AC0E785F18007330D2 /* 16c-2-9.png */, + BEA728AD0E785F18007330D2 /* 16c-3-0.png */, + BEA728AE0E785F18007330D2 /* 16c-3-1.png */, + BEA728AF0E785F18007330D2 /* 16c-3-2.png */, + BEA728B00E785F18007330D2 /* 16c-3-3.png */, + BEA728B10E785F18007330D2 /* 16c-3-4.png */, + BEA728B20E785F18007330D2 /* 16c-3-5.png */, + BEA728B30E785F18007330D2 /* 16c-3-6.png */, + BEA728B40E785F18007330D2 /* 16c-3-7.png */, + BEA728B50E785F18007330D2 /* 16c-3-8.png */, + BEA728B60E785F18007330D2 /* 16c-3-9.png */, + BEA728B70E785F18007330D2 /* 16c-background.png */, + ); + path = 16c; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* HP16 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HP16" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = HP16; + productName = HP16; + productReference = 1D6058910D05DD3D006BFB54 /* HP16.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1520; + ORGANIZATIONNAME = ihatewaiting.net; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HP16" */; + compatibilityVersion = "Xcode 13.0"; + developmentRegion = en; + hasScannedForEncodings = 1; + knownRegions = ( + de, + Base, + en, + ja, + fr, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* HP16 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + BE7E2C311A316B77006FFED4 /* 9@2x.png in Resources */, + 28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */, + BEA727260E784247007330D2 /* Default.png in Resources */, + BEA727270E784247007330D2 /* icon.png in Resources */, + BE86D4401A32C1CE00E3D4A7 /* Default-15c@2x.png in Resources */, + BEA727FC0E7844AE007330D2 /* 0.png in Resources */, + BE86D4471A32C1CE00E3D4A7 /* user@2x.png in Resources */, + BEA727FD0E7844AE007330D2 /* 1.png in Resources */, + BE7E2C341A316B77006FFED4 /* 6@2x.png in Resources */, + BE1F9AF4282D5D13005DAB7B /* Default-568h@2x.png in Resources */, + BEA727FE0E7844AE007330D2 /* 2.png in Resources */, + BEA727FF0E7844AE007330D2 /* 3.png in Resources */, + BEA728000E7844AE007330D2 /* 4.png in Resources */, + BEA728010E7844AE007330D2 /* 5.png in Resources */, + BEA728020E7844AE007330D2 /* 6.png in Resources */, + BE7E2C2F1A316B77006FFED4 /* b@2x.png in Resources */, + BEA728030E7844AE007330D2 /* 7.png in Resources */, + BEA728040E7844AE007330D2 /* 8.png in Resources */, + BEA728050E7844AE007330D2 /* 9.png in Resources */, + BE7E2C2D1A316B77006FFED4 /* d@2x.png in Resources */, + BEA728060E7844AE007330D2 /* a.png in Resources */, + BEA728070E7844AE007330D2 /* alertbg.png in Resources */, + BEA728080E7844AE007330D2 /* alertbg.psd in Resources */, + BEA728090E7844AE007330D2 /* alertbutton.png in Resources */, + BEA7280A0E7844AE007330D2 /* alertbutton.psd in Resources */, + BEA7280B0E7844AE007330D2 /* alertbuttonpressed.png in Resources */, + BE7E2C351A316B78006FFED4 /* 5@2x.png in Resources */, + BEA7280C0E7844AE007330D2 /* annunciators.psd in Resources */, + BE86D4461A32C1CE00E3D4A7 /* u@2x.png in Resources */, + BE86D43E1A32C1CE00E3D4A7 /* neg@2x.png in Resources */, + BE86D4411A32C1CE00E3D4A7 /* P@2x.png in Resources */, + BEA7280D0E7844AE007330D2 /* b.png in Resources */, + BEA7280E0E7844AE007330D2 /* begin.png in Resources */, + BEA7280F0E7844AE007330D2 /* c.png in Resources */, + BEA728100E7844AE007330D2 /* CC.png in Resources */, + BEA728110E7844AE007330D2 /* charset.psd in Resources */, + BEA728120E7844AE007330D2 /* comma.png in Resources */, + BE86D4391A32C1CE00E3D4A7 /* h@2x.png in Resources */, + BE7E2C331A316B77006FFED4 /* 7@2x.png in Resources */, + BEA728130E7844AE007330D2 /* d.png in Resources */, + BE86D43D1A32C1CE00E3D4A7 /* n@2x.png in Resources */, + BEA728140E7844AE007330D2 /* decimal.png in Resources */, + BEA728150E7844AE007330D2 /* Default-15c.png in Resources */, + BEA728160E7844AE007330D2 /* display-15c.png in Resources */, + BEA728170E7844AE007330D2 /* display.psd in Resources */, + BEA728180E7844AE007330D2 /* dmy.png in Resources */, + BEA728190E7844AE007330D2 /* E.png in Resources */, + BEA7281A0E7844AE007330D2 /* f.png in Resources */, + BEA7281B0E7844AE007330D2 /* FF.png in Resources */, + BEA7281C0E7844AE007330D2 /* g.png in Resources */, + BEA7281D0E7844AE007330D2 /* grad.png in Resources */, + BEA7281E0E7844AE007330D2 /* h.png in Resources */, + BEA7281F0E7844AE007330D2 /* i.png in Resources */, + BEA728210E7844AE007330D2 /* icon.psd in Resources */, + BE86D42F1A32C1CE00E3D4A7 /* begin@2x.png in Resources */, + BE86D4361A32C1CE00E3D4A7 /* f@2x.png in Resources */, + BEA728220E7844AE007330D2 /* keypad-15c.png in Resources */, + BEA728230E7844AE007330D2 /* keypad-15c.psd in Resources */, + BEA728240E7844AE007330D2 /* logo.psd in Resources */, + BEA728250E7844AE007330D2 /* n.png in Resources */, + BE86D4321A32C1CE00E3D4A7 /* Default-16c@2x.png in Resources */, + BEA728260E7844AE007330D2 /* neg.png in Resources */, + BEA728270E7844AE007330D2 /* O.png in Resources */, + BE86D4441A32C1CE00E3D4A7 /* rad@2x.png in Resources */, + BEA728280E7844AE007330D2 /* P.png in Resources */, + BE7E2C2C1A316B77006FFED4 /* E@2x.png in Resources */, + BEA728290E7844AE007330D2 /* prgm.png in Resources */, + BEA7282A0E7844AE007330D2 /* r.png in Resources */, + BE7E2C361A316B78006FFED4 /* 4@2x.png in Resources */, + BEA7282B0E7844AE007330D2 /* rad.png in Resources */, + BEA7282C0E7844AE007330D2 /* rawlogo.psd in Resources */, + BEA7282D0E7844AE007330D2 /* RR.png in Resources */, + BEA7282E0E7844AE007330D2 /* screenshot-15c.png in Resources */, + BEA7282F0E7844AE007330D2 /* screenshots.psd in Resources */, + BEA728300E7844AE007330D2 /* u.png in Resources */, + BEA728310E7844AE007330D2 /* user.png in Resources */, + BEA728B80E785F18007330D2 /* 16c-0-0.png in Resources */, + BEA728B90E785F18007330D2 /* 16c-0-1.png in Resources */, + BEA728BA0E785F18007330D2 /* 16c-0-2.png in Resources */, + BEA728BB0E785F18007330D2 /* 16c-0-3.png in Resources */, + BEA728BC0E785F18007330D2 /* 16c-0-4.png in Resources */, + BEA728BD0E785F18007330D2 /* 16c-0-5.png in Resources */, + BE7E2C301A316B77006FFED4 /* a@2x.png in Resources */, + BEA728BE0E785F18007330D2 /* 16c-0-6.png in Resources */, + BE86D4451A32C1CE00E3D4A7 /* RR@2x.png in Resources */, + BE86D4491A32C5A700E3D4A7 /* c@2x.png in Resources */, + BEA728BF0E785F18007330D2 /* 16c-0-7.png in Resources */, + BEA728C00E785F18007330D2 /* 16c-0-8.png in Resources */, + BE86D43A1A32C1CE00E3D4A7 /* i@2x.png in Resources */, + BEA728C10E785F18007330D2 /* 16c-0-9.png in Resources */, + BE86D43B1A32C1CE00E3D4A7 /* keypad-15c@2x.png in Resources */, + BEA728C20E785F18007330D2 /* 16c-1-0.png in Resources */, + BE7E2C391A316B78006FFED4 /* 1@2x.png in Resources */, + BEA728C30E785F18007330D2 /* 16c-1-1.png in Resources */, + BEA728C40E785F18007330D2 /* 16c-1-2.png in Resources */, + BE7E2C2B1A316B77006FFED4 /* FF@2x.png in Resources */, + BEA728C50E785F18007330D2 /* 16c-1-3.png in Resources */, + BE86D4381A32C1CE00E3D4A7 /* grad@2x.png in Resources */, + BEA728C60E785F18007330D2 /* 16c-1-4.png in Resources */, + BEA728C70E785F18007330D2 /* 16c-1-6.png in Resources */, + BE86D4351A32C1CE00E3D4A7 /* dmy@2x.png in Resources */, + BEA728C80E785F18007330D2 /* 16c-1-7.png in Resources */, + BE7E2C321A316B77006FFED4 /* 8@2x.png in Resources */, + BE86D4311A32C1CE00E3D4A7 /* decimal@2x.png in Resources */, + BEA728C90E785F18007330D2 /* 16c-1-8.png in Resources */, + BE86D4331A32C1CE00E3D4A7 /* display-15c@2x.png in Resources */, + BEA728CA0E785F18007330D2 /* 16c-1-9.png in Resources */, + BE7E2C3A1A316B78006FFED4 /* 0@2x.png in Resources */, + BE1F9AF8282D6064005DAB7B /* icon-16c@2x.png in Resources */, + BEA728CB0E785F18007330D2 /* 16c-2-0.png in Resources */, + BEA728CC0E785F18007330D2 /* 16c-2-1.png in Resources */, + BEA728CD0E785F18007330D2 /* 16c-2-2.png in Resources */, + BE86D4341A32C1CE00E3D4A7 /* display-16c@2x.png in Resources */, + BEA728CE0E785F18007330D2 /* 16c-2-3.png in Resources */, + BE7E2C2E1A316B77006FFED4 /* CC@2x.png in Resources */, + BE7E2C3B1A31734F006FFED4 /* ControllerView.xib in Resources */, + BE86D4431A32C1CE00E3D4A7 /* r@2x.png in Resources */, + BEA728CF0E785F18007330D2 /* 16c-2-4.png in Resources */, + BEA728D00E785F18007330D2 /* 16c-2-5.png in Resources */, + BEA728D10E785F18007330D2 /* 16c-2-6.png in Resources */, + BEA728D20E785F18007330D2 /* 16c-2-7.png in Resources */, + BE86D4301A32C1CE00E3D4A7 /* comma@2x.png in Resources */, + BEA728D30E785F18007330D2 /* 16c-2-8.png in Resources */, + BEA728D40E785F18007330D2 /* 16c-2-9.png in Resources */, + BEA728D50E785F18007330D2 /* 16c-3-0.png in Resources */, + BEA728D60E785F18007330D2 /* 16c-3-1.png in Resources */, + BEA728D70E785F18007330D2 /* 16c-3-2.png in Resources */, + BE7E2C371A316B78006FFED4 /* 3@2x.png in Resources */, + BEA728D80E785F18007330D2 /* 16c-3-3.png in Resources */, + BEA728D90E785F18007330D2 /* 16c-3-4.png in Resources */, + BE7E2C381A316B78006FFED4 /* 2@2x.png in Resources */, + BE86D4371A32C1CE00E3D4A7 /* g@2x.png in Resources */, + BEA728DA0E785F18007330D2 /* 16c-3-5.png in Resources */, + BE86D4421A32C1CE00E3D4A7 /* prgm@2x.png in Resources */, + BE86D43F1A32C1CE00E3D4A7 /* O@2x.png in Resources */, + BEA728DB0E785F18007330D2 /* 16c-3-6.png in Resources */, + BE86D43C1A32C1CE00E3D4A7 /* keypad-16c@2x.png in Resources */, + BEA728DC0E785F18007330D2 /* 16c-3-7.png in Resources */, + BEA728DD0E785F18007330D2 /* 16c-3-8.png in Resources */, + BEA728DE0E785F18007330D2 /* 16c-3-9.png in Resources */, + BEA728DF0E785F18007330D2 /* 16c-background.png in Resources */, + BEA728EF0E7869C0007330D2 /* icon-16c.png in Resources */, + BE952B9D0E786DEA00E648EB /* 16c.obj in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + BEA727150E7841D7007330D2 /* hpcalc.m in Sources */, + BEA727160E7841D7007330D2 /* DisplayView.m in Sources */, + BEA727170E7841D7007330D2 /* proc_nut.c in Sources */, + BEA727180E7841D7007330D2 /* voyager_lcd.c in Sources */, + BEA7271A0E7841D7007330D2 /* macutil.c in Sources */, + BEA7271B0E7841D7007330D2 /* digit_ops.c in Sources */, + BEA727200E78421B007330D2 /* HP16ViewController.m in Sources */, + BEA727210E78421B007330D2 /* HP16AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEVELOPMENT_TEAM = 25U29D3M2T; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = HP16_Prefix.pch; + INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "net.ihatewaiting.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = HP16; + PROVISIONING_PROFILE = ""; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + DEVELOPMENT_TEAM = 25U29D3M2T; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = HP16_Prefix.pch; + INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "net.ihatewaiting.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = HP16; + PROVISIONING_PROFILE = ""; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_KEY_UIRequiresFullScreen = YES; + INFOPLIST_KEY_UIStatusBarHidden = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationLandscapeRight; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationLandscapeRight; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE = ""; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_KEY_UIRequiresFullScreen = YES; + INFOPLIST_KEY_UIStatusBarHidden = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationLandscapeRight; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = UIInterfaceOrientationLandscapeRight; + IPHONEOS_DEPLOYMENT_TARGET = 15.4; + ONLY_ACTIVE_ARCH = NO; + PROVISIONING_PROFILE = ""; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "HP16" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "HP16" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/HP16.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/HP16.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..387a238 --- /dev/null +++ b/HP16.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/HP16.xcodeproj/project.xcworkspace/xcshareddata/HP16.xccheckout b/HP16.xcodeproj/project.xcworkspace/xcshareddata/HP16.xccheckout new file mode 100644 index 0000000..b318f08 --- /dev/null +++ b/HP16.xcodeproj/project.xcworkspace/xcshareddata/HP16.xccheckout @@ -0,0 +1,60 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + C01E1039-A176-41ED-A675-13854ABF9390 + IDESourceControlProjectName + HP16 + IDESourceControlProjectOriginsDictionary + + 89bebd9f-2c01-0410-b9da-adc03bcd854c++177 + http://192.168.1.101/svn/hpcalc + 89bebd9f-2c01-0410-b9da-adc03bcd854c++6052 + http://192.168.1.101/svn/hpcalc/HP16 + + IDESourceControlProjectPath + HP16.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + 89bebd9f-2c01-0410-b9da-adc03bcd854c++177 + ../../../hpcalc + 89bebd9f-2c01-0410-b9da-adc03bcd854c++6052 + ../.. + + IDESourceControlProjectRepositoryRootDictionary + + 89bebd9f-2c01-0410-b9da-adc03bcd854c++177 + http://192.168.1.101/svn + 89bebd9f-2c01-0410-b9da-adc03bcd854c++6052 + http://192.168.1.101/svn + + IDESourceControlProjectURL + http://192.168.1.101/svn/hpcalc/HP16/HP16.xcodeproj + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + 89bebd9f-2c01-0410-b9da-adc03bcd854c++6052 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.subversion + IDESourceControlWCCIdentifierKey + 89bebd9f-2c01-0410-b9da-adc03bcd854c++6052 + IDESourceControlWCCName + HP16 + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.subversion + IDESourceControlWCCIdentifierKey + 89bebd9f-2c01-0410-b9da-adc03bcd854c++177 + IDESourceControlWCCName + hpcalc + + + + diff --git a/HP16.xcodeproj/project.xcworkspace/xcshareddata/HP16.xcscmblueprint b/HP16.xcodeproj/project.xcworkspace/xcshareddata/HP16.xcscmblueprint new file mode 100644 index 0000000..bfce450 --- /dev/null +++ b/HP16.xcodeproj/project.xcworkspace/xcshareddata/HP16.xcscmblueprint @@ -0,0 +1,32 @@ +{ + "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "89bebd9f-2c01-0410-b9da-adc03bcd854c++6052", + "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { + "89bebd9f-2c01-0410-b9da-adc03bcd854c++6052" : { + + } + }, + "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { + "89bebd9f-2c01-0410-b9da-adc03bcd854c++6052" : 0, + "89bebd9f-2c01-0410-b9da-adc03bcd854c++177" : 0 + }, + "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "C01E1039-A176-41ED-A675-13854ABF9390", + "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { + "89bebd9f-2c01-0410-b9da-adc03bcd854c++6052" : "HP16", + "89bebd9f-2c01-0410-b9da-adc03bcd854c++177" : "hpcalc" + }, + "DVTSourceControlWorkspaceBlueprintNameKey" : "HP16", + "DVTSourceControlWorkspaceBlueprintVersion" : 204, + "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "HP16.xcodeproj", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "http:\/\/192.168.1.101\/svn", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Subversion", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "89bebd9f-2c01-0410-b9da-adc03bcd854c++177" + }, + { + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "http:\/\/192.168.1.101\/svn", + "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Subversion", + "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "89bebd9f-2c01-0410-b9da-adc03bcd854c++6052" + } + ] +} \ No newline at end of file diff --git a/HP16.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/HP16.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/HP16.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/HP16.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/HP16.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/HP16.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/HP16.xcodeproj/project.xcworkspace/xcuserdata/ken.xcuserdatad/WorkspaceSettings.xcsettings b/HP16.xcodeproj/project.xcworkspace/xcuserdata/ken.xcuserdatad/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..5f46a3b --- /dev/null +++ b/HP16.xcodeproj/project.xcworkspace/xcuserdata/ken.xcuserdatad/WorkspaceSettings.xcsettings @@ -0,0 +1,30 @@ + + + + + BuildLocationStyle + UseAppPreferences + CompilationCachingSetting + Default + CustomBuildLocationType + RelativeToDerivedData + DerivedDataLocationStyle + Default + HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges + + IDEWorkspaceUserSettings_HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges + + IDEWorkspaceUserSettings_SnapshotAutomaticallyBeforeSignificantChanges + + IssueFilterStyle + ShowActiveSchemeOnly + LiveSourceIssuesEnabled + + ShowSharedSchemesAutomaticallyEnabled + + SnapshotAutomaticallyBeforeSignificantChanges + + SnapshotLocationStyle + Default + + diff --git a/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..0958e2d --- /dev/null +++ b/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcschemes/HP16.xcscheme b/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcschemes/HP16.xcscheme new file mode 100644 index 0000000..f8c4d74 --- /dev/null +++ b/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcschemes/HP16.xcscheme @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcschemes/xcschememanagement.plist b/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..fc0d3ea --- /dev/null +++ b/HP16.xcodeproj/xcuserdata/ken.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + HP16.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 1D6058900D05DD3D006BFB54 + + primary + + + + + diff --git a/HP16_Prefix.pch b/HP16_Prefix.pch new file mode 100644 index 0000000..7561fc0 --- /dev/null +++ b/HP16_Prefix.pch @@ -0,0 +1,8 @@ +// +// Prefix header for all source files of the 'hpcalc-hp15' target in the 'hpcalc-hp15' project +// + +#ifdef __OBJC__ +#import +#import +#endif diff --git a/Info.plist b/Info.plist new file mode 100644 index 0000000..e7ddf0b --- /dev/null +++ b/Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + icon.png + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSApplicationCategoryType + public.app-category.business + LSRequiresIPhoneOS + + NSMainNibFile + MainWindow + UIInterfaceOrientation + UIInterfaceOrientationLandscapeRight + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + + diff --git a/MainWindow.xib b/MainWindow.xib new file mode 100644 index 0000000..2e7e50b --- /dev/null +++ b/MainWindow.xib @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/define_hp16.h b/define_hp16.h new file mode 100644 index 0000000..6b70efd --- /dev/null +++ b/define_hp16.h @@ -0,0 +1,14 @@ + +#include "keymacros.h" + +#include +#define HP16C 1 + +#ifdef HP16C +#define MODEL "16c" +#define APPNAME "HP-16C" +#define CFGPATH "~/Library/net.ihatewaiting.iphone.hpcalc/16c" +#define ABOUTURL "http://ihatewaiting.net/hp16c.html" +#include "version-16c.h" +#endif + diff --git a/en.lproj/ControllerView.xib b/en.lproj/ControllerView.xib new file mode 100644 index 0000000..2576bde --- /dev/null +++ b/en.lproj/ControllerView.xib @@ -0,0 +1,1801 @@ + + + + 2048 + 14A389 + 6250 + 1343.14 + 755.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 6244 + + + IBProxyObject + IBUIButton + IBUIImageView + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 268 + + + + 292 + {{-10, -10}, {500, 340}} + + NO + YES + NO + NO + IBCocoaTouchFramework + + NSImage + 16c-background.png + + + + + 268 + {{10, 274}, {36, 30}} + + NO + NO + 24 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + 3 + MAA + + + 1 + MSAxIDEAA + + + + NSImage + 16c-0-0.png + + + Helvetica-Bold + Helvetica + 2 + 15 + + + Helvetica-Bold + 15 + 16 + + + + + 292 + {{58, 274}, {36, 30}} + + NO + NO + 56 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-1.png + + + + + + + 292 + {{108, 274}, {36, 30}} + + NO + NO + 120 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-2.png + + + + + + + 292 + {{198, 274}, {36, 30}} + + NO + NO + 136 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-4.png + + + + + + + 292 + {{245, 228}, {36, 76}} + + NO + NO + 132 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-5.png + + + + + + + 292 + {{293, 274}, {36, 30}} + + NO + NO + 197 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-6.png + + + + + + + 292 + {{340, 274}, {36, 30}} + + NO + NO + 117 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-7.png + + + + + + + 292 + {{387, 274}, {36, 30}} + + NO + NO + 53 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-8.png + + + + + + + 292 + {{434, 274}, {36, 30}} + + NO + NO + 21 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-9.png + + + + + + + 292 + {{10, 121}, {36, 30}} + + NO + NO + 19 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-0.png + + + + + + + 292 + {{58, 121}, {36, 30}} + + NO + NO + 51 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-1.png + + + + + + + 292 + {{105, 121}, {36, 30}} + + NO + NO + 115 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-2.png + + + + + + + 292 + {{152, 121}, {36, 30}} + + NO + NO + 195 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-3.png + + + + + + + 292 + {{198, 121}, {36, 30}} + + NO + NO + 131 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-4.png + + + + + + + 292 + {{245, 121}, {36, 30}} + + NO + NO + 130 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-5.png + + + + + + + 292 + {{293, 121}, {36, 30}} + + NO + NO + 194 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-6.png + + + + + + + 292 + {{340, 121}, {36, 30}} + + NO + NO + 114 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-7.png + + + + + + + 292 + {{387, 121}, {36, 30}} + + NO + NO + 50 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-8.png + + + + + + + 292 + {{434, 121}, {36, 30}} + + NO + NO + 18 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-3-9.png + + + + + + + 310 + {{387, 20}, {58, 58}} + + NO + NO + 2 + -100 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + icon-16c.png + + + + + + + 292 + {{10, 173}, {36, 30}} + + NO + NO + 16 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-0.png + + + + + + + 292 + {{58, 173}, {36, 30}} + + NO + NO + 48 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-1.png + + + + + + + 292 + {{105, 173}, {36, 30}} + + NO + NO + 112 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-2.png + + + + + + + 292 + {{152, 173}, {36, 30}} + + NO + NO + 192 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-3.png + + + + + + + 292 + {{198, 173}, {36, 30}} + + NO + NO + 128 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-4.png + + + + + + + 292 + {{245, 173}, {36, 30}} + + NO + NO + 135 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-5.png + + + + + + + 292 + {{293, 173}, {36, 30}} + + NO + NO + 199 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-6.png + + + + + + + 292 + {{340, 173}, {36, 30}} + + NO + NO + 119 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-7.png + + + + + + + 292 + {{387, 173}, {36, 30}} + + NO + NO + 55 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-8.png + + + + + + + 292 + {{434, 173}, {36, 30}} + + NO + NO + 23 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-2-9.png + + + + + + + 292 + {{10, 228}, {36, 30}} + + NO + NO + 17 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-0.png + + + + + + + 292 + {{58, 228}, {36, 30}} + + NO + NO + 49 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-1.png + + + + + + + 292 + {{105, 228}, {36, 30}} + + NO + NO + 113 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-2.png + + + + + + + 292 + {{152, 228}, {36, 30}} + + NO + NO + 193 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-3.png + + + + + + + 292 + {{198, 228}, {36, 30}} + + NO + NO + 129 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-4.png + + + + + + + 292 + {{296, 228}, {36, 30}} + + NO + NO + 196 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-6.png + + + + + + + 292 + {{340, 228}, {36, 30}} + + NO + NO + 116 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-7.png + + + + + + + 292 + {{387, 228}, {36, 30}} + + NO + NO + 52 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-8.png + + + + + + + 292 + {{434, 228}, {36, 30}} + + NO + NO + 20 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-1-9.png + + + + + + + 292 + {{152, 274}, {36, 30}} + + NO + NO + 200 + IBCocoaTouchFramework + 0 + 0 + 1 + YES + + + + + NSImage + 16c-0-3.png + + + + + + {480, 320} + + 3 + MQA + + 2 + + + + 3 + 3 + + + IBUISimulatedFreeformSizeMetricsSentinel + Freeform + + IBCocoaTouchFramework + + + + + + + view + + + + 58 + + + + keyPressed: + + + 7 + + 144 + + + + keyPressed: + + + 7 + + 173 + + + + keyPressed: + + + 7 + + 174 + + + + keyPressed: + + + 7 + + 175 + + + + keyPressed: + + + 7 + + 176 + + + + keyPressed: + + + 7 + + 177 + + + + keyPressed: + + + 7 + + 178 + + + + keyPressed: + + + 7 + + 179 + + + + keyPressed: + + + 7 + + 180 + + + + keyPressed: + + + 7 + + 181 + + + + keyPressed: + + + 7 + + 182 + + + + keyPressed: + + + 7 + + 163 + + + + keyPressed: + + + 7 + + 164 + + + + keyPressed: + + + 7 + + 165 + + + + keyPressed: + + + 7 + + 166 + + + + keyPressed: + + + 7 + + 167 + + + + keyPressed: + + + 7 + + 168 + + + + keyPressed: + + + 7 + + 169 + + + + keyPressed: + + + 7 + + 170 + + + + keyPressed: + + + 7 + + 171 + + + + keyPressed: + + + 7 + + 172 + + + + keyPressed: + + + 7 + + 154 + + + + keyPressed: + + + 7 + + 155 + + + + keyPressed: + + + 7 + + 156 + + + + keyPressed: + + + 7 + + 157 + + + + keyPressed: + + + 7 + + 158 + + + + keyPressed: + + + 7 + + 159 + + + + keyPressed: + + + 7 + + 160 + + + + keyPressed: + + + 7 + + 161 + + + + keyPressed: + + + 7 + + 162 + + + + keyPressed: + + + 7 + + 147 + + + + keyPressed: + + + 7 + + 145 + + + + keyPressed: + + + 7 + + 146 + + + + keyPressed: + + + 7 + + 148 + + + + keyPressed: + + + 7 + + 149 + + + + keyPressed: + + + 7 + + 150 + + + + keyPressed: + + + 7 + + 151 + + + + keyPressed: + + + 7 + + 152 + + + + keyPressed: + + + 7 + + 153 + + + + keyPressed: + + + 7 + + 143 + + + + + + 0 + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 6 + + + K_ON + + + 16 + + + K_SQR + + + 17 + + + K_EXP + + + 18 + + + K_10X + + + 19 + + + K_YEX + + + 20 + + + K_1X + + + 21 + + + K_CHS + + + 22 + + + K_N7 + + + 23 + + + K_N8 + + + 24 + + + K_N9 + + + 25 + + + K_DIV + + + 26 + + + K_SST + + + 27 + + + K_GTO + + + 28 + + + K_SIN + + + 29 + + + K_COS + + + 30 + + + K_TAN + + + 31 + + + K_EEX + + + 32 + + + K_N4 + + + 33 + + + K_N5 + + + 34 + + + K_N6 + + + 35 + + + K_MUL + + + 36 + + + K_RS + + + 37 + + + K_GSB + + + 38 + + + K_RDN + + + 39 + + + K_XY + + + 40 + + + K_BA + + + 42 + + + K_N1 + + + 43 + + + K_N2 + + + 44 + + + K_N3 + + + 45 + + + K_SUB + + + 46 + + + K_STO + + + 47 + + + K_F + + + 48 + + + K_G + + + 49 + + + K_RCL + + + 50 + + + K_ENT + + + 51 + + + K_N0 + + + 52 + + + K_DP + + + 53 + + + K_PSI + + + 54 + + + K_ADD + + + 55 + + + K_16C + + + 13 + + + background + + + + + HP16ViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 182 + + + 0 + IBCocoaTouchFramework + NO + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + 3 + + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 89} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {39, 33} + {574, 366} + {60, 60} + + + diff --git a/en.lproj/MainWindow.xib b/en.lproj/MainWindow.xib new file mode 100644 index 0000000..4c0c225 --- /dev/null +++ b/en.lproj/MainWindow.xib @@ -0,0 +1,225 @@ + + + + 2048 + 14A389 + 6250 + 1343.14 + 755.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 6244 + + + IBProxyObject + IBUICustomObject + IBUIWindow + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + IBCocoaTouchFramework + + + + 1292 + + {320, 480} + + + + 1 + MSAxIDEAA + + NO + NO + + IBUISimulatedFreeformSizeMetricsSentinel + Freeform + + IBCocoaTouchFramework + + + + + + + delegate + + + + 4 + + + + window + + + + 5 + + + + + + 0 + + + + + + 2 + + + + + + -1 + + + File's Owner + + + 3 + + + HP16 App Delegate + + + -2 + + + + + + + UIApplication + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + HP16AppDelegate + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 9 + + + + + HP16AppDelegate + NSObject + + window + UIWindow + + + window + + window + UIWindow + + + + IBProjectSource + ../Classes/HP16AppDelegate.h + + + + + + UIApplication + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIApplication.h + + + + UIGestureRecognizer + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIGestureRecognizer.h + + + + UIResponder + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UISearchDisplayController + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UISearchDisplayController.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + UIViewController + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIViewController.h + + + + UIWindow + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIWindow.h + + + + + 0 + IBCocoaTouchFramework + NO + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..d7f25b9 Binary files /dev/null and b/icon.png differ diff --git a/img/0.png b/img/0.png new file mode 100644 index 0000000..eb8e170 Binary files /dev/null and b/img/0.png differ diff --git a/img/0@2x.png b/img/0@2x.png new file mode 100644 index 0000000..0869041 Binary files /dev/null and b/img/0@2x.png differ diff --git a/img/1.png b/img/1.png new file mode 100644 index 0000000..a442a3a Binary files /dev/null and b/img/1.png differ diff --git a/img/1@2x.png b/img/1@2x.png new file mode 100644 index 0000000..9bb66a9 Binary files /dev/null and b/img/1@2x.png differ diff --git a/img/2.png b/img/2.png new file mode 100644 index 0000000..8b90e89 Binary files /dev/null and b/img/2.png differ diff --git a/img/2@2x.png b/img/2@2x.png new file mode 100644 index 0000000..5125846 Binary files /dev/null and b/img/2@2x.png differ diff --git a/img/3.png b/img/3.png new file mode 100644 index 0000000..db2230d Binary files /dev/null and b/img/3.png differ diff --git a/img/3@2x.png b/img/3@2x.png new file mode 100644 index 0000000..8fe68a0 Binary files /dev/null and b/img/3@2x.png differ diff --git a/img/4.png b/img/4.png new file mode 100644 index 0000000..7fd3440 Binary files /dev/null and b/img/4.png differ diff --git a/img/4@2x.png b/img/4@2x.png new file mode 100644 index 0000000..59a0c37 Binary files /dev/null and b/img/4@2x.png differ diff --git a/img/5.png b/img/5.png new file mode 100644 index 0000000..d363350 Binary files /dev/null and b/img/5.png differ diff --git a/img/5@2x.png b/img/5@2x.png new file mode 100644 index 0000000..3ec24e5 Binary files /dev/null and b/img/5@2x.png differ diff --git a/img/6.png b/img/6.png new file mode 100644 index 0000000..957296f Binary files /dev/null and b/img/6.png differ diff --git a/img/6@2x.png b/img/6@2x.png new file mode 100644 index 0000000..0cec061 Binary files /dev/null and b/img/6@2x.png differ diff --git a/img/7.png b/img/7.png new file mode 100644 index 0000000..1fbf34e Binary files /dev/null and b/img/7.png differ diff --git a/img/7@2x.png b/img/7@2x.png new file mode 100644 index 0000000..0aa0c81 Binary files /dev/null and b/img/7@2x.png differ diff --git a/img/8.png b/img/8.png new file mode 100644 index 0000000..a6e9704 Binary files /dev/null and b/img/8.png differ diff --git a/img/8@2x.png b/img/8@2x.png new file mode 100644 index 0000000..dd156e8 Binary files /dev/null and b/img/8@2x.png differ diff --git a/img/9.png b/img/9.png new file mode 100644 index 0000000..5f75949 Binary files /dev/null and b/img/9.png differ diff --git a/img/9@2x.png b/img/9@2x.png new file mode 100644 index 0000000..0999c6b Binary files /dev/null and b/img/9@2x.png differ diff --git a/img/CC.png b/img/CC.png new file mode 100644 index 0000000..bb0cd49 Binary files /dev/null and b/img/CC.png differ diff --git a/img/CC@2x.png b/img/CC@2x.png new file mode 100644 index 0000000..88d15f4 Binary files /dev/null and b/img/CC@2x.png differ diff --git a/img/Default-15c.png b/img/Default-15c.png new file mode 100644 index 0000000..2c3a8ee Binary files /dev/null and b/img/Default-15c.png differ diff --git a/img/Default-15c@2x.png b/img/Default-15c@2x.png new file mode 100644 index 0000000..e7dd919 Binary files /dev/null and b/img/Default-15c@2x.png differ diff --git a/img/Default-16c.png b/img/Default-16c.png new file mode 100644 index 0000000..ee8193c Binary files /dev/null and b/img/Default-16c.png differ diff --git a/img/Default-16c@2x.png b/img/Default-16c@2x.png new file mode 100644 index 0000000..ff802ee Binary files /dev/null and b/img/Default-16c@2x.png differ diff --git a/img/E.png b/img/E.png new file mode 100644 index 0000000..7fd480d Binary files /dev/null and b/img/E.png differ diff --git a/img/E@2x.png b/img/E@2x.png new file mode 100644 index 0000000..8810106 Binary files /dev/null and b/img/E@2x.png differ diff --git a/img/FF.png b/img/FF.png new file mode 100644 index 0000000..e94f8f8 Binary files /dev/null and b/img/FF.png differ diff --git a/img/FF@2x.png b/img/FF@2x.png new file mode 100644 index 0000000..7266f85 Binary files /dev/null and b/img/FF@2x.png differ diff --git a/img/O.png b/img/O.png new file mode 100644 index 0000000..2577a47 Binary files /dev/null and b/img/O.png differ diff --git a/img/O@2x.png b/img/O@2x.png new file mode 100644 index 0000000..ce1491e Binary files /dev/null and b/img/O@2x.png differ diff --git a/img/P.png b/img/P.png new file mode 100644 index 0000000..899722f Binary files /dev/null and b/img/P.png differ diff --git a/img/P@2x.png b/img/P@2x.png new file mode 100644 index 0000000..117cd6c Binary files /dev/null and b/img/P@2x.png differ diff --git a/img/RR.png b/img/RR.png new file mode 100644 index 0000000..562baf7 Binary files /dev/null and b/img/RR.png differ diff --git a/img/RR@2x.png b/img/RR@2x.png new file mode 100644 index 0000000..1f7865e Binary files /dev/null and b/img/RR@2x.png differ diff --git a/img/a.png b/img/a.png new file mode 100644 index 0000000..c206cf3 Binary files /dev/null and b/img/a.png differ diff --git a/img/a@2x.png b/img/a@2x.png new file mode 100644 index 0000000..ee8a984 Binary files /dev/null and b/img/a@2x.png differ diff --git a/img/alertbg.png b/img/alertbg.png new file mode 100644 index 0000000..e973ec3 Binary files /dev/null and b/img/alertbg.png differ diff --git a/img/alertbg.psd b/img/alertbg.psd new file mode 100644 index 0000000..3a24ccf Binary files /dev/null and b/img/alertbg.psd differ diff --git a/img/alertbutton.png b/img/alertbutton.png new file mode 100644 index 0000000..3ba5db9 Binary files /dev/null and b/img/alertbutton.png differ diff --git a/img/alertbutton.psd b/img/alertbutton.psd new file mode 100644 index 0000000..dec162c Binary files /dev/null and b/img/alertbutton.psd differ diff --git a/img/alertbuttonpressed.png b/img/alertbuttonpressed.png new file mode 100644 index 0000000..40382fa Binary files /dev/null and b/img/alertbuttonpressed.png differ diff --git a/img/annunciators.psd b/img/annunciators.psd new file mode 100644 index 0000000..45b763c Binary files /dev/null and b/img/annunciators.psd differ diff --git a/img/b.png b/img/b.png new file mode 100644 index 0000000..8e06c78 Binary files /dev/null and b/img/b.png differ diff --git a/img/b@2x.png b/img/b@2x.png new file mode 100644 index 0000000..5a7b50a Binary files /dev/null and b/img/b@2x.png differ diff --git a/img/begin.png b/img/begin.png new file mode 100644 index 0000000..0962b7e Binary files /dev/null and b/img/begin.png differ diff --git a/img/begin@2x.png b/img/begin@2x.png new file mode 100644 index 0000000..c637380 Binary files /dev/null and b/img/begin@2x.png differ diff --git a/img/c.png b/img/c.png new file mode 100644 index 0000000..c9f77f8 Binary files /dev/null and b/img/c.png differ diff --git a/img/c@2x.png b/img/c@2x.png new file mode 100644 index 0000000..88189b8 Binary files /dev/null and b/img/c@2x.png differ diff --git a/img/charset.psd b/img/charset.psd new file mode 100644 index 0000000..ad8befc Binary files /dev/null and b/img/charset.psd differ diff --git a/img/comma.png b/img/comma.png new file mode 100644 index 0000000..4417af1 Binary files /dev/null and b/img/comma.png differ diff --git a/img/comma@2x.png b/img/comma@2x.png new file mode 100644 index 0000000..a4ae0f0 Binary files /dev/null and b/img/comma@2x.png differ diff --git a/img/d.png b/img/d.png new file mode 100644 index 0000000..8e6be54 Binary files /dev/null and b/img/d.png differ diff --git a/img/d@2x.png b/img/d@2x.png new file mode 100644 index 0000000..9eb0c56 Binary files /dev/null and b/img/d@2x.png differ diff --git a/img/decimal.png b/img/decimal.png new file mode 100644 index 0000000..907515f Binary files /dev/null and b/img/decimal.png differ diff --git a/img/decimal@2x.png b/img/decimal@2x.png new file mode 100644 index 0000000..4c2d7e1 Binary files /dev/null and b/img/decimal@2x.png differ diff --git a/img/display-15c.png b/img/display-15c.png new file mode 100644 index 0000000..c35276a Binary files /dev/null and b/img/display-15c.png differ diff --git a/img/display-15c@2x.png b/img/display-15c@2x.png new file mode 100644 index 0000000..ea84164 Binary files /dev/null and b/img/display-15c@2x.png differ diff --git a/img/display-16c.png b/img/display-16c.png new file mode 100644 index 0000000..886da79 Binary files /dev/null and b/img/display-16c.png differ diff --git a/img/display-16c@2x.png b/img/display-16c@2x.png new file mode 100644 index 0000000..f76dae5 Binary files /dev/null and b/img/display-16c@2x.png differ diff --git a/img/display.psd b/img/display.psd new file mode 100644 index 0000000..9e59b85 Binary files /dev/null and b/img/display.psd differ diff --git a/img/dmy.png b/img/dmy.png new file mode 100644 index 0000000..0ebef19 Binary files /dev/null and b/img/dmy.png differ diff --git a/img/dmy@2x.png b/img/dmy@2x.png new file mode 100644 index 0000000..b971872 Binary files /dev/null and b/img/dmy@2x.png differ diff --git a/img/f.png b/img/f.png new file mode 100644 index 0000000..f52d480 Binary files /dev/null and b/img/f.png differ diff --git a/img/f@2x.png b/img/f@2x.png new file mode 100644 index 0000000..66788ae Binary files /dev/null and b/img/f@2x.png differ diff --git a/img/g.png b/img/g.png new file mode 100644 index 0000000..ada285f Binary files /dev/null and b/img/g.png differ diff --git a/img/g@2x.png b/img/g@2x.png new file mode 100644 index 0000000..3962b57 Binary files /dev/null and b/img/g@2x.png differ diff --git a/img/grad.png b/img/grad.png new file mode 100644 index 0000000..f953b97 Binary files /dev/null and b/img/grad.png differ diff --git a/img/grad@2x.png b/img/grad@2x.png new file mode 100644 index 0000000..a007cd3 Binary files /dev/null and b/img/grad@2x.png differ diff --git a/img/h.png b/img/h.png new file mode 100644 index 0000000..c50d15b Binary files /dev/null and b/img/h.png differ diff --git a/img/h@2x.png b/img/h@2x.png new file mode 100644 index 0000000..04d8f99 Binary files /dev/null and b/img/h@2x.png differ diff --git a/img/i.png b/img/i.png new file mode 100644 index 0000000..ed4fa25 Binary files /dev/null and b/img/i.png differ diff --git a/img/i@2x.png b/img/i@2x.png new file mode 100644 index 0000000..7a0c140 Binary files /dev/null and b/img/i@2x.png differ diff --git a/img/icon-15c.png b/img/icon-15c.png new file mode 100644 index 0000000..889ba43 Binary files /dev/null and b/img/icon-15c.png differ diff --git a/img/icon-16c.png b/img/icon-16c.png new file mode 100644 index 0000000..f7c142a Binary files /dev/null and b/img/icon-16c.png differ diff --git a/img/icon-16c@2x.png b/img/icon-16c@2x.png new file mode 100644 index 0000000..60a02dd Binary files /dev/null and b/img/icon-16c@2x.png differ diff --git a/img/icon.psd b/img/icon.psd new file mode 100644 index 0000000..8650036 Binary files /dev/null and b/img/icon.psd differ diff --git a/img/keypad-15c.png b/img/keypad-15c.png new file mode 100644 index 0000000..4bf803d Binary files /dev/null and b/img/keypad-15c.png differ diff --git a/img/keypad-15c.psd b/img/keypad-15c.psd new file mode 100644 index 0000000..383c48b Binary files /dev/null and b/img/keypad-15c.psd differ diff --git a/img/keypad-15c@2x.png b/img/keypad-15c@2x.png new file mode 100644 index 0000000..ad0511d Binary files /dev/null and b/img/keypad-15c@2x.png differ diff --git a/img/keypad-16c.png b/img/keypad-16c.png new file mode 100644 index 0000000..ea23d60 Binary files /dev/null and b/img/keypad-16c.png differ diff --git a/img/keypad-16c.psd b/img/keypad-16c.psd new file mode 100644 index 0000000..a74666e Binary files /dev/null and b/img/keypad-16c.psd differ diff --git a/img/keypad-16c@2x.png b/img/keypad-16c@2x.png new file mode 100644 index 0000000..d4772cd Binary files /dev/null and b/img/keypad-16c@2x.png differ diff --git a/img/logo.psd b/img/logo.psd new file mode 100644 index 0000000..4e461d6 Binary files /dev/null and b/img/logo.psd differ diff --git a/img/n.png b/img/n.png new file mode 100644 index 0000000..05ce134 Binary files /dev/null and b/img/n.png differ diff --git a/img/n@2x.png b/img/n@2x.png new file mode 100644 index 0000000..715b1bc Binary files /dev/null and b/img/n@2x.png differ diff --git a/img/neg.png b/img/neg.png new file mode 100644 index 0000000..055ffa0 Binary files /dev/null and b/img/neg.png differ diff --git a/img/neg@2x.png b/img/neg@2x.png new file mode 100644 index 0000000..7c7658b Binary files /dev/null and b/img/neg@2x.png differ diff --git a/img/prgm.png b/img/prgm.png new file mode 100644 index 0000000..a5b72ee Binary files /dev/null and b/img/prgm.png differ diff --git a/img/prgm@2x.png b/img/prgm@2x.png new file mode 100644 index 0000000..5e2638d Binary files /dev/null and b/img/prgm@2x.png differ diff --git a/img/r.png b/img/r.png new file mode 100644 index 0000000..7d7d2fc Binary files /dev/null and b/img/r.png differ diff --git a/img/r@2x.png b/img/r@2x.png new file mode 100644 index 0000000..3d2b850 Binary files /dev/null and b/img/r@2x.png differ diff --git a/img/rad.png b/img/rad.png new file mode 100644 index 0000000..e31a82d Binary files /dev/null and b/img/rad.png differ diff --git a/img/rad@2x.png b/img/rad@2x.png new file mode 100644 index 0000000..41efb82 Binary files /dev/null and b/img/rad@2x.png differ diff --git a/img/rawlogo.psd b/img/rawlogo.psd new file mode 100644 index 0000000..8ac9477 Binary files /dev/null and b/img/rawlogo.psd differ diff --git a/img/screenshot-15c.png b/img/screenshot-15c.png new file mode 100644 index 0000000..8bbe9fc Binary files /dev/null and b/img/screenshot-15c.png differ diff --git a/img/screenshot-16c.png b/img/screenshot-16c.png new file mode 100644 index 0000000..45a07aa Binary files /dev/null and b/img/screenshot-16c.png differ diff --git a/img/screenshots.psd b/img/screenshots.psd new file mode 100644 index 0000000..5c1d52f Binary files /dev/null and b/img/screenshots.psd differ diff --git a/img/u.png b/img/u.png new file mode 100644 index 0000000..c2bed2d Binary files /dev/null and b/img/u.png differ diff --git a/img/u@2x.png b/img/u@2x.png new file mode 100644 index 0000000..8d24a3b Binary files /dev/null and b/img/u@2x.png differ diff --git a/img/user.png b/img/user.png new file mode 100644 index 0000000..6b14976 Binary files /dev/null and b/img/user.png differ diff --git a/img/user@2x.png b/img/user@2x.png new file mode 100644 index 0000000..66b2038 Binary files /dev/null and b/img/user@2x.png differ diff --git a/main.m b/main.m new file mode 100644 index 0000000..f2185cf --- /dev/null +++ b/main.m @@ -0,0 +1,41 @@ +// +// main.m +// hpcalc-hp15 +// +// Created by Ken on 8/29/08. +// Copyright Ken Staton 2008. All rights reserved. +// + +#import "define_hp16.h" +#import + +int main(int argc, char *argv[]) { + + @autoreleasepool { + + /* Create sub-folders under ~/Library/net.ihatewaiting.iphone.hpcalc and move state file */ + /* + if ( ! [[NSFileManager defaultManager] fileExistsAtPath:[@CFGPATH stringByExpandingTildeInPath]] ) { + [[NSFileManager defaultManager] createDirectoryAtPath:[@CFGPATH stringByExpandingTildeInPath] attributes:nil]; + + NSString *path = [NSString stringWithFormat:[@"~/Library/net.ihatewaiting.iphone.hpcalc" stringByExpandingTildeInPath]]; + NSString *name = [NSString stringWithFormat:@"%@/%s.state", path, MODEL]; + NSString *newName = [NSString stringWithFormat:@"%@/%s/state", path, MODEL]; + if ( [[NSFileManager defaultManager] fileExistsAtPath:name] ) { + [[NSFileManager defaultManager] copyPath:name toPath:newName handler:nil]; + [[NSFileManager defaultManager] removeFileAtPath:name handler:nil]; + } + } + */ + /* Set permissions of hpcalc folder to allow user mobile to save state, etc. */ + /* + [[NSFileManager defaultManager] changeFileAttributes: [NSDictionary dictionaryWithObject:[NSNumber numberWithLong:509] forKey:@"NSFilePosixPermissions"] + atPath: [@CFGPATH stringByExpandingTildeInPath] + ]; + */ + + + int retVal = UIApplicationMain(argc, argv, nil, nil); + return retVal; + } +} diff --git a/src/DisplayView (original).m b/src/DisplayView (original).m new file mode 100644 index 0000000..7f0db05 --- /dev/null +++ b/src/DisplayView (original).m @@ -0,0 +1,566 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + +//#import "CalculatorApp.h" +#import "DisplayView.h" + +#import "display.h" +#import "proc.h" +#import "digit_ops.h" +#import "voyager_lcd.h" +#import "proc_nut.h" + +@implementation DisplayView + +- (id) initWithFrame: (CGRect)frame { + self = [super initWithFrame: frame]; + + [self setImage: [UIImage imageNamed: @"display.png"]]; + + digit[0] = [UIImage imageNamed:@"0.png"]; + digit[1] = [UIImage imageNamed:@"1.png"]; + digit[2] = [UIImage imageNamed:@"2.png"]; + digit[3] = [UIImage imageNamed:@"3.png"]; + digit[4] = [UIImage imageNamed:@"4.png"]; + digit[5] = [UIImage imageNamed:@"5.png"]; + digit[6] = [UIImage imageNamed:@"6.png"]; + digit[7] = [UIImage imageNamed:@"7.png"]; + digit[8] = [UIImage imageNamed:@"8.png"]; + digit[9] = [UIImage imageNamed:@"9.png"]; + digit[10] = [UIImage imageNamed:@"decimal.png"]; + digit[11] = [UIImage imageNamed:@"comma.png"]; + digit[12] = [UIImage imageNamed:@"f.png"]; + digit[13] = [UIImage imageNamed:@"g.png"]; + digit[14] = [UIImage imageNamed:@"grad.png"]; + digit[15] = [UIImage imageNamed:@"rad.png"]; + digit[16] = [UIImage imageNamed:@"neg.png"]; + + digit[17] = [UIImage imageNamed:@"E.png"]; + digit[18] = [UIImage imageNamed:@"RR.png"]; + digit[19] = [UIImage imageNamed:@"O.png"]; + digit[20] = [UIImage imageNamed:@"r.png"]; + digit[21] = [UIImage imageNamed:@"u.png"]; + digit[22] = [UIImage imageNamed:@"n.png"]; + digit[23] = [UIImage imageNamed:@"i.png"]; + digit[24] = [UIImage imageNamed:@"P.png"]; + + digit[25] = [UIImage imageNamed:@"user.png"]; + digit[26] = [UIImage imageNamed:@"prgm.png"]; + digit[27] = [UIImage imageNamed:@"c.png"]; + + digit[28] = [UIImage imageNamed:@"begin.png"]; + digit[29] = [UIImage imageNamed:@"dmy.png"]; + + digit[30] = [UIImage imageNamed:@"h.png"]; + digit[31] = [UIImage imageNamed:@"d.png"]; + digit[32] = [UIImage imageNamed:@"b.png"]; + digit[33] = [UIImage imageNamed:@"a.png"]; + digit[34] = [UIImage imageNamed:@"CC.png"]; + digit[35] = [UIImage imageNamed:@"FF.png"]; + + int i; + for (i=0; i<11; i++) { + comma[11-i-1] = [[UIImageView alloc] initWithFrame:CGRectMake(240 -211, 97-21+21*i, 26, 21)]; + [self addSubview: comma[11-i-1]]; + pos[11-i-1] = [[UIImageView alloc] initWithFrame:CGRectMake(240 -211, 97-21+21*i, 26, 21)]; + [self addSubview: pos[11-i-1]]; + } + + // dp = [[UIImageView alloc] initWithFrame:CGRectMake(240 -211, 97+21*0, 26, 21)]; + // [self addSubview: dp]; + + user = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +0, 11, 26)]; + [self addSubview: user]; + f = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +30, 11, 6)]; + [self addSubview: f]; + g = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +41, 11, 7)]; + [self addSubview: g]; + begin = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +60, 11, 29)]; + [self addSubview: begin]; + grad = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +100, 11, 27)]; + [self addSubview: grad]; + rad = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +107, 11, 20)]; + [self addSubview: rad]; + dmy = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +133, 11, 25)]; + [self addSubview: dmy]; + c = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +164, 11, 8)]; + [self addSubview: c]; + prgm = [[UIImageView alloc] initWithFrame:CGRectMake(229 -211, 91 +184, 11, 28)]; + [self addSubview: prgm]; + + // set up to get Tap events (handleTapWithCount) + // KLS NOT iphone api - [self setTapDelegate: self]; + + pause = NO; + + return self; +} + +- (void) pauseDisplay:(bool) p { + pause = p; +} + +- (bool) displayPaused { + return pause; +} + +- (void) displayString: (NSString *) str { + int p = 10; + + //NSLog(@"displayString: %@ (%d)", str, [str length]); + + // [dp setImage:nil]; + + int i; + for (i=0; i<[str length]; i++) { + switch ([str characterAtIndex:i]) { + case 32: + // space + if (p>=0) + [pos[p--] setImage:nil]; + break; + case 45: + // - + if (p>=0) + [pos[p--] setImage:digit[16]]; + break; + // case 46: + // // . + // [dp setImage:digit[10]]; + // [dp setFrame:CGRectMake(240 -211, 97+21*(10-p-2), 26, 21)]; + // break; + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + // 0-9 + if (p>=0) + [pos[p--] setImage:digit[[str characterAtIndex:i]-48]]; + break; + case 69: + // E + if (p>=0) + [pos[p--] setImage:digit[17]]; + break; + case 79: + // O + if (p>=0) + [pos[p--] setImage:digit[19]]; + break; + case 80: + // P + if (p>=0) + [pos[p--] setImage:digit[24]]; + break; + case 82: + // R + if (p>=0) + [pos[p--] setImage:digit[18]]; + break; + case 114: + // r + if (p>=0) + [pos[p--] setImage:digit[20]]; + break; + case 117: + // u + if (p>=0) + [pos[p--] setImage:digit[21]]; + break; + case 110: + // n + if (p>=0) + [pos[p--] setImage:digit[22]]; + break; + case 105: + // i + if (p>=0) + [pos[p--] setImage:digit[23]]; + break; + case 98: + // b + if (p>=0) + [pos[p--] setImage:digit[32]]; + break; + case 100: + // d + if (p>=0) + [pos[p--] setImage:digit[31]]; + break; + case 104: + // h + if (p>=0) + [pos[p--] setImage:digit[30]]; + break; + case 65: + // A + if (p>=0) + [pos[p--] setImage:digit[33]]; + break; + case 67: + // C + if (p>=0) + [pos[p--] setImage:digit[34]]; + break; + case 70: + // F + if (p>=0) + [pos[p--] setImage:digit[35]]; + break; + default: + break; + } + } + + while (p>=0) { + [pos[p--] setImage:nil]; + } +} + +- (void) showFlagF: (BOOL) visible { + if (visible) { + [f setImage:digit[12]]; + } else { + [f setImage:nil]; + } +} + +- (void) showFlagG: (BOOL) visible { + if (visible) { + [g setImage:digit[13]]; + } else { + [g setImage:nil]; + } +} + +- (void) showFlagC: (BOOL) visible { + if (visible) { + [c setImage:digit[27]]; + } else { + [c setImage:nil]; + } +} + +- (void) showUser: (BOOL) visible { + if (visible) { + [user setImage:digit[25]]; + } else { + [user setImage:nil]; + } +} + +- (void) showBegin: (BOOL) visible { + if (visible) { + [begin setImage:digit[28]]; + } else { + [begin setImage:nil]; + } +} + +- (void) showDMY: (BOOL) visible { + if (visible) { + [dmy setImage:digit[29]]; + } else { + [dmy setImage:nil]; + } +} + +- (void) showPrgm: (BOOL) visible { + if (visible) { + [prgm setImage:digit[26]]; + } else { + [prgm setImage:nil]; + } +} + +- (void) showComma: (BOOL) visible position: (int) p { + if (visible) { + [comma[10-p] setImage:digit[11]]; + } else { + [comma[10-p] setImage:nil]; + } +} + +- (void) showDecimal: (BOOL) visible position: (int) p { + if (visible) { + [comma[10-p] setImage:digit[10]]; + } else { + [comma[10-p] setImage:nil]; + } +} + +- (void) setDeg { + [rad setImage:nil]; + [grad setImage:nil]; +} + +- (void) setRad { + [grad setImage:nil]; + [rad setImage:digit[15]]; +} + +- (void) setGrad { + [rad setImage:nil]; + [grad setImage:digit[14]]; +} + +void display_callback(struct nut_reg_t *nv) { + static unsigned long last[MAX_DIGIT_POSITION]; + segment_bitmap_t display_segments [MAX_DIGIT_POSITION]; + static segment_bitmap_t freeze [MAX_DIGIT_POSITION]; + static BOOL blink; + static int blinkCount = 0; + BOOL update = NO; + int i,j; + + // get a local copy of requested display + for (i=0; idisplay_segments[i]; + } + + if (! blink && nv->display_chip->blink && nv->display_chip->enable) { + // turn on blinking + blink = YES; + blinkCount = 0; + // make a frozen copy of the display to avoid uneven blinking + for (i=0; idisplay_chip->blink) && nv->display_chip->enable) { + // turn off blinking + blink = NO; + } + + // if display is paused, indicate macro running + if ([(DisplayView *)nv->display displayPaused]) { + blink = YES; + for (i=0; i 7 ) { + // wrap blink counter + blinkCount = 0; + } + if (blinkCount > 3 ) { + // blank display for second half of blink cycle + for (i=0; idisplay_segments[i] != 0) { + update = YES; + } + } + // always updated if display is off + if ( ! nv->awake) { + update = YES; + } + } + + if (update) { + // if we've been requested to update, only do it of the display has changed + update = NO; + for (i=0; idisplay showUser:((display_segments[i] & ~511) != 0)]; + break; + case 3: + [(DisplayView *)nv->display showFlagF:((display_segments[i] & ~511) != 0)]; + break; + case 4: + [(DisplayView *)nv->display showFlagG:((display_segments[i] & ~511) != 0)]; + break; + case 5: + [(DisplayView *)nv->display showBegin:((display_segments[i] & ~511) != 0)]; + break; + case 7: + if ((display_segments[7] & ~511) != 0) { + if ((display_segments[6] & ~511) != 0) { + [(DisplayView *)nv->display setGrad]; + } else { + [(DisplayView *)nv->display setRad]; + } + } else { + [(DisplayView *)nv->display setDeg]; + } + break; + case 8: + [(DisplayView *)nv->display showDMY:((display_segments[i] & ~511) != 0)]; + break; + case 9: + [(DisplayView *)nv->display showFlagC:((display_segments[i] & ~511) != 0)]; + break; + case 10: + [(DisplayView *)nv->display showPrgm:((display_segments[i] & ~511) != 0)]; + break; + } + } + + disp[j++] = '\x00'; + if (strncmp(disp, " Run", 5) == 0) { + disp[2] = 'r'; + } + [(DisplayView *)nv->display displayString:[NSString stringWithCString:disp]]; + // NSLog(@"[%s]", disp); + + for (i=0; i<11; i++) { + if ((display_segments[i] & 256) != 0) { + [(DisplayView *)nv->display showComma:YES position:i]; + } else if ((display_segments[i] & 384) == 128) { + [(DisplayView *)nv->display showDecimal:YES position:i]; + } else { + [(DisplayView *)nv->display showDecimal:NO position:i]; + } + } + } +} + +@end diff --git a/src/DisplayView.h b/src/DisplayView.h new file mode 100644 index 0000000..e91d4d1 --- /dev/null +++ b/src/DisplayView.h @@ -0,0 +1,58 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + +@interface DisplayView : UIImageView { + UIImage * digit[36]; + UIImageView * pos[11]; + UIImageView * comma[11]; + UIImageView * dp; + UIImageView * f; + UIImageView * g; + UIImageView * c; + UIImageView * grad; + UIImageView * rad; + UIImageView * user; + UIImageView * prgm; + UIImageView * begin; + UIImageView * dmy; + bool pause; +} + +- (void) displayString: (NSString *) str; +- (void) pauseDisplay:(bool) p; +- (bool) displayPaused; +- (void) showFlagF: (BOOL) visible; +- (void) showFlagG: (BOOL) visible; +- (void) showFlagC: (BOOL) visible; +- (void) showUser: (BOOL) visible; +- (void) showBegin: (BOOL) visible; +- (void) showDMY: (BOOL) visible; +- (void) showPrgm: (BOOL) visible; +- (void) showComma: (BOOL) visible position: (int) pos; +- (void) setDeg; +- (void) setRad; +- (void) setGrad; + +@end diff --git a/src/DisplayView.m b/src/DisplayView.m new file mode 100644 index 0000000..5a6e25d --- /dev/null +++ b/src/DisplayView.m @@ -0,0 +1,637 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + +//#import "CalculatorApp.h" +#import "DisplayView.h" + +#import "display.h" +#import "proc.h" +#import "digit_ops.h" +#import "voyager_lcd.h" +#import "proc_nut.h" + + + +@implementation DisplayView + +- (id) initWithFrame: (CGRect)frame { + //UIImage * test; + //UIImage * testi; + //NSData * testc; + //NSString * fname; + //NSURL * url; + //const char * pname; + + self = [super initWithFrame: frame]; + NSLog( @"calling: %s", __PRETTY_FUNCTION__ ); + + //[self setImage: [UIImage imageNamed: @"display.png"]]; + //[self setImage: [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"display" withExtension:@"png"].absoluteString substringFromIndex:7]]]; + + + //NSString *pathAndName = [NSString stringWithString:NSHomeDirectory()]; // stringByAppendingString:homeDir]; + //pathAndName = [pathAndName stringByAppendingString:@"/HP16.app/0.png"]; + + //url = [[NSBundle mainBundle] URLForResource:@"0" withExtension:@"png"]; + //fname=url.absoluteString; + //testi=[UIImage imageWithContentsOfFile:[fname substringFromIndex:7]]; + + //test=[UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"0" withExtension:@"png"].absoluteString substringFromIndex:7]]; + + //fname = url.relativeString; + //fname = @"~/0.png"; + //test = [UIImage imageNamed:@"0.png" inBundle:nil compatibleWithTraitCollection:nil]; + //testc = UIImagePNGRepresentation(test); + //testi = [UIImage imageWithData:testc]; + //testi = [UIImage imageWithData:UIImagePNGRepresentation([UIImage imageNamed:@"0.png" inBundle:nil compatibleWithTraitCollection:nil] )]; + //testi = [UIImage imageWithContentsOfFile:@"/Library/net.ihatewaiting.iphone.hpcalc/16c/0.png"]; + //testi = [UIImage imageWithContentsOfFile:@"/0.png"]; + //NSLog(@"%@", pathAndName); + // use imageWithContentsOfFile: instead of imageNamed: + // use -> [UIImage imageNamed:@"0.png" inBundle:nil compatibleWithTraitCollection:nil]; + // instead of -> [UIImage imageWithContentsOfFile:@"0.png"]; + // but this uses the cache, so images get replaced by other data => crashing + +//#define mGETIMAGE(fname) [UIImage imageWithData:UIImagePNGRepresentation([UIImage imageNamed:@"0.png" inBundle:nil compatibleWithTraitCollection:nil] )] + + + + digit[0] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"0" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[1] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"1" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[2] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"2" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[3] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"3" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[4] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"4" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[5] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"5" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[6] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"6" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[7] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"7" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[8] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"8" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[9] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"9" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[10] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"decimal" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[11] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"comma" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[12] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"f" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[13] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"g" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[14] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"grad" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[15] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"rad" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[16] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"neg" withExtension:@"png"].absoluteString substringFromIndex:7]]; + + digit[17] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"E" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[18] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"RR" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[19] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"O" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[20] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"r" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[21] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"u" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[22] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"n" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[23] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"i" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[24] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"P" withExtension:@"png"].absoluteString substringFromIndex:7]]; + + digit[25] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"user" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[26] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"prgm" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[27] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"c" withExtension:@"png"].absoluteString substringFromIndex:7]]; + + digit[28] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"begin" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[29] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"dmy" withExtension:@"png"].absoluteString substringFromIndex:7]]; + + digit[30] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"h" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[31] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"d" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[32] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"b" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[33] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"a" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[34] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"CC" withExtension:@"png"].absoluteString substringFromIndex:7]]; + digit[35] = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] URLForResource:@"FF" withExtension:@"png"].absoluteString substringFromIndex:7]]; + + // x,y,w,h + // w 26 + // h 21 + // x 240 - 211 = 29 + // y 97 - h = 76 + (h*21) = 76, 91, ... display positions (10) ... 265 + // original was layout portrait; then rotated + // original screen was 320 x 480 + + //#define DX 29 + //#define DY 76 + //#define DW 26 + //#define DH 21 + + // x,y,w,h = 74,24,314,52 + // DX = DisplayX + // DY = DisplayY + // DW = DisplayW + // DH = DisplayH + +#define DX 48 +#define DY 12 +#define DW 24 // character width +#define DH 32 +#define Da 2 // annunciator adjust + + int i; + for (i=0; i<11; i++) { + comma[11-i-1] = [[UIImageView alloc] initWithFrame:CGRectMake(DX+DW*i, DY, DW, DH)]; + [self addSubview: comma[11-i-1]]; + pos[11-i-1] = [[UIImageView alloc] initWithFrame:CGRectMake(DX+DW*i, DY, DW, DH)]; + //[self addSubview: pos[11-i-1]]; + //[self bringSubviewToFront:pos[11-i-1]]; + [self insertSubview:pos[11-i-1] aboveSubview:self]; + } + + // dp = [[UIImageView alloc] initWithFrame:CGRectMake(240 -211, 97+21*0, 26, 21)]; + // [self addSubview: dp]; + + // x 229 - 211 = 18 + + user = [[UIImageView alloc] initWithFrame:CGRectMake(91 +0, DY+DH-Da, 26, 11)]; + [self addSubview: user]; + f = [[UIImageView alloc] initWithFrame:CGRectMake(91 +30, DY+DH-Da, 6, 11)]; + [self addSubview: f]; + g = [[UIImageView alloc] initWithFrame:CGRectMake(91 +41, DY+DH-Da, 7, 11)]; + [self addSubview: g]; + begin = [[UIImageView alloc] initWithFrame:CGRectMake(91 +60, DY+DH-Da, 29, 11)]; + [self addSubview: begin]; + grad = [[UIImageView alloc] initWithFrame:CGRectMake(91 +100, DY+DH-Da, 17, 11)]; + [self addSubview: grad]; + rad = [[UIImageView alloc] initWithFrame:CGRectMake(91 +107, DY+DH-Da, 20, 11)]; + [self addSubview: rad]; + dmy = [[UIImageView alloc] initWithFrame:CGRectMake(91 +133, DY+DH-Da, 25, 11)]; + [self addSubview: dmy]; + c = [[UIImageView alloc] initWithFrame:CGRectMake(91 +164, DY+DH-Da, 8, 11)]; + [self addSubview: c]; + prgm = [[UIImageView alloc] initWithFrame:CGRectMake(91 +184, DY+DH-Da, 28, 11)]; + [self addSubview: prgm]; + + // set up to get Tap events (handleTapWithCount) + // KLS NOT iphone api - [self setTapDelegate: self]; + + pause = NO; + + NSLog(@"done initWithFrame"); + return self; +} + +- (void) pauseDisplay:(bool) p { + pause = p; +} + +- (bool) displayPaused { + return pause; +} + +- (void) displayString: (NSString *) str { + int p = 10; + + NSLog(@"displayString: %@ (%lu)", str, (unsigned long)[str length]); + + // [dp setImage:nil]; + + int i; + int charval; + for (i=0; i<[str length]; i++) { + charval=[str characterAtIndex:i]; + switch (charval) { + case 32: + // space + if (p>=0) + [pos[p--] setImage:nil]; + break; + case 45: + // - + if (p>=0) + [pos[p--] setImage:digit[16]]; + break; + // case 46: + // // . + // [dp setImage:digit[10]]; + // [dp setFrame:CGRectMake(240 -211, 97+21*(10-p-2), 26, 21)]; + // break; + case 48: // -48 = 0 + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: // -48 = 9 + // 0-9 + if (p>=0) + [pos[p--] setImage:digit[[str characterAtIndex:i]-48]]; + break; + case 69: + // E + if (p>=0) + [pos[p--] setImage:digit[17]]; + break; + case 79: + // O + if (p>=0) + [pos[p--] setImage:digit[19]]; + break; + case 80: + // P + if (p>=0) + [pos[p--] setImage:digit[24]]; + break; + case 82: + // R + if (p>=0) + [pos[p--] setImage:digit[18]]; + break; + case 114: + // r + if (p>=0) + [pos[p--] setImage:digit[20]]; + break; + case 117: + // u + if (p>=0) + [pos[p--] setImage:digit[21]]; + break; + case 110: + // n + if (p>=0) + [pos[p--] setImage:digit[22]]; + break; + case 105: + // i + if (p>=0) + [pos[p--] setImage:digit[23]]; + break; + case 98: + // b + if (p>=0) + [pos[p--] setImage:digit[32]]; + break; + case 100: + // d + if (p>=0) + [pos[p--] setImage:digit[31]]; + break; + case 104: + // h + if (p>=0) + [pos[p--] setImage:digit[30]]; + break; + case 65: + // A + if (p>=0) + [pos[p--] setImage:digit[33]]; + break; + case 67: + // C + if (p>=0) + [pos[p--] setImage:digit[34]]; + break; + case 70: + // F + if (p>=0) + [pos[p--] setImage:digit[35]]; + break; + default: + break; + } + } + + while (p>=0) { + [pos[p--] setImage:nil]; + } +} + +- (void) showFlagF: (BOOL) visible { + if (visible) { + [f setImage:digit[12]]; + } else { + [f setImage:nil]; + } +} + +- (void) showFlagG: (BOOL) visible { + if (visible) { + [g setImage:digit[13]]; + } else { + [g setImage:nil]; + } +} + +- (void) showFlagC: (BOOL) visible { + if (visible) { + [c setImage:digit[27]]; + } else { + [c setImage:nil]; + } +} + +- (void) showUser: (BOOL) visible { + if (visible) { + [user setImage:digit[25]]; + } else { + [user setImage:nil]; + } +} + +- (void) showBegin: (BOOL) visible { + if (visible) { + [begin setImage:digit[28]]; + } else { + [begin setImage:nil]; + } +} + +- (void) showDMY: (BOOL) visible { + if (visible) { + [dmy setImage:digit[29]]; + } else { + [dmy setImage:nil]; + } +} + +- (void) showPrgm: (BOOL) visible { + if (visible) { + [prgm setImage:digit[26]]; + } else { + [prgm setImage:nil]; + } +} + +- (void) showComma: (BOOL) visible position: (int) p { + if (visible) { + [comma[10-p] setImage:digit[11]]; + } else { + [comma[10-p] setImage:nil]; + } +} + +- (void) showDecimal: (BOOL) visible position: (int) p { + if (visible) { + [comma[10-p] setImage:digit[10]]; + } else { + [comma[10-p] setImage:nil]; + } +} + +- (void) setDeg { + [rad setImage:nil]; + [grad setImage:nil]; +} + +- (void) setRad { + [grad setImage:nil]; + [rad setImage:digit[15]]; +} + +- (void) setGrad { + [rad setImage:nil]; + [grad setImage:digit[14]]; +} + +void display_callback(struct nut_reg_t *nv) { + static unsigned long last[MAX_DIGIT_POSITION]; + segment_bitmap_t display_segments [MAX_DIGIT_POSITION]; + static segment_bitmap_t freeze [MAX_DIGIT_POSITION]; + static BOOL blink; + static int blinkCount = 0; + BOOL update = NO; + int i,j; + + // get a local copy of requested display + for (i=0; idisplay_segments[i]; + } + + if (! blink && nv->display_chip->blink && nv->display_chip->enable) { + // turn on blinking + blink = YES; + blinkCount = 0; + // make a frozen copy of the display to avoid uneven blinking + for (i=0; idisplay_chip->blink) && nv->display_chip->enable) { + // turn off blinking + blink = NO; + } + + // if display is paused, indicate macro running + if ([(__bridge DisplayView *)nv->display displayPaused]) { + blink = YES; + for (i=0; i 7 ) { + // wrap blink counter + blinkCount = 0; + } + if (blinkCount > 3 ) { + // blank display for second half of blink cycle + for (i=0; idisplay_segments[i] != 0) { + update = YES; + } + } + // always updated if display is off + if ( ! nv->awake) { + update = YES; + } + } + + if (update) { + // if we've been requested to update, only do it of the display has changed + update = NO; + for (i=0; idisplay showUser:((display_segments[i] & ~511) != 0)]; + break; + case 3: + [(__bridge DisplayView *)nv->display showFlagF:((display_segments[i] & ~511) != 0)]; + break; + case 4: + [(__bridge DisplayView *)nv->display showFlagG:((display_segments[i] & ~511) != 0)]; + break; + case 5: + [(__bridge DisplayView *)nv->display showBegin:((display_segments[i] & ~511) != 0)]; + break; + case 7: + if ((display_segments[7] & ~511) != 0) { + if ((display_segments[6] & ~511) != 0) { + [(__bridge DisplayView *)nv->display setGrad]; + } else { + [(__bridge DisplayView *)nv->display setRad]; + } + } else { + [(__bridge DisplayView *)nv->display setDeg]; + } + break; + case 8: + [(__bridge DisplayView *)nv->display showDMY:((display_segments[i] & ~511) != 0)]; + break; + case 9: + [(__bridge DisplayView *)nv->display showFlagC:((display_segments[i] & ~511) != 0)]; + break; + case 10: + [(__bridge DisplayView *)nv->display showPrgm:((display_segments[i] & ~511) != 0)]; + break; + } + } + + disp[j++] = '\x00'; + if (strncmp(disp, " Run", 5) == 0) { + disp[2] = 'r'; + } + [(__bridge DisplayView *)nv->display displayString:[NSString stringWithCString:disp encoding:NSASCIIStringEncoding]]; + NSLog(@"[%s]", disp); + + for (i=0; i<11; i++) { + if ((display_segments[i] & 256) != 0) { + [(__bridge DisplayView *)nv->display showComma:YES position:i]; + } else if ((display_segments[i] & 384) == 128) { + [(__bridge DisplayView *)nv->display showDecimal:YES position:i]; + } else { + [(__bridge DisplayView *)nv->display showDecimal:NO position:i]; + } + } + } +} + +@end diff --git a/src/digit_ops.c b/src/digit_ops.c new file mode 100644 index 0000000..355bf91 --- /dev/null +++ b/src/digit_ops.c @@ -0,0 +1,192 @@ +/* + $Id: digit_ops.c 692 2005-05-27 04:53:57Z eric $ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + + +#include +#include + +#include "digit_ops.h" + + +void reg_zero (digit_t *dest, int first, int last) +{ + int i; + for (i = first; i <= last; i++) + dest [i] = 0; +} + + +void reg_copy (digit_t *dest, const digit_t *src, int first, int last) +{ + int i; + for (i = first; i <= last; i++) + dest [i] = src [i]; +} + + +void reg_exch (digit_t *dest, digit_t *src, int first, int last) +{ + int i, t; + for (i = first; i <= last; i++) + { + t = dest [i]; + dest [i] = src [i]; + src [i] = t; + } +} + + +static digit_t do_add (digit_t x, digit_t y, bool *carry, uint8_t base) +{ + int res; + + res = x + y + *carry; + if (res >= base) + { + res -= base; + *carry = 1; + } + else + *carry = 0; + return (res); +} + + +static digit_t do_sub (digit_t x, digit_t y, bool *carry, uint8_t base) +{ + int res; + + res = (x - y) - *carry; + if (res < 0) + { + res += base; + *carry = 1; + } + else + *carry = 0; + return (res); +} + + +void reg_add (digit_t *dest, const digit_t *src1, const digit_t *src2, + int first, int last, + bool *carry, uint8_t base) +{ + int i; + + for (i = first; i <= last; i++) + { + int s2 = src2 ? src2 [i] : 0; + dest [i] = do_add (src1 [i], s2, carry, base); + } +} + + +void reg_sub (digit_t *dest, const digit_t *src1, const digit_t *src2, + int first, int last, + bool *carry, uint8_t base) +{ + int i; + + for (i = first; i <= last; i++) + { + int s1 = src1 ? src1 [i] : 0; + int s2 = src2 ? src2 [i] : 0; + int d = do_sub (s1, s2, carry, base); + if (dest) + dest [i] = d; + } +} + + +// $$$ if in decimal mode, do illegal digits get normalized? +void reg_test_equal (const digit_t *src1, const digit_t *src2, + int first, int last, + bool *carry) +{ + int i; + + *carry = true; + for (i = first; i <= last; i++) + { + int s2 = src2 ? src2 [i] : 0; + (*carry) &= (src1 [i] == s2); + } +} + + +// $$$ if in decimal mode, do illegal digits get normalized? +void reg_test_nonequal (const digit_t *src1, const digit_t *src2, + int first, int last, + bool *carry) +{ + int i; + + *carry = false; + for (i = first; i <= last; i++) + { + int s2 = src2 ? src2 [i] : 0; + (*carry) |= (src1 [i] != s2); + } +} + + +void reg_shift_right (digit_t *reg, int first, int last) +{ + int i; + + for (i = first; i <= last; i++) + reg [i] = (i == last) ? 0 : reg [i+1]; +} + + +void reg_shift_left (digit_t *reg, int first, int last) +{ + int i; + + for (i = last; i >= first; i--) + reg [i] = (i == first) ? 0 : reg [i-1]; +} + + +// BCD to native host binary and vice versa +uint64_t bcd_reg_to_binary (digit_t *reg, int digits) +{ + uint64_t val = 0; + + reg += digits; + while (digits--) + { + val *= 10; + val += *(--reg); + } + + return val; +} + +void binary_to_bcd_reg (uint64_t val, digit_t *reg, int digits) +{ + while (digits--) + { + *(reg++) = val % 10; + val /= 10; + } +} diff --git a/src/digit_ops.h b/src/digit_ops.h new file mode 100644 index 0000000..34b1cf0 --- /dev/null +++ b/src/digit_ops.h @@ -0,0 +1,57 @@ +/* + $Id: digit_ops.h 692 2005-05-27 04:53:57Z eric $ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + + +typedef uint8_t digit_t; + +void reg_zero (digit_t *dest, int first, int last); + +void reg_copy (digit_t *dest, const digit_t *src, int first, int last); + +void reg_exch (digit_t *dest, digit_t *src, int first, int last); + +void reg_add (digit_t *dest, const digit_t *src1, const digit_t *src2, + int first, int last, + bool *carry, uint8_t base); + +void reg_sub (digit_t *dest, const digit_t *src1, const digit_t *src2, + int first, int last, + bool *carry, uint8_t base); + +// sets carry if equal +void reg_test_equal (const digit_t *src1, const digit_t *src2, + int first, int last, + bool *carry); + +// sets carry if nonequal +void reg_test_nonequal (const digit_t *src1, const digit_t *src2, + int first, int last, + bool *carry); + +void reg_shift_right (digit_t *reg, int first, int last); + +void reg_shift_left (digit_t *reg, int first, int last); + + +// BCD to native host binary and vice versa +uint64_t bcd_reg_to_binary (digit_t *reg, int digits); + +void binary_to_bcd_reg (uint64_t val, digit_t *reg, int digits); diff --git a/src/display.h b/src/display.h new file mode 100644 index 0000000..02518f2 --- /dev/null +++ b/src/display.h @@ -0,0 +1,84 @@ +/* + $Id: display.h 708 2005-05-28 23:38:20Z eric $ + Copyright 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + + +#define MAX_DIGIT_POSITION 15 /* Classic, Topcat, 67, maybe 19C */ +/* Digit positions are numbered left to right, starting with 0. */ + +#define MAX_SEGMENT 18 /* 41C: 14 segment char, +3 segments punctuation, +1 annunciator */ + +/* Segments are stored as a bitmap, with the LSB being segment A. +See comments at the end of this header file. */ +typedef uint32_t segment_bitmap_t; + + +/* +* Display segments: + * + * For seven-segment displays, by convention the segments are labeled 'a' + * through 'g'. We designate the '.' and ',' as 'h' and 'i', respectively. + * + * aaa + * f b + * f b + * f b + * ggg + * e c + * e c + * e c hh + * ddd hh + * ii + * ii + * + * Not all calculators have the comma. Some calculators, particularly the + * classic series, put the '.' inside the seven segments, and dedicate a + * full digit position to the radix mark. + * + * For fourteen-segment displays, by convention the segments are + * labeled 'a' through 'n'. We designate '.' and ',' as 'o' and 'p', + * respectively. The second dot for the ':' is 'q'. The segment + * designations do not match the HP 1LA4 documentation, but rather are + * based on commercial 14-segment displays such as the Noritake + * AH1616A 14-segment VFD (though that does not have the second dot + * for the colon). + * + * aaaaaaa + * fl i kb qq + * f l i k b qq + * f lik b + * ggg hhh + * e njm c + * e n j m c + * en j mc oo + * ddddddd oo + * pp + * pp + * + */ + + +#define SEGMENTS_PERIOD (1 << 14) +#define SEGMENTS_COMMA ((1 << 14) | (1 << 15)) +#define SEGMENTS_COLON ((1 << 14) | (1 << 16)) + +#define SEGMENT_ANN (1 << 17) diff --git a/src/hpcalc (original).m b/src/hpcalc (original).m new file mode 100644 index 0000000..e128432 --- /dev/null +++ b/src/hpcalc (original).m @@ -0,0 +1,820 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + + +#import "define_hp16.h" +#import "hpcalc.h" +#import "DisplayView.h" + + +@implementation HPCalc + +- (id) init { + self = [super init]; + + _display = NULL; + _displayPaused = NO; + _cycles = 0; + + [self initKeystrokeDict]; + + //NSLog(@"HPCalc init"); + +#ifdef HP15C + nv = nut_new_processor(80, NULL); +#else + nv = nut_new_processor(40, NULL); +#endif + + //NSString *objFile = [NSString stringWithFormat:@"/Applications/%s.app/%s.obj", APPNAME, MODEL]; + NSString *objFile = [NSString stringWithFormat:@"/HP16.app/16c.obj"]; + NSString *pathAndName = [NSString stringWithString:NSHomeDirectory()]; // stringByAppendingString:homeDir]; + pathAndName = [pathAndName stringByAppendingString:objFile]; + //NSLog(@"%@", pathAndName); + nut_read_object_file(nv, [pathAndName cStringUsingEncoding:NSASCIIStringEncoding]); + + keyQueue = [[NSMutableArray alloc] init]; + + BOOL isDir; + if ( ! [[NSFileManager defaultManager] fileExistsAtPath:[@"~/Library/net.ihatewaiting.iphone.hpcalc" stringByExpandingTildeInPath] isDirectory:&isDir]) { + NSLog(@"Creating ~/Library/net.ihatewaiting.iphone.hpcalc"); + [[NSFileManager defaultManager] createDirectoryAtPath:[@"~/Library/net.ihatewaiting.iphone.hpcalc" stringByExpandingTildeInPath] attributes:nil]; + if ( ! [[NSFileManager defaultManager] fileExistsAtPath:[@CFGPATH stringByExpandingTildeInPath] isDirectory:&isDir]) { + NSLog(@"Creating %s", CFGPATH); + [[NSFileManager defaultManager] createDirectoryAtPath:[@CFGPATH stringByExpandingTildeInPath] attributes:nil]; + } + } + + if ( ! [self loadState] ) { + [self processKeypress:24]; // auto on + [self processKeypress:-1]; + [self processKeypress:129]; // clear Pr Error + [self processKeypress:-1]; + } else { + [self processKeypress:24]; // auto on + [self processKeypress:-1]; + [self processKeypress:24]; // auto on + [self processKeypress:-1]; + } + + [NSThread detachNewThreadSelector:@selector(tick) toTarget:self withObject:nil]; + + return self; +} + +- (id) initWithDisplay: (DisplayView *) dv { + [self init]; + _display = dv; + nv->display = dv; + + return self; +} + +- (void) shutdown { + [self saveState]; +} + +- (void) saveState { + //NSLog(@"saveState"); + NSString *name = [NSString stringWithFormat:[@"~/Library/net.ihatewaiting.iphone.hpcalc/%s/state" stringByExpandingTildeInPath], MODEL]; + FILE *fp = fopen([name cStringUsingEncoding:NSASCIIStringEncoding], "wb"); + fwrite(&(nv->a), sizeof(reg_t), 1, fp); + fwrite(&(nv->b), sizeof(reg_t), 1, fp); + fwrite(&(nv->c), sizeof(reg_t), 1, fp); + fwrite(&(nv->m), sizeof(reg_t), 1, fp); + fwrite(&(nv->n), sizeof(reg_t), 1, fp); + fwrite(&(nv->g), sizeof(digit_t), 2, fp); + fwrite(&(nv->q_sel), sizeof(bool), 1, fp); + fwrite(&(nv->fo), sizeof(uint8_t), 1, fp); + fwrite(&(nv->decimal), sizeof(bool), 1, fp); + fwrite(&(nv->carry), sizeof(bool), 1, fp); + fwrite(&(nv->prev_carry), sizeof(bool), 1, fp); + fwrite(&(nv->prev_tef_last), sizeof(int), 1, fp); + fwrite(&(nv->s), sizeof(bool), SSIZE, fp); + fwrite(&(nv->pc), sizeof(rom_addr_t), 1, fp); + fwrite(&(nv->prev_pc), sizeof(rom_addr_t), 1, fp); + fwrite(&(nv->stack), sizeof(rom_addr_t), STACK_DEPTH, fp); + fwrite(&(nv->cxisa_addr), sizeof(rom_addr_t), 1, fp); + fwrite(&(nv->inst_state), sizeof(inst_state_t), 1, fp); + fwrite(&(nv->first_word), sizeof(rom_word_t), 1, fp); + fwrite(&(nv->long_branch_carry), sizeof(bool), 1, fp); + fwrite(&(nv->key_down), sizeof(bool), 1, fp); + fwrite(&(nv->kb_state), sizeof(keyboard_state_t), 1, fp); + fwrite(&(nv->kb_debounce_cycle_counter), sizeof(int), 1, fp); + fwrite(&(nv->key_buf), sizeof(int), 1, fp); + fwrite(&(nv->awake), sizeof(bool), 1, fp); + fwrite(&(nv->bank_group), sizeof(int), MAX_PAGE, fp); + fwrite(&(nv->active_bank), sizeof(uint8_t), MAX_PAGE, fp); + fwrite(&(nv->ram_addr), sizeof(uint16_t), 1, fp); + fwrite(&(nv->max_pf), sizeof(uint16_t), 1, fp); + fwrite(&(nv->pf_addr), sizeof(uint8_t), 1, fp); + fwrite(&(nv->ext_flag), sizeof(bool), EXT_FLAG_SIZE, fp); + fwrite(&(nv->selprf), sizeof(uint8_t), 1, fp); + fwrite(&(nv->display_digits), sizeof(int), 1, fp); + fwrite(&(nv->display_segments), sizeof(segment_bitmap_t), MAX_DIGIT_POSITION, fp); + fwrite(&(nv->cycle_count), sizeof(uint64_t), 1, fp); + fwrite(&(nv->max_ram), sizeof(uint16_t), 1, fp); + fwrite(&(nv->max_rom), sizeof(int), 1, fp); + fwrite(&(nv->max_bank), sizeof(int), 1, fp); + fwrite(nv->ram, sizeof(reg_t), 1024, fp); + fwrite(nv->pf_exists, sizeof(bool), 256, fp); + fclose(fp); +} + +- (bool) loadState { + NSString *name = [NSString stringWithFormat:[@"~/Library/net.ihatewaiting.iphone.hpcalc/%s/state" stringByExpandingTildeInPath], MODEL]; + FILE *fp = fopen([name cStringUsingEncoding:NSASCIIStringEncoding], "rb"); + + if (!fp) { + return NO; + } + + fread(&(nv->a), sizeof(reg_t), 1, fp); + fread(&(nv->b), sizeof(reg_t), 1, fp); + fread(&(nv->c), sizeof(reg_t), 1, fp); + fread(&(nv->m), sizeof(reg_t), 1, fp); + fread(&(nv->n), sizeof(reg_t), 1, fp); + fread(&(nv->g), sizeof(digit_t), 2, fp); + fread(&(nv->q_sel), sizeof(bool), 1, fp); + fread(&(nv->fo), sizeof(uint8_t), 1, fp); + fread(&(nv->decimal), sizeof(bool), 1, fp); + fread(&(nv->carry), sizeof(bool), 1, fp); + fread(&(nv->prev_carry), sizeof(bool), 1, fp); + fread(&(nv->prev_tef_last), sizeof(int), 1, fp); + fread(&(nv->s), sizeof(bool), SSIZE, fp); + fread(&(nv->pc), sizeof(rom_addr_t), 1, fp); + fread(&(nv->prev_pc), sizeof(rom_addr_t), 1, fp); + fread(&(nv->stack), sizeof(rom_addr_t), STACK_DEPTH, fp); + fread(&(nv->cxisa_addr), sizeof(rom_addr_t), 1, fp); + fread(&(nv->inst_state), sizeof(inst_state_t), 1, fp); + fread(&(nv->first_word), sizeof(rom_word_t), 1, fp); + fread(&(nv->long_branch_carry), sizeof(bool), 1, fp); + fread(&(nv->key_down), sizeof(bool), 1, fp); + fread(&(nv->kb_state), sizeof(keyboard_state_t), 1, fp); + fread(&(nv->kb_debounce_cycle_counter), sizeof(int), 1, fp); + fread(&(nv->key_buf), sizeof(int), 1, fp); + fread(&(nv->awake), sizeof(bool), 1, fp); + fread(&(nv->bank_group), sizeof(int), MAX_PAGE, fp); + fread(&(nv->active_bank), sizeof(uint8_t), MAX_PAGE, fp); + fread(&(nv->ram_addr), sizeof(uint16_t), 1, fp); + fread(&(nv->max_pf), sizeof(uint16_t), 1, fp); + fread(&(nv->pf_addr), sizeof(uint8_t), 1, fp); + fread(&(nv->ext_flag), sizeof(bool), EXT_FLAG_SIZE, fp); + fread(&(nv->selprf), sizeof(uint8_t), 1, fp); + fread(&(nv->display_digits), sizeof(int), 1, fp); + fread(&(nv->display_segments), sizeof(segment_bitmap_t), MAX_DIGIT_POSITION, fp); + fread(&(nv->cycle_count), sizeof(uint64_t), 1, fp); + fread(&(nv->max_ram), sizeof(uint16_t), 1, fp); + fread(&(nv->max_rom), sizeof(int), 1, fp); + fread(&(nv->max_bank), sizeof(int), 1, fp); + fread(nv->ram, sizeof(reg_t), 1024, fp); + fread(nv->pf_exists, sizeof(bool), 256, fp); + fclose(fp); + + return YES; +} + +- (void) processKeypress: (int) code { + [keyQueue insertObject:[NSNumber numberWithInt:code] atIndex:0]; + //NSLog(@"keypress: %d",code); +} + +- (void) playMacro: (NSArray *) macro { + NSEnumerator *enumerator = [macro objectEnumerator]; + id keystroke; + + if (_display) { + [_display pauseDisplay:YES]; + } else { + _displayPaused = YES; + } + while (keystroke = [enumerator nextObject]) { + [self processKeypress:[keystroke intValue]]; + } + _macroInProgress = true; +} + +- (void) computeMacro: (NSArray *) macro { + NSString *disp; + int i, workingChars, ignoreChars, otherChars; + + [self playMacro:macro]; + + // wait for computation to complete + bool done = NO; + do { + [NSThread sleepForTimeInterval:0.05]; + disp = [self getDisplayString]; + workingChars = ignoreChars = otherChars = 0; + if ([disp length] >= 15) { + for (i=0; i<[disp length]; i++) { + switch ([disp characterAtIndex:i]) { + case 'R' : + case 'u' : + case 'n' : + case 'i' : + workingChars++; + break; + case ' ' : + ignoreChars++; + break; + default: + otherChars++; + break; + } + } + } + if ([self keyBufferIsEmpty] && workingChars <= 3 && otherChars > 0) { + done = YES; + } + // NSLog(@"|%@|", disp); + } while ( ! done); + + // NSLog(@" + %@", [self getDisplayString]); +} + +- (void) computeFromString:(NSString *) str { + int i; + NSMutableArray *keystrokes = [[NSMutableArray alloc] init]; + unsigned long long waitCycles = 500; + + NSArray *tokens = [[str lowercaseString] componentsSeparatedByString:@" "]; + + NSEnumerator *enumerator = [tokens objectEnumerator]; + id token; + while (token = [enumerator nextObject]) { + bool isNumeric = YES; + for (i=0; i<[token length]; i++) { + switch ([token characterAtIndex:i]) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + case '.': + case 'e': + break; + default: + isNumeric = NO; + break; + } + } + + if ([token length] == 1) + isNumeric = NO; + + if (isNumeric) { + // terminate digit entry + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"x<>y"]]; + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"x<>y"]]; + + bool neg = NO; + int mantissaLen = 0; + int expLen = 0; + bool inExp = NO; + for (i=0; i<[token length]; i++) { + switch ([token characterAtIndex:i]) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:[NSString stringWithFormat:@"%c", [token characterAtIndex:i]]]]; + if (!inExp) mantissaLen++; else expLen++; + break; + case '-': + if ( (!inExp && mantissaLen==0) || (inExp && expLen==0) ) + neg = YES; + break; + case '.': + if ( ! inExp) + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"."]]; + break; + case 'e': + if (neg) { + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"chs"]]; + neg = NO; + } + [keystrokes addObjectsFromArray:[NSArray arrayWithObjects:K_EEX, nil]]; + inExp = YES; + break; + default: + break; + } + } + if (neg) { + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"chs"]]; + } + + // terminate digit entry + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"x<>y"]]; + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"x<>y"]]; + } else { + if ([token isEqualToString:@"wait"]) { + [NSThread sleepForTimeInterval:1.0]; + } else { + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:token]]; + [self computeMacro:keystrokes]; + [keystrokes removeAllObjects]; + } + } + } + + if ([keystrokes count]) { + [self computeMacro:keystrokes]; + [keystrokes removeAllObjects]; + } + + unsigned long long cycles = [self cpuCycles]; + while ( [self cpuCycles] - cycles < waitCycles ) { + // wait for final display update to complete + [NSThread sleepForTimeInterval:0.1]; + } + +} + +- (bool) keyBufferIsEmpty { + return ([keyQueue count] > 0 ? NO : YES); +} + +- (void) tick { + NSAutoreleasePool* p = [[NSAutoreleasePool alloc] init]; + + [NSThread setThreadPriority:0.5]; // 1.0 highest; 0.0 lowest was=0.25 + int n=0; + while (1) { + [NSThread sleepForTimeInterval:0.02]; // seconds was=0.05 + if (_display) { + [self performSelectorOnMainThread:@selector(readKeys) withObject:nil waitUntilDone:YES]; + [self performSelectorOnMainThread:@selector(executeCycle) withObject:nil waitUntilDone:YES]; + if (n++ % 2 == 0) { + [self performSelectorOnMainThread:@selector(updateDisplay) withObject:nil waitUntilDone:YES]; + } + } else { + [self readKeys]; + [self executeCycle]; + if (n++ % 2 == 0) { + [self updateDisplay]; + } + } + } + + [p release]; +} + +- (void) updateDisplay { + display_callback(nv); +} + +- (id) getDisplayString { + int i; + NSMutableString * disp = [[NSMutableString alloc] init]; + + for (i=0; idisplay_segments[i] & 127) { + case 64: [disp appendString:@"-"]; break; + case 63: [disp appendString:@"0"]; break; + case 6: [disp appendString:@"1"]; break; + case 91: [disp appendString:@"2"]; break; + case 79: [disp appendString:@"3"]; break; + case 102: [disp appendString:@"4"]; break; + case 109: [disp appendString:@"5"]; break; + case 125: [disp appendString:@"6"]; break; + case 7: [disp appendString:@"7"]; break; + case 127: [disp appendString:@"8"]; break; + case 111: [disp appendString:@"9"]; break; + case 115: [disp appendString:@"P"]; break; + case 121: [disp appendString:@"E"]; break; + case 2: [disp appendString:@"i"]; break; + case 35: [disp appendString:@"n"]; break; + case 92: [disp appendString:@"O"]; break; + case 80: [disp appendString:@"R"]; break; + case 33: [disp appendString:@"r"]; break; + case 98: [disp appendString:@"u"]; break; + case 124: [disp appendString:@"b"]; break; + case 94: [disp appendString:@"d"]; break; + case 116: [disp appendString:@"h"]; break; + case 119: [disp appendString:@"A"]; break; + case 57: [disp appendString:@"C"]; break; + case 113: [disp appendString:@"F"]; break; + case 0: [disp appendString:@" "]; break; + default: + break; + } + if (nv->display_segments[i] & 256) { + [disp appendString:@","]; + } else if (nv->display_segments[i] & 128) { + [disp appendString:@"."]; + } + } + + return disp; +} + +- (void) executeCycle { + int i=500; + while (i-- > 0) { + nut_execute_instruction(nv); + _cycles++; + } +} + +- (unsigned long long) cpuCycles { + return _cycles; +} + +- (void) readKeys { + static int delay = 0; + int key; + + if ([keyQueue count] == 0 && _macroInProgress) { + if (_display) { + [_display pauseDisplay:NO]; + } else { + _displayPaused = NO; + } + _macroInProgress = false; + } + + if (delay) { + delay--; + } else { + if ([keyQueue lastObject]) { + key = [[keyQueue lastObject] intValue]; + [keyQueue removeLastObject]; + if (key >= 0) { + nut_press_key(nv, key); + } else { + nut_release_key(nv); + } + + if (key == -1) { + if ([keyQueue lastObject]) { + key = [[keyQueue lastObject] intValue]; + [keyQueue removeLastObject]; + if (key >= 0) { + nut_press_key(nv, key); + } else { + nut_release_key(nv); + } + delay = 1; + } + } + } + } +} + +- (void) initKeystrokeDict { + NSMutableDictionary *kd = [[NSMutableDictionary alloc] init]; + + // + // Row 4 + // + + [kd setObject:[NSArray arrayWithObjects:K_SQRT, nil] forKey:@"sqrt"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_A, nil] forKey:@"a"]; + [kd setObject:[NSArray arrayWithObjects:K_X_2, nil] forKey:@"x^2"]; +#endif +#endif + +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_E_X, nil] forKey:@"e^x"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_B, nil] forKey:@"b"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_LN, nil] forKey:@"ln"]; +#endif + +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_10_X, nil] forKey:@"10^x"]; + [kd setObject:[NSArray arrayWithObjects:K_C, nil] forKey:@"c"]; + [kd setObject:[NSArray arrayWithObjects:K_LOG, nil] forKey:@"log"]; +#endif +#endif + +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_Y_X, nil] forKey:@"y^x"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_D, nil] forKey:@"d"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_PCT, nil] forKey:@"%"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_1_X, nil] forKey:@"1/x"]; +#ifndef HP16C +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_E, nil] forKey:@"e"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_DELTA_PCT, nil] forKey:@"delta%"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_CHS, nil] forKey:@"chs"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_MATRIX, nil] forKey:@"matrix"]; +#endif +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_ABS, nil] forKey:@"abs"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_7, nil] forKey:@"7"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_FIX, nil] forKey:@"fix"]; + [kd setObject:[NSArray arrayWithObjects:K_DEG, nil] forKey:@"deg"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_8, nil] forKey:@"8"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_SCI, nil] forKey:@"sci"]; + [kd setObject:[NSArray arrayWithObjects:K_RAD, nil] forKey:@"rad"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_9, nil] forKey:@"9"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_ENG, nil] forKey:@"eng"]; + [kd setObject:[NSArray arrayWithObjects:K_GRAD, nil] forKey:@"grad"]; + [kd setObject:[NSArray arrayWithObjects:K_GRAD, nil] forKey:@"grd"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_DIV, nil] forKey:@"/"]; + [kd setObject:[NSArray arrayWithObjects:K_DIV, nil] forKey:@"div"]; + [kd setObject:[NSArray arrayWithObjects:K_DIV, nil] forKey:@"divide"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_SOLVE, nil] forKey:@"solve"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_X_LE_Y, nil] forKey:@"x<=y"]; + + // + // Row 3 + // + + [kd setObject:[NSArray arrayWithObjects:K_SST, nil] forKey:@"sst"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_LBL, nil] forKey:@"lbl"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_BST, nil] forKey:@"bst"]; + + [kd setObject:[NSArray arrayWithObjects:K_GTO, nil] forKey:@"gto"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_HYP, nil] forKey:@"hyp"]; + [kd setObject:[NSArray arrayWithObjects:K_AHYP, nil] forKey:@"hyp-1"]; + [kd setObject:[NSArray arrayWithObjects:K_AHYP, nil] forKey:@"ahyp"]; +#endif +#endif + +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_SIN, nil] forKey:@"sin"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_DIM, nil] forKey:@"dim"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_ASIN, nil] forKey:@"sin-1"]; + [kd setObject:[NSArray arrayWithObjects:K_ASIN, nil] forKey:@"asin"]; + + [kd setObject:[NSArray arrayWithObjects:K_COS, nil] forKey:@"cos"]; + [kd setObject:[NSArray arrayWithObjects:K_ACOS, nil] forKey:@"cos-1"]; + [kd setObject:[NSArray arrayWithObjects:K_ACOS, nil] forKey:@"acos"]; + + [kd setObject:[NSArray arrayWithObjects:K_TAN, nil] forKey:@"tan"]; + [kd setObject:[NSArray arrayWithObjects:K_ATAN, nil] forKey:@"tan-1"]; + [kd setObject:[NSArray arrayWithObjects:K_ATAN, nil] forKey:@"atan"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_I, nil] forKey:@"i"]; + [kd setObject:[NSArray arrayWithObjects:K_PAREN_I, nil] forKey:@"(i)"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_EEX, nil] forKey:@"eex"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_RESULT, nil] forKey:@"result"]; +#endif +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_PI, nil] forKey:@"pi"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_4, nil] forKey:@"4"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_X_EXCH, nil] forKey:@"x<>"]; +#endif +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_SF, nil] forKey:@"sf"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_5, nil] forKey:@"5"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_DSE, nil] forKey:@"dse"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_CF, nil] forKey:@"cf"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_6, nil] forKey:@"6"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_ISG, nil] forKey:@"isg"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_F_TEST, nil] forKey:@"f?"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_MULT, nil] forKey:@"*"]; + [kd setObject:[NSArray arrayWithObjects:K_MULT, nil] forKey:@"mult"]; + [kd setObject:[NSArray arrayWithObjects:K_MULT, nil] forKey:@"multiply"]; + [kd setObject:[NSArray arrayWithObjects:K_MULT, nil] forKey:@"product"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_INTEG_XY, nil] forKey:@"integrate"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_X_EQ_0, nil] forKey:@"x=0"]; + [kd setObject:[NSArray arrayWithObjects:K_X_EQ_0, nil] forKey:@"x==0"]; + + // + // Row 2 + // + + [kd setObject:[NSArray arrayWithObjects:K_R_S, nil] forKey:@"r/s"]; + [kd setObject:[NSArray arrayWithObjects:K_PSE, nil] forKey:@"pse"]; + [kd setObject:[NSArray arrayWithObjects:K_P_R, nil] forKey:@"p/r"]; + +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_GSB, nil] forKey:@"gsb"]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_CLR_SIG, nil] forKey:@"clrsigma"]; + [kd setObject:[NSArray arrayWithObjects:K_CLR_SIG, nil] forKey:@"clrsig"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_RTN, nil] forKey:@"rtn"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_R_DOWN, nil] forKey:@"rdown"]; + [kd setObject:[NSArray arrayWithObjects:K_CLR_PRGM, nil] forKey:@"clrprgm"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_R_UP, nil] forKey:@"rup"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_X_EXCH_Y, nil] forKey:@"x<>y"]; + [kd setObject:[NSArray arrayWithObjects:K_CLR_REG, nil] forKey:@"clrreg"]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_RND, nil] forKey:@"rnd"]; +#endif + +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_DEL, nil] forKey:@"del"]; + [kd setObject:[NSArray arrayWithObjects:K_DEL, nil] forKey:@"bsp"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_CLR_PREFIX, nil] forKey:@"clrprefix"]; + [kd setObject:[NSArray arrayWithObjects:K_CLR_X, nil] forKey:@"clx"]; + + [kd setObject:[NSArray arrayWithObjects:K_1, nil] forKey:@"1"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_TO_R, nil] forKey:@"tor"]; + [kd setObject:[NSArray arrayWithObjects:K_TO_P, nil] forKey:@"top"]; +#endif +#endif + [kd setObject:[NSArray arrayWithObjects:K_2, nil] forKey:@"2"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_TO_HMS, nil] forKey:@"tohms"]; + [kd setObject:[NSArray arrayWithObjects:K_TO_H, nil] forKey:@"toh"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_3, nil] forKey:@"3"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_TO_RAD, nil] forKey:@"torad"]; + [kd setObject:[NSArray arrayWithObjects:K_TO_DEG, nil] forKey:@"todeg"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_MINUS, nil] forKey:@"-"]; + [kd setObject:[NSArray arrayWithObjects:K_MINUS, nil] forKey:@"minus"]; + [kd setObject:[NSArray arrayWithObjects:K_MINUS, nil] forKey:@"subtract"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_RE_EXCH_IM, nil] forKey:@"re<>im"]; + [kd setObject:[NSArray arrayWithObjects:K_TEST, nil] forKey:@"test"]; +#endif + + // + // Row 1 + // + + [kd setObject:[NSArray arrayWithObjects:K_ON, nil] forKey:@"on"]; + + [kd setObject:[NSArray arrayWithObjects:K_F, nil] forKey:@"f"]; + + [kd setObject:[NSArray arrayWithObjects:K_G, nil] forKey:@"g"]; + + [kd setObject:[NSArray arrayWithObjects:K_STO, nil] forKey:@"sto"]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_FRAC, nil] forKey:@"frac"]; + [kd setObject:[NSArray arrayWithObjects:K_INT, nil] forKey:@"int"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_RCL, nil] forKey:@"rcl"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_USER, nil] forKey:@"user"]; +#endif +#endif + [kd setObject:[NSArray arrayWithObjects:K_MEM, nil] forKey:@"mem"]; + + [kd setObject:[NSArray arrayWithObjects:K_ENTER, nil] forKey:@"enter"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_RAND, nil] forKey:@"rand"]; + [kd setObject:[NSArray arrayWithObjects:K_RAND, nil] forKey:@"ran#"]; +#endif +#endif + [kd setObject:[NSArray arrayWithObjects:K_LAST_X, nil] forKey:@"lastx"]; + [kd setObject:[NSArray arrayWithObjects:K_LAST_X, nil] forKey:@"lstx"]; + + [kd setObject:[NSArray arrayWithObjects:K_0, nil] forKey:@"0"]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_FACT, nil] forKey:@"fact"]; + [kd setObject:[NSArray arrayWithObjects:K_FACT, nil] forKey:@"factorial"]; + [kd setObject:[NSArray arrayWithObjects:K_FACT, nil] forKey:@"!"]; + [kd setObject:[NSArray arrayWithObjects:K_XBAR, nil] forKey:@"xbar"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_DECIMAL, nil] forKey:@"."]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_YHAT_R, nil] forKey:@"yhatr"]; + [kd setObject:[NSArray arrayWithObjects:K_YHAT_R, nil] forKey:@"yhat,r"]; + [kd setObject:[NSArray arrayWithObjects:K_S, nil] forKey:@"s"]; +#endif + +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_SIG_PLUS, nil] forKey:@"sigmaplus"]; + [kd setObject:[NSArray arrayWithObjects:K_SIG_PLUS, nil] forKey:@"sigma+"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_LR, nil] forKey:@"lr"]; + [kd setObject:[NSArray arrayWithObjects:K_LR, nil] forKey:@"l.r."]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_SIG_MINUS, nil] forKey:@"sigmaminus"]; + [kd setObject:[NSArray arrayWithObjects:K_SIG_MINUS, nil] forKey:@"sigma-"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_PLUS, nil] forKey:@"+"]; + [kd setObject:[NSArray arrayWithObjects:K_PLUS, nil] forKey:@"add"]; + [kd setObject:[NSArray arrayWithObjects:K_PLUS, nil] forKey:@"sum"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_P_Y_X, nil] forKey:@"pyx"]; + [kd setObject:[NSArray arrayWithObjects:K_P_Y_X, nil] forKey:@"py,x"]; + [kd setObject:[NSArray arrayWithObjects:K_P_Y_X, nil] forKey:@"p(y,x)"]; + [kd setObject:[NSArray arrayWithObjects:K_C_Y_X, nil] forKey:@"cyx"]; + [kd setObject:[NSArray arrayWithObjects:K_C_Y_X, nil] forKey:@"cy,x"]; + [kd setObject:[NSArray arrayWithObjects:K_C_Y_X, nil] forKey:@"c(y,x)"]; +#endif +#endif + +#ifdef HP16C + [kd setObject:[NSArray arrayWithObjects:K_FLOAT, nil] forKey:@"float"]; +#endif + + _keystrokeDictionary = [[NSDictionary dictionaryWithDictionary:kd] retain]; +} + +@end \ No newline at end of file diff --git a/src/hpcalc.h b/src/hpcalc.h new file mode 100644 index 0000000..3b8bf0d --- /dev/null +++ b/src/hpcalc.h @@ -0,0 +1,76 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* +* Copyright (c) 2007, Thomas Fors +* All rights reserved. +*/ + +#import +#import + +@class DisplayView; + +#import "display.h" +#import "proc.h" +#import "digit_ops.h" +#import "voyager_lcd.h" +#import "proc_nut.h" + +#define NNPR_CLOCK 215000.0 +#define NNPR_WSIZE 56.0 + + +typedef enum PowerState: NSUInteger { + OFF, + ON +} PowerState; + + +@interface HPCalc : NSObject { + DisplayView * _display; + nut_reg_t * nv; + NSMutableArray * keyQueue; + bool _macroInProgress; + unsigned long long _cycles; + bool _displayPaused; + NSDictionary * _keystrokeDictionary; + NSMutableDictionary * _preferences; +@public + PowerState _PWR; +} + +- (void) updateDisplay; +- (id) getDisplayString; +- (unsigned long long) cpuCycles; +- (id) initWithDisplay: (DisplayView *) dv; +- (void) processKeypress: (int) code; +- (void) playMacro: (NSArray *) macro; +- (void) computeMacro: (NSArray *) macro; +- (void) computeFromString:(NSString *) str; +- (bool) keyBufferIsEmpty; +- (void) executeCycle; +- (void) readKeys; +- (void) saveState; +- (bool) loadState; +- (void) shutdown; +- (void) initKeystrokeDict; + +@end diff --git a/src/hpcalc.m b/src/hpcalc.m new file mode 100644 index 0000000..f42b321 --- /dev/null +++ b/src/hpcalc.m @@ -0,0 +1,832 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + + +#import "define_hp16.h" +#import "hpcalc.h" +#import "DisplayView.h" + + +@implementation HPCalc + +- (id) init { + self = [super init]; + + _display = NULL; + _displayPaused = NO; + _cycles = 0; + _PWR = ON; + + [self initKeystrokeDict]; + + //NSLog(@"HPCalc init"); + +#ifdef HP15C + nv = nut_new_processor(80, NULL); +#else + nv = nut_new_processor(40, NULL); +#endif + + //NSString *objFile = [NSString stringWithFormat:@"/Applications/%s.app/%s.obj", APPNAME, MODEL]; + //NSString *objFile = [NSString stringWithFormat:@"/HP16.app/16c.obj"]; + //NSString *pathAndName = [NSString stringWithString:NSHomeDirectory()]; // stringByAppendingString:homeDir]; + //pathAndName = [pathAndName stringByAppendingString:objFile]; + NSString* pathAndName = [[NSBundle mainBundle] pathForResource:@"16c" + ofType:@"obj"]; + NSLog(@"microcode: %@", pathAndName); + nut_read_object_file(nv, [pathAndName cStringUsingEncoding:NSASCIIStringEncoding]); + + keyQueue = [[NSMutableArray alloc] init]; + + BOOL isDir; + if ( ! [[NSFileManager defaultManager] fileExistsAtPath:[@"~/Library/net.ihatewaiting.iphone.hpcalc" stringByExpandingTildeInPath] isDirectory:&isDir]) { + NSLog(@"Creating ~/Library/net.ihatewaiting.iphone.hpcalc"); + [[NSFileManager defaultManager] createDirectoryAtPath:[@"~/Library/net.ihatewaiting.iphone.hpcalc" stringByExpandingTildeInPath] withIntermediateDirectories:YES attributes:nil error:NULL]; + if ( ! [[NSFileManager defaultManager] fileExistsAtPath:[@CFGPATH stringByExpandingTildeInPath] isDirectory:&isDir]) { + NSLog(@"Creating %s", CFGPATH); + [[NSFileManager defaultManager] createDirectoryAtPath:[@CFGPATH stringByExpandingTildeInPath] withIntermediateDirectories:YES attributes:nil error:NULL]; + } + } + +#define AUTO On +#ifdef AUTO + if ( ! [self loadState] ) { + [self processKeypress:24]; // auto on + [self processKeypress:-1]; + [self processKeypress:129]; // clear Pr Error + [self processKeypress:-1]; + } else { + [self processKeypress:24]; // auto on + [self processKeypress:-1]; + [self processKeypress:24]; // auto on + [self processKeypress:-1]; + } +#endif + + [NSThread detachNewThreadSelector:@selector(tick) toTarget:self withObject:nil]; + + return self; +} + +- (id) initWithDisplay: (DisplayView *) dv { + self = [self init]; + _display = dv; + nv->display = (__bridge void *)(dv); + + return self; +} + +- (void) shutdown { + [self saveState]; +} + +- (void) saveState { + //NSLog(@"saveState"); + NSString *name = [NSString stringWithFormat:[@"~/Library/net.ihatewaiting.iphone.hpcalc/%s/state" stringByExpandingTildeInPath], MODEL]; + FILE *fp = fopen([name cStringUsingEncoding:NSASCIIStringEncoding], "wb"); + fwrite(&(nv->a), sizeof(reg_t), 1, fp); + fwrite(&(nv->b), sizeof(reg_t), 1, fp); + fwrite(&(nv->c), sizeof(reg_t), 1, fp); + fwrite(&(nv->m), sizeof(reg_t), 1, fp); + fwrite(&(nv->n), sizeof(reg_t), 1, fp); + fwrite(&(nv->g), sizeof(digit_t), 2, fp); + fwrite(&(nv->q_sel), sizeof(bool), 1, fp); + fwrite(&(nv->fo), sizeof(uint8_t), 1, fp); + fwrite(&(nv->decimal), sizeof(bool), 1, fp); + fwrite(&(nv->carry), sizeof(bool), 1, fp); + fwrite(&(nv->prev_carry), sizeof(bool), 1, fp); + fwrite(&(nv->prev_tef_last), sizeof(int), 1, fp); + fwrite(&(nv->s), sizeof(bool), SSIZE, fp); + fwrite(&(nv->pc), sizeof(rom_addr_t), 1, fp); + fwrite(&(nv->prev_pc), sizeof(rom_addr_t), 1, fp); + fwrite(&(nv->stack), sizeof(rom_addr_t), STACK_DEPTH, fp); + fwrite(&(nv->cxisa_addr), sizeof(rom_addr_t), 1, fp); + fwrite(&(nv->inst_state), sizeof(inst_state_t), 1, fp); + fwrite(&(nv->first_word), sizeof(rom_word_t), 1, fp); + fwrite(&(nv->long_branch_carry), sizeof(bool), 1, fp); + fwrite(&(nv->key_down), sizeof(bool), 1, fp); + fwrite(&(nv->kb_state), sizeof(keyboard_state_t), 1, fp); + fwrite(&(nv->kb_debounce_cycle_counter), sizeof(int), 1, fp); + fwrite(&(nv->key_buf), sizeof(int), 1, fp); + fwrite(&(nv->awake), sizeof(bool), 1, fp); + fwrite(&(nv->bank_group), sizeof(int), MAX_PAGE, fp); + fwrite(&(nv->active_bank), sizeof(uint8_t), MAX_PAGE, fp); + fwrite(&(nv->ram_addr), sizeof(uint16_t), 1, fp); + fwrite(&(nv->max_pf), sizeof(uint16_t), 1, fp); + fwrite(&(nv->pf_addr), sizeof(uint8_t), 1, fp); + fwrite(&(nv->ext_flag), sizeof(bool), EXT_FLAG_SIZE, fp); + fwrite(&(nv->selprf), sizeof(uint8_t), 1, fp); + fwrite(&(nv->display_digits), sizeof(int), 1, fp); + fwrite(&(nv->display_segments), sizeof(segment_bitmap_t), MAX_DIGIT_POSITION, fp); + fwrite(&(nv->cycle_count), sizeof(uint64_t), 1, fp); + fwrite(&(nv->max_ram), sizeof(uint16_t), 1, fp); + fwrite(&(nv->max_rom), sizeof(int), 1, fp); + fwrite(&(nv->max_bank), sizeof(int), 1, fp); + fwrite(nv->ram, sizeof(reg_t), 1024, fp); + fwrite(nv->pf_exists, sizeof(bool), 256, fp); + fclose(fp); +} + +- (bool) loadState { + NSString *name = [NSString stringWithFormat:[@"~/Library/net.ihatewaiting.iphone.hpcalc/%s/state" stringByExpandingTildeInPath], MODEL]; + FILE *fp = fopen([name cStringUsingEncoding:NSASCIIStringEncoding], "rb"); + + if (!fp) { + NSLog(@"loadState - no file!"); + return NO; + } + + fread(&(nv->a), sizeof(reg_t), 1, fp); + fread(&(nv->b), sizeof(reg_t), 1, fp); + fread(&(nv->c), sizeof(reg_t), 1, fp); + fread(&(nv->m), sizeof(reg_t), 1, fp); + fread(&(nv->n), sizeof(reg_t), 1, fp); + fread(&(nv->g), sizeof(digit_t), 2, fp); + fread(&(nv->q_sel), sizeof(bool), 1, fp); + fread(&(nv->fo), sizeof(uint8_t), 1, fp); + fread(&(nv->decimal), sizeof(bool), 1, fp); + fread(&(nv->carry), sizeof(bool), 1, fp); + fread(&(nv->prev_carry), sizeof(bool), 1, fp); + fread(&(nv->prev_tef_last), sizeof(int), 1, fp); + fread(&(nv->s), sizeof(bool), SSIZE, fp); + fread(&(nv->pc), sizeof(rom_addr_t), 1, fp); + fread(&(nv->prev_pc), sizeof(rom_addr_t), 1, fp); + fread(&(nv->stack), sizeof(rom_addr_t), STACK_DEPTH, fp); + fread(&(nv->cxisa_addr), sizeof(rom_addr_t), 1, fp); + fread(&(nv->inst_state), sizeof(inst_state_t), 1, fp); + fread(&(nv->first_word), sizeof(rom_word_t), 1, fp); + fread(&(nv->long_branch_carry), sizeof(bool), 1, fp); + fread(&(nv->key_down), sizeof(bool), 1, fp); + fread(&(nv->kb_state), sizeof(keyboard_state_t), 1, fp); + fread(&(nv->kb_debounce_cycle_counter), sizeof(int), 1, fp); + fread(&(nv->key_buf), sizeof(int), 1, fp); + fread(&(nv->awake), sizeof(bool), 1, fp); + fread(&(nv->bank_group), sizeof(int), MAX_PAGE, fp); + fread(&(nv->active_bank), sizeof(uint8_t), MAX_PAGE, fp); + fread(&(nv->ram_addr), sizeof(uint16_t), 1, fp); + fread(&(nv->max_pf), sizeof(uint16_t), 1, fp); + fread(&(nv->pf_addr), sizeof(uint8_t), 1, fp); + fread(&(nv->ext_flag), sizeof(bool), EXT_FLAG_SIZE, fp); + fread(&(nv->selprf), sizeof(uint8_t), 1, fp); + fread(&(nv->display_digits), sizeof(int), 1, fp); + fread(&(nv->display_segments), sizeof(segment_bitmap_t), MAX_DIGIT_POSITION, fp); + fread(&(nv->cycle_count), sizeof(uint64_t), 1, fp); + fread(&(nv->max_ram), sizeof(uint16_t), 1, fp); + fread(&(nv->max_rom), sizeof(int), 1, fp); + fread(&(nv->max_bank), sizeof(int), 1, fp); + fread(nv->ram, sizeof(reg_t), 1024, fp); + fread(nv->pf_exists, sizeof(bool), 256, fp); + fclose(fp); + + return YES; +} + +- (void) processKeypress: (int) code { + [keyQueue insertObject:[NSNumber numberWithInt:code] atIndex:0]; + NSLog(@"processKeypress: %d",code); +} + +- (void) playMacro: (NSArray *) macro { + NSEnumerator *enumerator = [macro objectEnumerator]; + id keystroke; + + if (_display) { + [_display pauseDisplay:YES]; + } else { + _displayPaused = YES; + } + while (keystroke = [enumerator nextObject]) { + [self processKeypress:[keystroke intValue]]; + } + _macroInProgress = true; +} + +- (void) computeMacro: (NSArray *) macro { + NSString *disp; + int i, workingChars, ignoreChars, otherChars; + + [self playMacro:macro]; + + // wait for computation to complete + bool done = NO; + do { + [NSThread sleepForTimeInterval:0.05]; + disp = [self getDisplayString]; + workingChars = ignoreChars = otherChars = 0; + if ([disp length] >= 15) { + for (i=0; i<[disp length]; i++) { + switch ([disp characterAtIndex:i]) { + case 'R' : + case 'u' : + case 'n' : + case 'i' : + workingChars++; + break; + case ' ' : + ignoreChars++; + break; + default: + otherChars++; + break; + } + } + } + if ([self keyBufferIsEmpty] && workingChars <= 3 && otherChars > 0) { + done = YES; + } + // NSLog(@"|%@|", disp); + } while ( ! done); + + // NSLog(@" + %@", [self getDisplayString]); +} + +- (void) computeFromString:(NSString *) str { + int i; + NSMutableArray *keystrokes = [[NSMutableArray alloc] init]; + unsigned long long waitCycles = 500; + + NSArray *tokens = [[str lowercaseString] componentsSeparatedByString:@" "]; + + NSEnumerator *enumerator = [tokens objectEnumerator]; + id token; + while (token = [enumerator nextObject]) { + bool isNumeric = YES; + for (i=0; i<[token length]; i++) { + switch ([token characterAtIndex:i]) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '-': + case '.': + case 'e': + break; + default: + isNumeric = NO; + break; + } + } + + if ([token length] == 1) + isNumeric = NO; + + if (isNumeric) { + // terminate digit entry + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"x<>y"]]; + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"x<>y"]]; + + bool neg = NO; + int mantissaLen = 0; + int expLen = 0; + bool inExp = NO; + for (i=0; i<[token length]; i++) { + switch ([token characterAtIndex:i]) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:[NSString stringWithFormat:@"%c", [token characterAtIndex:i]]]]; + if (!inExp) mantissaLen++; else expLen++; + break; + case '-': + if ( (!inExp && mantissaLen==0) || (inExp && expLen==0) ) + neg = YES; + break; + case '.': + if ( ! inExp) + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"."]]; + break; + case 'e': + if (neg) { + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"chs"]]; + neg = NO; + } + [keystrokes addObjectsFromArray:[NSArray arrayWithObjects:K_EEX, nil]]; + inExp = YES; + break; + default: + break; + } + } + if (neg) { + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"chs"]]; + } + + // terminate digit entry + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"x<>y"]]; + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:@"x<>y"]]; + } else { + if ([token isEqualToString:@"wait"]) { + [NSThread sleepForTimeInterval:1.0]; + } else { + [keystrokes addObjectsFromArray:[_keystrokeDictionary objectForKey:token]]; + [self computeMacro:keystrokes]; + [keystrokes removeAllObjects]; + } + } + } + + if ([keystrokes count]) { + [self computeMacro:keystrokes]; + [keystrokes removeAllObjects]; + } + + unsigned long long cycles = [self cpuCycles]; + while ( [self cpuCycles] - cycles < waitCycles ) { + // wait for final display update to complete + [NSThread sleepForTimeInterval:0.1]; + } + +} + +- (bool) keyBufferIsEmpty { + return ([keyQueue count] > 0 ? NO : YES); +} + +- (void) tick { + @autoreleasepool { + + [NSThread setThreadPriority:0.5]; // 1.0 highest; 0.0 lowest was=0.25 + int n=0; + while (1) { + [NSThread sleepForTimeInterval:0.02]; // seconds was=0.05 + if (_display) { + [self performSelectorOnMainThread:@selector(readKeys) withObject:nil waitUntilDone:YES]; + [self performSelectorOnMainThread:@selector(executeCycle) withObject:nil waitUntilDone:YES]; + if (n++ % 2 == 0) { + [self performSelectorOnMainThread:@selector(updateDisplay) withObject:nil waitUntilDone:YES]; + } + } else { + [self readKeys]; + [self executeCycle]; + if (n++ % 2 == 0) { + [self updateDisplay]; + } + } + } + + } +} + +- (void) updateDisplay { + display_callback(nv); +} + +- (id) getDisplayString { + int i; + NSMutableString * disp = [[NSMutableString alloc] init]; + + for (i=0; idisplay_segments[i] & 127) { + case 64: [disp appendString:@"-"]; break; + case 63: [disp appendString:@"0"]; break; + case 6: [disp appendString:@"1"]; break; + case 91: [disp appendString:@"2"]; break; + case 79: [disp appendString:@"3"]; break; + case 102: [disp appendString:@"4"]; break; + case 109: [disp appendString:@"5"]; break; + case 125: [disp appendString:@"6"]; break; + case 7: [disp appendString:@"7"]; break; + case 127: [disp appendString:@"8"]; break; + case 111: [disp appendString:@"9"]; break; + case 115: [disp appendString:@"P"]; break; + case 121: [disp appendString:@"E"]; break; + case 2: [disp appendString:@"i"]; break; + case 35: [disp appendString:@"n"]; break; + case 92: [disp appendString:@"O"]; break; + case 80: [disp appendString:@"R"]; break; + case 33: [disp appendString:@"r"]; break; + case 98: [disp appendString:@"u"]; break; + case 124: [disp appendString:@"b"]; break; + case 94: [disp appendString:@"d"]; break; + case 116: [disp appendString:@"h"]; break; + case 119: [disp appendString:@"A"]; break; + case 57: [disp appendString:@"C"]; break; + case 113: [disp appendString:@"F"]; break; + case 0: [disp appendString:@" "]; break; + default: + break; + } + if (nv->display_segments[i] & 256) { + [disp appendString:@","]; + } else if (nv->display_segments[i] & 128) { + [disp appendString:@"."]; + } + } + NSLog(@"getDisplayString: %@", disp); + return disp; +} + +- (void) executeCycle { + int i=500; + while (i-- > 0) { + nut_execute_instruction(nv); + _cycles++; + } +} + +- (unsigned long long) cpuCycles { + return _cycles; +} + +- (void) readKeys { + static int delay = 0; + int key; + + if ([keyQueue count] == 0 && _macroInProgress) { + if (_display) { + [_display pauseDisplay:NO]; + } else { + _displayPaused = NO; + } + _macroInProgress = false; + } + + if (delay) { + delay--; + } else { + if ([keyQueue lastObject]) { + key = [[keyQueue lastObject] intValue]; + [keyQueue removeLastObject]; + if (key >= 0) { + nut_press_key(nv, key); + } else { + nut_release_key(nv); + } + + if (key == -1) { + if ([keyQueue lastObject]) { + key = [[keyQueue lastObject] intValue]; + [keyQueue removeLastObject]; + if (key >= 0) { + nut_press_key(nv, key); + } else { + nut_release_key(nv); + } + delay = 1; + } + } + } + } +} + +- (void) initKeystrokeDict { + NSMutableDictionary *kd = [[NSMutableDictionary alloc] init]; + + + // TODO: make single device versions for clarity + // watch for MIXED ifndef and ifdef!!! + + // + // Row 4 + // + + [kd setObject:[NSArray arrayWithObjects:K_SQRT, nil] forKey:@"sqrt"]; + +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_A, nil] forKey:@"a"]; + [kd setObject:[NSArray arrayWithObjects:K_X_2, nil] forKey:@"x^2"]; +#endif +#endif + +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_E_X, nil] forKey:@"e^x"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_B, nil] forKey:@"b"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_LN, nil] forKey:@"ln"]; +#endif + +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_10_X, nil] forKey:@"10^x"]; + [kd setObject:[NSArray arrayWithObjects:K_C, nil] forKey:@"c"]; + [kd setObject:[NSArray arrayWithObjects:K_LOG, nil] forKey:@"log"]; +#endif +#endif + +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_Y_X, nil] forKey:@"y^x"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_D, nil] forKey:@"d"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_PCT, nil] forKey:@"%"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_1_X, nil] forKey:@"1/x"]; +#ifndef HP16C +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_E, nil] forKey:@"e"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_DELTA_PCT, nil] forKey:@"delta%"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_CHS, nil] forKey:@"chs"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_MATRIX, nil] forKey:@"matrix"]; +#endif +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_ABS, nil] forKey:@"abs"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_7, nil] forKey:@"7"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_FIX, nil] forKey:@"fix"]; + [kd setObject:[NSArray arrayWithObjects:K_DEG, nil] forKey:@"deg"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_8, nil] forKey:@"8"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_SCI, nil] forKey:@"sci"]; + [kd setObject:[NSArray arrayWithObjects:K_RAD, nil] forKey:@"rad"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_9, nil] forKey:@"9"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_ENG, nil] forKey:@"eng"]; + [kd setObject:[NSArray arrayWithObjects:K_GRAD, nil] forKey:@"grad"]; + [kd setObject:[NSArray arrayWithObjects:K_GRAD, nil] forKey:@"grd"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_DIV, nil] forKey:@"/"]; + [kd setObject:[NSArray arrayWithObjects:K_DIV, nil] forKey:@"div"]; + [kd setObject:[NSArray arrayWithObjects:K_DIV, nil] forKey:@"divide"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_SOLVE, nil] forKey:@"solve"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_X_LE_Y, nil] forKey:@"x<=y"]; + + // + // Row 3 + // + + [kd setObject:[NSArray arrayWithObjects:K_SST, nil] forKey:@"sst"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_LBL, nil] forKey:@"lbl"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_BST, nil] forKey:@"bst"]; + + [kd setObject:[NSArray arrayWithObjects:K_GTO, nil] forKey:@"gto"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_HYP, nil] forKey:@"hyp"]; + [kd setObject:[NSArray arrayWithObjects:K_AHYP, nil] forKey:@"hyp-1"]; + [kd setObject:[NSArray arrayWithObjects:K_AHYP, nil] forKey:@"ahyp"]; +#endif +#endif + +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_SIN, nil] forKey:@"sin"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_DIM, nil] forKey:@"dim"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_ASIN, nil] forKey:@"sin-1"]; + [kd setObject:[NSArray arrayWithObjects:K_ASIN, nil] forKey:@"asin"]; + + [kd setObject:[NSArray arrayWithObjects:K_COS, nil] forKey:@"cos"]; + [kd setObject:[NSArray arrayWithObjects:K_ACOS, nil] forKey:@"cos-1"]; + [kd setObject:[NSArray arrayWithObjects:K_ACOS, nil] forKey:@"acos"]; + + [kd setObject:[NSArray arrayWithObjects:K_TAN, nil] forKey:@"tan"]; + [kd setObject:[NSArray arrayWithObjects:K_ATAN, nil] forKey:@"tan-1"]; + [kd setObject:[NSArray arrayWithObjects:K_ATAN, nil] forKey:@"atan"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_I, nil] forKey:@"i"]; + [kd setObject:[NSArray arrayWithObjects:K_PAREN_I, nil] forKey:@"(i)"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_EEX, nil] forKey:@"eex"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_RESULT, nil] forKey:@"result"]; +#endif +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_PI, nil] forKey:@"pi"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_4, nil] forKey:@"4"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_X_EXCH, nil] forKey:@"x<>"]; +#endif +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_SF, nil] forKey:@"sf"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_5, nil] forKey:@"5"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_DSE, nil] forKey:@"dse"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_CF, nil] forKey:@"cf"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_6, nil] forKey:@"6"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_ISG, nil] forKey:@"isg"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_F_TEST, nil] forKey:@"f?"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_MULT, nil] forKey:@"*"]; + [kd setObject:[NSArray arrayWithObjects:K_MULT, nil] forKey:@"mult"]; + [kd setObject:[NSArray arrayWithObjects:K_MULT, nil] forKey:@"multiply"]; + [kd setObject:[NSArray arrayWithObjects:K_MULT, nil] forKey:@"product"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_INTEG_XY, nil] forKey:@"integrate"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_X_EQ_0, nil] forKey:@"x=0"]; + [kd setObject:[NSArray arrayWithObjects:K_X_EQ_0, nil] forKey:@"x==0"]; + + // + // Row 2 + // + + [kd setObject:[NSArray arrayWithObjects:K_R_S, nil] forKey:@"r/s"]; + [kd setObject:[NSArray arrayWithObjects:K_PSE, nil] forKey:@"pse"]; + [kd setObject:[NSArray arrayWithObjects:K_P_R, nil] forKey:@"p/r"]; + +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_GSB, nil] forKey:@"gsb"]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_CLR_SIG, nil] forKey:@"clrsigma"]; + [kd setObject:[NSArray arrayWithObjects:K_CLR_SIG, nil] forKey:@"clrsig"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_RTN, nil] forKey:@"rtn"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_R_DOWN, nil] forKey:@"rdown"]; + [kd setObject:[NSArray arrayWithObjects:K_CLR_PRGM, nil] forKey:@"clrprgm"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_R_UP, nil] forKey:@"rup"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_X_EXCH_Y, nil] forKey:@"x<>y"]; + [kd setObject:[NSArray arrayWithObjects:K_CLR_REG, nil] forKey:@"clrreg"]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_RND, nil] forKey:@"rnd"]; +#endif + +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_DEL, nil] forKey:@"del"]; + [kd setObject:[NSArray arrayWithObjects:K_DEL, nil] forKey:@"bsp"]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_CLR_PREFIX, nil] forKey:@"clrprefix"]; + [kd setObject:[NSArray arrayWithObjects:K_CLR_X, nil] forKey:@"clx"]; + + [kd setObject:[NSArray arrayWithObjects:K_1, nil] forKey:@"1"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_TO_R, nil] forKey:@"tor"]; + [kd setObject:[NSArray arrayWithObjects:K_TO_P, nil] forKey:@"top"]; +#endif +#endif + [kd setObject:[NSArray arrayWithObjects:K_2, nil] forKey:@"2"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_TO_HMS, nil] forKey:@"tohms"]; + [kd setObject:[NSArray arrayWithObjects:K_TO_H, nil] forKey:@"toh"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_3, nil] forKey:@"3"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_TO_RAD, nil] forKey:@"torad"]; + [kd setObject:[NSArray arrayWithObjects:K_TO_DEG, nil] forKey:@"todeg"]; +#endif +#endif + + [kd setObject:[NSArray arrayWithObjects:K_MINUS, nil] forKey:@"-"]; + [kd setObject:[NSArray arrayWithObjects:K_MINUS, nil] forKey:@"minus"]; + [kd setObject:[NSArray arrayWithObjects:K_MINUS, nil] forKey:@"subtract"]; +#ifdef HP15C + [kd setObject:[NSArray arrayWithObjects:K_RE_EXCH_IM, nil] forKey:@"re<>im"]; + [kd setObject:[NSArray arrayWithObjects:K_TEST, nil] forKey:@"test"]; +#endif + + // + // Row 1 + // + + [kd setObject:[NSArray arrayWithObjects:K_ON, nil] forKey:@"on"]; + + [kd setObject:[NSArray arrayWithObjects:K_F, nil] forKey:@"f"]; + + [kd setObject:[NSArray arrayWithObjects:K_G, nil] forKey:@"g"]; + + [kd setObject:[NSArray arrayWithObjects:K_STO, nil] forKey:@"sto"]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_FRAC, nil] forKey:@"frac"]; + [kd setObject:[NSArray arrayWithObjects:K_INT, nil] forKey:@"int"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_RCL, nil] forKey:@"rcl"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_USER, nil] forKey:@"user"]; +#endif +#endif + [kd setObject:[NSArray arrayWithObjects:K_MEM, nil] forKey:@"mem"]; + + [kd setObject:[NSArray arrayWithObjects:K_ENTER, nil] forKey:@"enter"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_RAND, nil] forKey:@"rand"]; + [kd setObject:[NSArray arrayWithObjects:K_RAND, nil] forKey:@"ran#"]; +#endif +#endif + [kd setObject:[NSArray arrayWithObjects:K_LAST_X, nil] forKey:@"lastx"]; + [kd setObject:[NSArray arrayWithObjects:K_LAST_X, nil] forKey:@"lstx"]; + + [kd setObject:[NSArray arrayWithObjects:K_0, nil] forKey:@"0"]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_FACT, nil] forKey:@"fact"]; + [kd setObject:[NSArray arrayWithObjects:K_FACT, nil] forKey:@"factorial"]; + [kd setObject:[NSArray arrayWithObjects:K_FACT, nil] forKey:@"!"]; + [kd setObject:[NSArray arrayWithObjects:K_XBAR, nil] forKey:@"xbar"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_DECIMAL, nil] forKey:@"."]; +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_YHAT_R, nil] forKey:@"yhatr"]; + [kd setObject:[NSArray arrayWithObjects:K_YHAT_R, nil] forKey:@"yhat,r"]; + [kd setObject:[NSArray arrayWithObjects:K_S, nil] forKey:@"s"]; +#endif + +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_SIG_PLUS, nil] forKey:@"sigmaplus"]; + [kd setObject:[NSArray arrayWithObjects:K_SIG_PLUS, nil] forKey:@"sigma+"]; +#ifndef HP12C + [kd setObject:[NSArray arrayWithObjects:K_LR, nil] forKey:@"lr"]; + [kd setObject:[NSArray arrayWithObjects:K_LR, nil] forKey:@"l.r."]; +#endif + [kd setObject:[NSArray arrayWithObjects:K_SIG_MINUS, nil] forKey:@"sigmaminus"]; + [kd setObject:[NSArray arrayWithObjects:K_SIG_MINUS, nil] forKey:@"sigma-"]; +#endif + + [kd setObject:[NSArray arrayWithObjects:K_PLUS, nil] forKey:@"+"]; + [kd setObject:[NSArray arrayWithObjects:K_PLUS, nil] forKey:@"add"]; + [kd setObject:[NSArray arrayWithObjects:K_PLUS, nil] forKey:@"sum"]; +#ifndef HP12C +#ifndef HP16C + [kd setObject:[NSArray arrayWithObjects:K_P_Y_X, nil] forKey:@"pyx"]; + [kd setObject:[NSArray arrayWithObjects:K_P_Y_X, nil] forKey:@"py,x"]; + [kd setObject:[NSArray arrayWithObjects:K_P_Y_X, nil] forKey:@"p(y,x)"]; + [kd setObject:[NSArray arrayWithObjects:K_C_Y_X, nil] forKey:@"cyx"]; + [kd setObject:[NSArray arrayWithObjects:K_C_Y_X, nil] forKey:@"cy,x"]; + [kd setObject:[NSArray arrayWithObjects:K_C_Y_X, nil] forKey:@"c(y,x)"]; +#endif +#endif + +#ifdef HP16C + [kd setObject:[NSArray arrayWithObjects:K_FLOAT, nil] forKey:@"float"]; +#endif + + _keystrokeDictionary = [NSDictionary dictionaryWithDictionary:kd]; +} + +@end diff --git a/src/keymacros-16c.h b/src/keymacros-16c.h new file mode 100644 index 0000000..1ec17b3 --- /dev/null +++ b/src/keymacros-16c.h @@ -0,0 +1,153 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +// +// First Row +// + +#define K_ON [NSNumber numberWithInt:24], [NSNumber numberWithInt:-1] +#define K_F [NSNumber numberWithInt:56], [NSNumber numberWithInt:-1] +#define K_G [NSNumber numberWithInt:120], [NSNumber numberWithInt:-1] +#define K_STO [NSNumber numberWithInt:200], [NSNumber numberWithInt:-1] +#define K_RCL [NSNumber numberWithInt:136], [NSNumber numberWithInt:-1] +#define K_ENTER [NSNumber numberWithInt:132], [NSNumber numberWithInt:-1] +#define K_0 [NSNumber numberWithInt:197], [NSNumber numberWithInt:-1] +#define K_DECIMAL [NSNumber numberWithInt:117], [NSNumber numberWithInt:-1] +#define K_CHS [NSNumber numberWithInt:53], [NSNumber numberWithInt:-1] +#define K_PLUS [NSNumber numberWithInt:21], [NSNumber numberWithInt:-1] + +#define K_WSIZE K_F, K_STO +#define K_FLOAT K_F, K_RCL +#define K_WINDOW K_F, K_ENTER +#define K_MEM K_F, K_0 +#define K_STATUS K_F, K_DECIMAL +#define K_EEX K_F, K_CHS +#define K_OR K_F, K_PLUS + +#define K_LT K_G, K_STO +#define K_GT K_G, K_RCL +#define K_LAST_X K_G, K_ENTER +#define K_X_NE_Y K_G, K_0 +#define K_X_NE_0 K_G, K_DECIMAL +#define K_X_EQ_Y K_G, K_CHS +#define K_X_EQ_0 K_G, K_PLUS + +// +// Second Row +// + +#define K_R_S [NSNumber numberWithInt:17], [NSNumber numberWithInt:-1] +#define K_SST [NSNumber numberWithInt:49], [NSNumber numberWithInt:-1] +#define K_R_DOWN [NSNumber numberWithInt:113], [NSNumber numberWithInt:-1] +#define K_X_EXCH_Y [NSNumber numberWithInt:193], [NSNumber numberWithInt:-1] +#define K_DEL [NSNumber numberWithInt:129], [NSNumber numberWithInt:-1] +#define K_BSP K_DEL +#define K_1 [NSNumber numberWithInt:196], [NSNumber numberWithInt:-1] +#define K_2 [NSNumber numberWithInt:116], [NSNumber numberWithInt:-1] +#define K_3 [NSNumber numberWithInt:52], [NSNumber numberWithInt:-1] +#define K_MINUS [NSNumber numberWithInt:20], [NSNumber numberWithInt:-1] + +#define K_PAREN_I K_F, K_R_S +#define K_I K_F, K_SST +#define K_CLR_PRGM K_F, K_R_DOWN +#define K_CLR_REG K_F, K_X_EXCH_Y +#define K_CLR_PREFIX K_F, K_BSP +#define K_1S_COMPL K_F, K_1 +#define K_2S_COMPL K_F, K_2 +#define K_UNSGN K_F, K_3 +#define K_NOT K_F, K_MINUS + +#define K_P_R K_G, K_R_S +#define K_BST K_G, K_SST +#define K_R_UP K_G, K_R_DOWN +#define K_PSE K_G, K_X_EXCH_Y +#define K_CLR_X K_G, K_BSP +#define K_X_LE_Y K_G, K_1 +#define K_X_LT_0 K_G, K_2 +#define K_X_GT_Y K_G, K_3 +#define K_X_GT_0 K_G, K_MINUS + +// +// Third Row +// + +#define K_GSB [NSNumber numberWithInt:16], [NSNumber numberWithInt:-1] +#define K_GTO [NSNumber numberWithInt:48], [NSNumber numberWithInt:-1] +#define K_HEX [NSNumber numberWithInt:112], [NSNumber numberWithInt:-1] +#define K_DEC [NSNumber numberWithInt:192], [NSNumber numberWithInt:-1] +#define K_OCT [NSNumber numberWithInt:128], [NSNumber numberWithInt:-1] +#define K_BIN [NSNumber numberWithInt:135], [NSNumber numberWithInt:-1] +#define K_4 [NSNumber numberWithInt:199], [NSNumber numberWithInt:-1] +#define K_5 [NSNumber numberWithInt:119], [NSNumber numberWithInt:-1] +#define K_6 [NSNumber numberWithInt:55], [NSNumber numberWithInt:-1] +#define K_MULT [NSNumber numberWithInt:23], [NSNumber numberWithInt:-1] + +#define K_X_EXCH_PAREN_I K_F, K_GSB +#define K_X_EXCH_I K_F, K_GTO +#define K_SB K_F, K_4 +#define K_CB K_F, K_5 +#define K_B_TEST K_F, K_6 +#define K_AND K_F, K_MULT + +#define K_RTN K_G, K_GSB +#define K_LBL K_G, K_GTO +#define K_DSZ K_G, K_HEX +#define K_ISZ K_G, K_DEC +#define K_SQRT K_G, K_OCT +#define K_1_X K_G, K_BIN +#define K_SF K_G, K_4 +#define K_CF K_G, K_5 +#define K_F_TEST K_G, K_6 +#define K_DBL_MULT K_G, K_MULT + +// +// Fourth Row +// + +#define K_AH [NSNumber numberWithInt:19], [NSNumber numberWithInt:-1] +#define K_BH [NSNumber numberWithInt:51], [NSNumber numberWithInt:-1] +#define K_CH [NSNumber numberWithInt:115], [NSNumber numberWithInt:-1] +#define K_DH [NSNumber numberWithInt:195], [NSNumber numberWithInt:-1] +#define K_EH [NSNumber numberWithInt:131], [NSNumber numberWithInt:-1] +#define K_FH [NSNumber numberWithInt:130], [NSNumber numberWithInt:-1] +#define K_7 [NSNumber numberWithInt:194], [NSNumber numberWithInt:-1] +#define K_8 [NSNumber numberWithInt:114], [NSNumber numberWithInt:-1] +#define K_9 [NSNumber numberWithInt:50], [NSNumber numberWithInt:-1] +#define K_DIV [NSNumber numberWithInt:18], [NSNumber numberWithInt:-1] + +#define K_SL K_F, K_AH +#define K_SR K_F, K_BH +#define K_RL K_F, K_CH +#define K_RR K_F, K_DH +#define K_RLN K_F, K_EH +#define K_RRB K_F, K_FH +#define K_MASKL K_F, K_7 +#define K_MASKR K_F, K_8 +#define K_RMD K_F, K_9 +#define K_XOR K_F, K_DIV + +#define K_LJ K_G, K_AH +#define K_ASR K_G, K_BH +#define K_RLC K_G, K_CH +#define K_RRC K_G, K_DH +#define K_RLCN K_G, K_EH +#define K_RRCN K_G, K_FH +#define K_NUM_B K_G, K_7 +#define K_ABS K_G, K_8 +#define K_DBLR K_G, K_9 +#define K_DBL_DIV K_G, K_DIV diff --git a/src/keymacros.h b/src/keymacros.h new file mode 100644 index 0000000..ebcaef2 --- /dev/null +++ b/src/keymacros.h @@ -0,0 +1,55 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + + +#include "keymacros-16c.h" + +#define F_0 K_0 +#define F_1 K_1 +#define F_2 K_2 +#define F_3 K_3 +#define F_4 K_4 +#define F_5 K_5 +#define F_6 K_6 +#define F_7 K_7 +#define F_8 K_8 +#define F_9 K_9 +#define F_DIV K_DIV +#define F_MULT K_MULT +#define F_MINUS K_MINUS +#define F_PLUS K_PLUS +#define F_CHS K_CHS +#define F_EEX K_EEX +#define F_SQRT K_SQRT + +#ifdef K_X_2 + #define F_X_2 K_X_2 +#else + #ifdef K_Y_X + #define F_X_2 K_X_EXCH_Y, K_X_EXCH_Y, F_2, K_Y_X + #else + #define F_X_2 K_ENTER, K_MULT + #endif +#endif diff --git a/src/macutil.c b/src/macutil.c new file mode 100644 index 0000000..cadccf4 --- /dev/null +++ b/src/macutil.c @@ -0,0 +1,123 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + +// +// changes for mac os x by Maciej Bartosiak +// + + +#include +#include +#include +#include +#include +#include + +#include "macutil.h" + +void *alloc (size_t size) +{ + void *p; + + p = calloc (1, size); + if (! p) + fatal (2, "Memory allocation failed\n"); + return (p); +} + +void trim_trailing_whitespace (char *s) +{ + int i; + char c; + + i = (int)strlen (s); + while (--i >= 0) + { + c = s [i]; + if ((c == '\n') || (c == '\r') || (c == ' ') || (c == '\t')) + s [i] = '\0'; + else + break; + } +} + +size_t fread_bytes (FILE *stream, + void *ptr, + size_t byte_count, + bool *eof, + bool *error) +{ + size_t total = 0; + + *eof = false; + *error = false; + + while (byte_count) + { + size_t count; + + count = fread (ptr, 1, byte_count, stream); + ptr += count; + total += count; + byte_count -= count; + if (byte_count) + { + if (ferror (stream)) + { + *error = true; + return total; + } + if (feof (stream)) + { + *eof = true; + return total; + } + } + } + return total; +} + +void fatal (int ret, char *format, ...) +{ + va_list ap; + + if (format) + { + fprintf (stderr, "fatal error: "); + va_start (ap, format); + vfprintf (stderr, format, ap); + va_end (ap); + } + //if (ret == 1) + // usage (stderr); + exit (ret); +} + +/*void warning (char *format, ...) +{ + va_list ap; + + fprintf (stderr, "warning: "); + va_start (ap, format); + vfprintf (stderr, format, ap); + va_end (ap); +}*/ + diff --git a/src/macutil.h b/src/macutil.h new file mode 100644 index 0000000..7d9d192 --- /dev/null +++ b/src/macutil.h @@ -0,0 +1,37 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + +// +// changes for mac os x by Maciej Bartosiak +// + +void usage (FILE *f); +void fatal (int ret, char *format, ...); +void *alloc (size_t size); +void warning (char *format, ...); +void trim_trailing_whitespace (char *s); +size_t fread_bytes (FILE *stream, + void *ptr, + size_t byte_count, + bool *eof, + bool *error); +char *newstr (char *orig); +char *newstrn (char *orig, int max_len); diff --git a/src/proc.h b/src/proc.h new file mode 100644 index 0000000..9a17054 --- /dev/null +++ b/src/proc.h @@ -0,0 +1,56 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + +// +// changes for mac os x by Maciej Bartosiak +// + + +#define MAX_RAM 1024 // $$$ ugly hack, needs to go! +#define MAX_PF 256 // $$$ ugly hack, needs to go! + + +// common events: +typedef enum +{ + event_reset, + event_clear_memory, + event_power_down, + event_power_up, + event_sleep, + event_wake, + event_cycle, // occurs during every simulation cycle + event_save_starting, + event_save_completed, + event_restore_starting, + event_restore_completed, + + first_arch_event = 0x100, // CPU architecture specific events + + first_chip_event = 0x200 // chip specific events +} event_t; + + +typedef uint32_t addr_t; + +typedef uint16_t rom_word_t; + + diff --git a/src/proc_nut.c b/src/proc_nut.c new file mode 100644 index 0000000..9517bd0 --- /dev/null +++ b/src/proc_nut.c @@ -0,0 +1,1987 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + +// +// changes for mac os x by Maciej Bartosiak +// + +#include +#include +#include +#include +#include +#include + +//#include "arch.h" +//#include "platform.h" +#include "macutil.h" +#include "display.h" +#include "proc.h" +//#include "proc_int.h" +#include "digit_ops.h" +#include "voyager_lcd.h" +#include "proc_nut.h" + + +#define KBD_RELEASE_DEBOUNCE_CYCLES 32 + +#undef KEYBOARD_DEBUG + +#ifdef KEYBOARD_DEBUG +static char *kbd_state_name [KB_STATE_MAX] = +{ + [KB_IDLE] = "idle", + [KB_PRESSED] = "pressed", + [KB_RELEASED] = "released", + [KB_WAIT_CHK] = "wait_chk", + [KB_WAIT_CYC] = "wait_cyc" +}; +#endif + + +#undef WARN_STRAY_WRITE + + +//static void print_reg (reg_t reg); + +void do_event (nut_reg_t *nut_reg, event_t event); +void do_event_int(nut_reg_t *nut_reg, event_t event); +void nut_event_fn (nut_reg_t *nut_reg, event_t event); +void voyager_display_event_fn (nut_reg_t *nut_reg, event_t event); + +/* map from high opcode bits to register index */ +static int tmap [16] = +{ 3, 4, 5, 10, 8, 6, 11, -1, 2, 9, 7, 13, 1, 12, 0, -1 }; + +/* map from register index to high opcode bits */ +static int itmap [WSIZE] = +{ 0xe, 0xc, 0x8, 0x0, 0x1, 0x2, 0x5, 0xa, 0x4, 0x9, 0x3, 0x6, 0xd, 0xb }; + + +static rom_word_t nut_get_ucode (nut_reg_t *nut_reg, rom_addr_t addr) +{ + uint8_t page = addr / N_PAGE_SIZE; + uint8_t bank = nut_reg->active_bank [page]; + uint16_t offset = addr & (N_PAGE_SIZE - 1); + + if (nut_reg->rom [page][bank]) + return nut_reg->rom [page][bank][offset]; + else + return 0; // non-existent memory +} + + +/*static void nut_set_ucode (nut_reg_t *nut_reg, + rom_addr_t addr, + rom_word_t data) +{ + uint8_t page = addr / N_PAGE_SIZE; + uint8_t bank = nut_reg->active_bank [page]; + uint16_t offset = addr & (N_PAGE_SIZE - 1); + + if (! nut_reg->rom [page][bank]) + { + fprintf (stderr, "write to nonexistent ROM location %04x (bank %d)\n", addr, bank); + return; + } + if (! nut_reg->rom_writeable [page][bank]) + { + fprintf (stderr, "write to non-writeable ROM location %04x (bank %d)\n", addr, bank); + return; + } + nut_reg->rom [page][bank][offset] = data; +}*/ + + +bool nut_set_bank_group (nut_reg_t *nut_reg, + int bank_group, + addr_t addr) +{ + uint8_t page; + uint16_t offset; + + if (addr >= (MAX_PAGE * N_PAGE_SIZE)) + return false; + + page = addr / N_PAGE_SIZE; + offset = addr & (N_PAGE_SIZE - 1); + + if (offset != 0) + return false; + + nut_reg->bank_group [page] = bank_group; + + return true; +} + + +bool nut_read_rom (nut_reg_t *nut_reg, + uint8_t bank, + addr_t addr, + rom_word_t *val) +{ + uint8_t page; + uint16_t offset; + + if ((addr >= (MAX_PAGE * N_PAGE_SIZE)) || (bank > MAX_BANK)) + return false; + + page = addr / N_PAGE_SIZE; + offset = addr & (N_PAGE_SIZE - 1); + + if (! nut_reg->rom [page][bank]) + return false; + + *val = nut_reg->rom [page][bank][offset]; + return true; +} + + +bool nut_write_rom (nut_reg_t *nut_reg, + uint8_t bank, + addr_t addr, + rom_word_t *val) +{ + uint8_t page; + uint16_t offset; + + if ((addr >= (MAX_PAGE * N_PAGE_SIZE)) || (bank > MAX_BANK)) + return false; + + page = addr / N_PAGE_SIZE; + offset = addr & (N_PAGE_SIZE - 1); + + if (! nut_reg->rom [page][bank]) // does the page/bank exist? + { + // no, allocate a new page + nut_reg->rom [page][bank] = (rom_word_t *)alloc (N_PAGE_SIZE * sizeof (rom_word_t)); + //nut_reg->rom_breakpoint [page][bank] = (bool *)alloc (N_PAGE_SIZE * sizeof (bool)); + } + + nut_reg->rom [page][bank][offset] = *val; + return true; +} + + +static inline uint8_t arithmetic_base (nut_reg_t *nut_reg) +{ + return nut_reg->decimal ? 10 : 16; +} + + +static inline uint8_t *pt (nut_reg_t *nut_reg) +{ + return nut_reg->q_sel ? & nut_reg->q : & nut_reg->p; +} + + +//void nut_print_state (nut_reg_t *nut_reg); + + +static void bad_op (nut_reg_t *nut_reg, int opcode) +{ + printf ("illegal opcode %03x at %04x\n", opcode, nut_reg->prev_pc); +} + + +static void op_arith (nut_reg_t *nut_reg, int opcode) +{ + int op, field; + int first=0; + int last=0; + + op = opcode >> 5; + field = (opcode >> 2) & 7; + + switch (field) + { + case 0: /* p */ first = *pt (nut_reg); last = *pt (nut_reg); break; + case 1: /* x */ first = 0; last = EXPSIZE - 1; break; + case 2: /* wp */ first = 0; last = *pt (nut_reg); break; + case 3: /* w */ first = 0; last = WSIZE - 1; break; + case 4: /* pq */ first = nut_reg->p; last = nut_reg->q; + if (first > last) + last = WSIZE - 1; + break; + case 5: /* xs */ first = EXPSIZE - 1; last = EXPSIZE - 1; break; + case 6: /* m */ first = EXPSIZE; last = WSIZE - 2; break; + case 7: /* s */ first = WSIZE - 1; last = WSIZE - 1; break; + } + + nut_reg->prev_tef_last = last; + + switch (op) + { + case 0x00: /* a=0 */ + reg_zero (nut_reg->a, first, last); + break; + + case 0x01: /* b=0 */ + reg_zero (nut_reg->b, first, last); + break; + + case 0x02: /* c=0 */ + reg_zero (nut_reg->c, first, last); + break; + + case 0x03: /* ab ex */ + reg_exch (nut_reg->a, nut_reg->b, first, last); + break; + + case 0x04: /* b=a */ + reg_copy (nut_reg->b, nut_reg->a, first, last); + break; + + case 0x05: /* ac ex */ + reg_exch (nut_reg->a, nut_reg->c, first, last); + break; + + case 0x06: /* c=b */ + reg_copy (nut_reg->c, nut_reg->b, first, last); + break; + + case 0x07: /* bc ex */ + reg_exch (nut_reg->b, nut_reg->c, first, last); + break; + + case 0x08: /* a=c */ + reg_copy (nut_reg->a, nut_reg->c, first, last); + break; + + case 0x09: /* a=a+b */ + reg_add (nut_reg->a, nut_reg->a, nut_reg->b, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x0a: /* a=a+c */ + reg_add (nut_reg->a, nut_reg->a, nut_reg->c, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x0b: /* a=a+1 */ + nut_reg->carry = 1; + reg_add (nut_reg->a, nut_reg->a, NULL, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x0c: /* a=a-b */ + reg_sub (nut_reg->a, nut_reg->a, nut_reg->b, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x0d: /* a=a-1 */ + nut_reg->carry = 1; + reg_sub (nut_reg->a, nut_reg->a, NULL, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x0e: /* a=a-c */ + reg_sub (nut_reg->a, nut_reg->a, nut_reg->c, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x0f: /* c=c+c */ + reg_add (nut_reg->c, nut_reg->c, nut_reg->c, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x10: /* c=a+c */ + reg_add (nut_reg->c, nut_reg->a, nut_reg->c, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x11: /* c=c+1 */ + nut_reg->carry = 1; + reg_add (nut_reg->c, nut_reg->c, NULL, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x12: /* c=a-c */ + reg_sub (nut_reg->c, nut_reg->a, nut_reg->c, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x13: /* c=c-1 */ + nut_reg->carry = 1; + reg_sub (nut_reg->c, nut_reg->c, NULL, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x14: /* c=-c */ + reg_sub (nut_reg->c, NULL, nut_reg->c, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x15: /* c=-c-1 */ + nut_reg->carry = 1; + reg_sub (nut_reg->c, NULL, nut_reg->c, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x16: /* ? b<>0 */ + reg_test_nonequal (nut_reg->b, NULL, + first, last, + & nut_reg->carry); + break; + + case 0x17: /* ? c<>0 */ + reg_test_nonequal (nut_reg->c, NULL, + first, last, + & nut_reg->carry); + break; + + case 0x18: /* ? aa, nut_reg->c, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x19: /* ? aa, nut_reg->b, + first, last, + & nut_reg->carry, arithmetic_base (nut_reg)); + break; + + case 0x1a: /* ? a<>0 */ + reg_test_nonequal (nut_reg->a, NULL, + first, last, + & nut_reg->carry); + break; + + case 0x1b: /* ? a<>c */ + reg_test_nonequal (nut_reg->a, nut_reg->c, + first, last, + & nut_reg->carry); + break; + + case 0x1c: /* a sr */ + reg_shift_right (nut_reg->a, first, last); + break; + + case 0x1d: /* b sr */ + reg_shift_right (nut_reg->b, first, last); + break; + + case 0x1e: /* c sr */ + reg_shift_right (nut_reg->c, first, last); + break; + + case 0x1f: /* a sl */ + reg_shift_left (nut_reg->a, first, last); + break; + } +} + + +/* + * stack operations + */ + +static rom_addr_t pop (nut_reg_t *nut_reg) +{ + int i; + rom_addr_t ret; + + ret = nut_reg->stack [0]; + for (i = 0; i < STACK_DEPTH - 1; i++) + nut_reg->stack [i] = nut_reg->stack [i + 1]; + nut_reg->stack [STACK_DEPTH - 1] = 0; + return (ret); +} + +static void push (nut_reg_t *nut_reg, rom_addr_t a) +{ + int i; + + for (i = STACK_DEPTH - 1; i > 0; i--) + nut_reg->stack [i] = nut_reg->stack [i - 1]; + nut_reg->stack [0] = a; +} + +static void op_return (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->pc = pop (nut_reg); +} + +static void op_return_if_carry (nut_reg_t *nut_reg, int opcode) +{ + if (nut_reg->prev_carry) + nut_reg->pc = pop (nut_reg); +} + +static void op_return_if_no_carry (nut_reg_t *nut_reg, int opcode) +{ + if (! nut_reg->prev_carry) + nut_reg->pc = pop (nut_reg); +} + +static void op_pop (nut_reg_t *nut_reg, int opcode) +{ + (void) pop (nut_reg); +} + +static void op_pop_c (nut_reg_t *nut_reg, int opcode) +{ + rom_addr_t a; + + a = pop (nut_reg); + nut_reg->c [6] = a >> 12; + nut_reg->c [5] = (a >> 8) & 0x0f; + nut_reg->c [4] = (a >> 4) & 0x0f; + nut_reg->c [3] = a & 0x0f; +} + + +static void op_push_c (nut_reg_t *nut_reg, int opcode) +{ + push (nut_reg, ((nut_reg->c [6] << 12) | + (nut_reg->c [5] << 8) | + (nut_reg->c [4] << 4) | + (nut_reg->c [3]))); +} + + +// +// branch operations +// + +static void op_short_branch (nut_reg_t *nut_reg, int opcode) +{ + int offset; + + offset = (opcode >> 3) & 0x3f; + if (opcode & 0x200) + offset -= 64; + + if (((opcode >> 2) & 1) == nut_reg->prev_carry) + nut_reg->pc = nut_reg->pc + offset - 1; +} + + +static void op_long_branch (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->inst_state = long_branch; + nut_reg->first_word = opcode; + nut_reg->long_branch_carry = nut_reg->prev_carry; +} + + +static void op_long_branch_word_2 (nut_reg_t *nut_reg, int opcode) +{ + rom_addr_t target; + + nut_reg->inst_state = norm; + target = (nut_reg->first_word >> 2) | ((opcode & 0x3fc) << 6); + + if ((opcode & 0x001) == nut_reg->long_branch_carry) + { + if (opcode & 0x002) + nut_reg->pc = target; + else + { + push (nut_reg, nut_reg->pc); + nut_reg->pc = target; + if (nut_get_ucode (nut_reg, nut_reg->pc) == 0) + nut_reg->pc = pop (nut_reg); + } + } +} + + +static void op_goto_c (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->pc = ((nut_reg->c [6] << 12) | + (nut_reg->c [5] << 8) | + (nut_reg->c [4] << 4) | + (nut_reg->c [3])); +} + + +// Bank selection used in 41CX, Advantage ROM, and perhaps others + +static void select_bank (nut_reg_t *nut_reg, rom_addr_t addr, uint8_t new_bank) +{ + uint8_t page; + int bank_group; + + bank_group = nut_reg->bank_group [addr / N_PAGE_SIZE]; + if (! bank_group) + return; + + for (page = 0; page < MAX_PAGE; page++) + if ((nut_reg->bank_group [page] == bank_group) && + (nut_reg->rom [page] [new_bank])) + nut_reg->active_bank [page] = new_bank; +} + + +static void op_enbank (nut_reg_t *nut_reg, int opcode) +{ + select_bank (nut_reg, nut_reg->prev_pc, ((opcode >> 5) & 2) + ((opcode >> 7) & 1)); +} + + +/* + * m operations + */ + +static void op_c_to_m (nut_reg_t *nut_reg, int opcode) +{ + reg_copy (nut_reg->m, nut_reg->c, 0, WSIZE - 1); +} + +static void op_m_to_c (nut_reg_t *nut_reg, int opcode) +{ + reg_copy (nut_reg->c, nut_reg->m, 0, WSIZE - 1); +} + +static void op_c_exch_m (nut_reg_t *nut_reg, int opcode) +{ + reg_exch (nut_reg->c, nut_reg->m, 0, WSIZE - 1); +} + + +/* + * n operations + */ + +static void op_c_to_n (nut_reg_t *nut_reg, int opcode) +{ + reg_copy (nut_reg->n, nut_reg->c, 0, WSIZE - 1); +} + +static void op_n_to_c (nut_reg_t *nut_reg, int opcode) +{ + reg_copy (nut_reg->c, nut_reg->n, 0, WSIZE - 1); +} + +static void op_c_exch_n (nut_reg_t *nut_reg, int opcode) +{ + reg_exch (nut_reg->c, nut_reg->n, 0, WSIZE - 1); +} + + +/* + * RAM and peripheral operations + */ + +static void nut_ram_read_zero (nut_reg_t *nut_reg, int addr, reg_t *reg) +{ + int i; + for (i = 0; i < WSIZE; i++) + (*reg) [i] = 0; +} + + +static void nut_ram_write_ignore (nut_reg_t *nut_reg, int addr, reg_t *reg) +{ + ; +} + +static void op_c_to_dadd (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->ram_addr = ((nut_reg->c [2] << 8) | + (nut_reg->c [1] << 4) | + (nut_reg->c [0])) & 0x3ff; + + do_event_int (nut_reg, event_ram_select); + //voyager_display_event_fn (nut_reg, event_ram_select); +} + +static void op_c_to_pfad (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->pf_addr = ((nut_reg->c [1] << 4) | + (nut_reg->c [0])); + + do_event_int (nut_reg, event_periph_select); + //voyager_display_event_fn (nut_reg, event_periph_select); +} + +static void op_read_reg_n (nut_reg_t *nut_reg, int opcode) +{ + uint16_t ram_addr; + uint8_t pf_addr; + int i; + int is_ram, is_pf; + + for (i = 0; i < WSIZE; i++) + nut_reg->c [i] = 0; + + if ((opcode >> 6) != 0) + nut_reg->ram_addr = (nut_reg->ram_addr & ~0x0f) | (opcode >> 6); + + ram_addr = nut_reg->ram_addr; + pf_addr = nut_reg->pf_addr; + + is_ram = nut_reg->ram_exists [ram_addr]; + + is_pf = (nut_reg->pf_exists [pf_addr] && + nut_reg->rd_n_fcn [pf_addr] && + (*nut_reg->rd_n_fcn [pf_addr]) (nut_reg, opcode >> 6)); + + if (is_ram) + { + if (is_pf) + printf ("warning: conflicting read RAM %03x PF %02x reg %01x\n", + ram_addr, pf_addr, opcode >> 6); + if (nut_reg->ram_read_fn [ram_addr]) + nut_reg->ram_read_fn [ram_addr] (nut_reg, ram_addr, & nut_reg->c); + else + for (i = 0; i < WSIZE; i++) + nut_reg->c [i] = nut_reg->ram [ram_addr][i]; + } + else if (! is_pf) + { + printf ("warning: stray read RAM %03x PF %02x reg %01x\n", + ram_addr, pf_addr, opcode >> 6); + } +} + + +static void op_write_reg_n (nut_reg_t *nut_reg, int opcode) +{ + uint16_t ram_addr; + uint8_t pf_addr; + int i; + int is_ram, is_pf; + + nut_reg->ram_addr = (nut_reg->ram_addr & ~0x0f) | (opcode >> 6); + + ram_addr = nut_reg->ram_addr; + pf_addr = nut_reg->pf_addr; + + is_ram = nut_reg->ram_exists [ram_addr]; + + is_pf = (nut_reg->pf_exists [pf_addr] && + nut_reg->wr_n_fcn [pf_addr] && + (*nut_reg->wr_n_fcn [pf_addr]) (nut_reg, opcode >> 6)); + + if (is_ram) + { + if (is_pf) + printf ("warning: conflicting write RAM %03x PF %02x reg %01x\n", + ram_addr, pf_addr, opcode >> 6); + if (nut_reg->ram_write_fn [ram_addr]) + nut_reg->ram_write_fn [ram_addr] (nut_reg, ram_addr, & nut_reg->c); + else + for (i = 0; i < WSIZE; i++) + nut_reg->ram [ram_addr][i] = nut_reg->c [i]; + } + else if (! is_pf) + { +#ifdef WARN_STRAY_WRITE + printf ("warning: stray write RAM %03x PF %02x reg %01x data ", + ram_addr, pf_addr, opcode >> 6); + print_reg (nut_reg->c); + printf ("\n"); +#endif + } +} + + +static void op_c_to_data (nut_reg_t *nut_reg, int opcode) +{ + uint16_t ram_addr; + uint8_t pf_addr; + int i; + int is_ram, is_pf; + + ram_addr = nut_reg->ram_addr; + pf_addr = nut_reg->pf_addr; + + is_ram = nut_reg->ram_exists [ram_addr]; + + is_pf = (nut_reg->pf_exists [pf_addr] && + nut_reg->wr_fcn [pf_addr] && + (*nut_reg->wr_fcn [pf_addr]) (nut_reg)); + + if (is_ram) + { + if (is_pf) + printf ("warning: conflicting write RAM %03x PF %02x\n", + ram_addr, pf_addr); + if (nut_reg->ram_write_fn [ram_addr]) + nut_reg->ram_write_fn [ram_addr] (nut_reg, ram_addr, & nut_reg->c); + else + for (i = 0; i < WSIZE; i++) + nut_reg->ram [ram_addr][i] = nut_reg->c [i]; + } + else if (! is_pf) + { +#ifdef WARN_STRAY_WRITE + printf ("warning: stray write RAM %03x PF %02x data ", + ram_addr, pf_addr); + print_reg (nut_reg->c); + printf ("\n"); +#endif + } +} + + +static void op_test_ext_flag (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->carry = nut_reg->ext_flag [tmap [opcode >> 6]]; +} + + +static void op_selprf (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->selprf = opcode >> 6; + nut_reg->inst_state = selprf; +} + + +// This "opcode" handles all instructions following a selprf (AKA +// PERTCT or SELP) instruction until a return of control. +static void op_smart_periph (nut_reg_t *nut_reg, int opcode) +{ + bool flag = false; + + if (nut_reg->selprf_fcn [nut_reg->selprf]) + flag = nut_reg->selprf_fcn [nut_reg->selprf] (nut_reg, opcode); + if ((opcode & 0x03f) == 0x003) + nut_reg->carry = flag; + if (opcode & 1) + nut_reg->inst_state = norm; +} + + +/* + * s operations + */ + +static void op_set_s (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->s [tmap [opcode >> 6]] = 1; +} + +static void op_clr_s (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->s [tmap [opcode >> 6]] = 0; +} + +static void op_test_s (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->carry = nut_reg->s [tmap [opcode >> 6]]; +} + +static int get_s_bits (nut_reg_t *nut_reg, int first, int count) +{ + int i; + int mask = 1; + int r = 0; + for (i = first; i < first + count; i++) + { + if (nut_reg->s [i]) + r = r + mask; + mask <<= 1; + } + return (r); +} + +static void set_s_bits (nut_reg_t *nut_reg, int first, int count, int a) +{ + int i; + int mask = 1; + + for (i = first; i < first + count; i++) + { + nut_reg->s [i] = (a & mask) != 0; + mask <<= 1; + } +} + +static void op_clear_all_s (nut_reg_t *nut_reg, int opcode) +{ + set_s_bits (nut_reg, 0, 8, 0); +} + +static void op_c_to_s (nut_reg_t *nut_reg, int opcode) +{ + set_s_bits (nut_reg, 0, 4, nut_reg->c [0]); + set_s_bits (nut_reg, 4, 4, nut_reg->c [1]); +} + +static void op_s_to_c (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->c [0] = get_s_bits (nut_reg, 0, 4); + nut_reg->c [1] = get_s_bits (nut_reg, 4, 4); +} + +static void op_c_exch_s (nut_reg_t *nut_reg, int opcode) +{ + int t; + + t = get_s_bits (nut_reg, 0, 4); + set_s_bits (nut_reg, 0, 4, nut_reg->c [0]); + nut_reg->c [0] = t; + t = get_s_bits (nut_reg, 4, 4); + set_s_bits (nut_reg, 4, 4, nut_reg->c [1]); + nut_reg->c [1] = t; +} + +static void op_sb_to_f (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->fo = get_s_bits (nut_reg, 0, 8); +} + +static void op_f_to_sb (nut_reg_t *nut_reg, int opcode) +{ + set_s_bits (nut_reg, 0, 8, nut_reg->fo); +} + +static void op_f_exch_sb (nut_reg_t *nut_reg, int opcode) +{ + int t; + + t = get_s_bits (nut_reg, 0, 8); + set_s_bits (nut_reg, 0, 8, nut_reg->fo); + nut_reg->fo = t; +} + +/* + * pointer operations + */ + +static void op_dec_pt (nut_reg_t *nut_reg, int opcode) +{ + (*pt (nut_reg))--; + if ((*pt (nut_reg)) >= WSIZE) // can't be negative because it is unsigned + (*pt (nut_reg)) = WSIZE - 1; +} + +static void op_inc_pt (nut_reg_t *nut_reg, int opcode) +{ + (*pt (nut_reg))++; + if ((*pt (nut_reg)) >= WSIZE) + (*pt (nut_reg)) = 0; +} + +static void op_set_pt (nut_reg_t *nut_reg, int opcode) +{ + (*pt (nut_reg)) = tmap [opcode >> 6]; +} + +static void op_test_pt (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->carry = ((*pt (nut_reg)) == tmap [opcode >> 6]); +} + +static void op_sel_p (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->q_sel = false; +} + +static void op_sel_q (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->q_sel = true; +} + +static void op_test_pq (nut_reg_t *nut_reg, int opcode) +{ + if (nut_reg->p == nut_reg->q) + nut_reg->carry = 1; +} + +static void op_lc (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->c [(*pt (nut_reg))--] = opcode >> 6; + if ((*pt (nut_reg)) >= WSIZE) /* unsigned, can't be negative */ + *pt (nut_reg) = WSIZE - 1; +} + +static void op_c_to_g (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->g [0] = nut_reg->c [*pt (nut_reg)]; + if ((*pt (nut_reg)) == (WSIZE - 1)) + { + nut_reg->g [1] = 0; +#ifdef WARNING_G + fprintf (stderr, "warning: c to g transfer with pt=13\n"); +#endif + } + else + nut_reg->g [1] = nut_reg->c [(*pt (nut_reg)) + 1]; +} + +static void op_g_to_c (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->c [(*pt (nut_reg))] = nut_reg->g [0]; + if ((*pt (nut_reg)) == (WSIZE - 1)) + { + ; +#ifdef WARNING_G + fprintf (stderr, "warning: g to c transfer with pt=13\n"); +#endif + } + else + { + nut_reg->c [(*pt (nut_reg)) + 1] = nut_reg->g [1]; + } + +} + +static void op_c_exch_g (nut_reg_t *nut_reg, int opcode) +{ + int t; + + t = nut_reg->g [0]; + nut_reg->g [0] = nut_reg->c [*pt (nut_reg)]; + nut_reg->c [*pt (nut_reg)] = t; + if ((*pt (nut_reg)) == (WSIZE - 1)) + { + nut_reg->g [1] = 0; +#ifdef WARNING_G + fprintf (stderr, "warning: c exchange g with pt=13\n"); +#endif + } + else + { + t = nut_reg->g [1]; + nut_reg->g [1] = nut_reg->c [(*pt (nut_reg)) + 1]; + nut_reg->c [(*pt (nut_reg)) + 1] = t; + } +} + + +/* + * keyboard operations + */ + +static void op_keys_to_rom_addr (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->pc = (nut_reg->pc & 0xff00) | nut_reg->key_buf; +} + + +static void op_keys_to_c (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->c [4] = nut_reg->key_buf >> 4; + nut_reg->c [3] = nut_reg->key_buf & 0x0f; +} + + +static void op_test_kb (nut_reg_t *nut_reg, int opcode) +{ +#ifdef KEYBOARD_DEBUG + printf ("kb test, addr %04x, state %s\n", nut_reg->prev_pc, kbd_state_name [nut_reg->kb_state]); +#endif + + nut_reg->carry = ((nut_reg->kb_state == KB_PRESSED) || + (nut_reg->kb_state == KB_RELEASED)); + if (nut_reg->kb_state == KB_WAIT_CHK) + { + nut_reg->kb_state = KB_WAIT_CYC; + nut_reg->kb_debounce_cycle_counter = KBD_RELEASE_DEBOUNCE_CYCLES; + } +} + + +static void op_reset_kb (nut_reg_t *nut_reg, int opcode) +{ +#ifdef KEYBOARD_DEBUG + printf ("kb reset, addr %04x, state %s\n", nut_reg->prev_pc, kbd_state_name [nut_reg->kb_state]); +#endif + + if (nut_reg->kb_state == KB_RELEASED) + nut_reg->kb_state = KB_WAIT_CHK; +} + + +static void nut_kbd_scanner_cycle (nut_reg_t *nut_reg) +{ + if ((nut_reg->kb_state == KB_WAIT_CYC) && + (--nut_reg->kb_debounce_cycle_counter == 0)) + { + if (nut_reg->key_down) + { + nut_reg->kb_state = KB_PRESSED; +#ifdef SLEEP_DEBUG + if (! nut_reg->awake) + printf ("waking up!\n"); +#endif + nut_reg->awake = true; + } + else + nut_reg->kb_state = KB_IDLE; + } +} + + +static void nut_kbd_scanner_sleep (nut_reg_t *nut_reg) +{ +#ifdef KEYBOARD_DEBUG + printf ("nut_kbd_scanner_sleep, state=%s\n", kbd_state_name [nut_reg->kb_state]); +#endif + + if (nut_reg->kb_state == KB_PRESSED) + { + // $$$ This shouldn't happen, should it? +#if defined(KEYBOARD_DEBUG) || defined(SLEEP_DEBUG) + if (! nut_reg->awake) + printf ("waking up!\n"); +#endif + nut_reg->awake = true; + } + if (nut_reg->kb_state == KB_WAIT_CYC) + { + if (nut_reg->key_down) + { + nut_reg->kb_state = KB_PRESSED; +#if defined(KEYBOARD_DEBUG) || defined(SLEEP_DEBUG) + if (! nut_reg->awake) + printf ("waking up!\n"); +#endif + nut_reg->awake = true; + } + else + nut_reg->kb_state = KB_IDLE; + } +} + + +/* + * misc. operations + */ + +static void op_nop (nut_reg_t *nut_reg, int opcode) +{ +} + +static void op_set_hex (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->decimal = false; +} + +static void op_set_dec (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->decimal = true; +} + +static void op_rom_to_c (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->cxisa_addr = ((nut_reg->c [6] << 12) | + (nut_reg->c [5] << 8) | + (nut_reg->c [4] << 4) | + (nut_reg->c [3])); + nut_reg->inst_state = cxisa; +} + +static void op_rom_to_c_cycle_2 (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->c [2] = opcode >> 8; + nut_reg->c [1] = (opcode >> 4) & 0x0f; + nut_reg->c [0] = opcode & 0x0f; + + nut_reg->inst_state = norm; +} + +static void op_clear_abc (nut_reg_t *nut_reg, int opcode) +{ + reg_zero (nut_reg->a, 0, WSIZE - 1); + reg_zero (nut_reg->b, 0, WSIZE - 1); + reg_zero (nut_reg->c, 0, WSIZE - 1); +} + +static void op_ldi (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->inst_state = ldi; +} + +static void op_ldi_cycle_2 (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->c [2] = opcode >> 8; + nut_reg->c [1] = (opcode >> 4) & 0x0f; + nut_reg->c [0] = opcode & 0x00f; + + nut_reg->inst_state = norm; +} + +static void op_or (nut_reg_t *nut_reg, int opcode) +{ + int i; + + for (i = 0; i < WSIZE; i++) + nut_reg->c [i] |= nut_reg->a [i]; + if (nut_reg->prev_carry && (nut_reg->prev_tef_last == (WSIZE - 1))) + { + nut_reg->c [WSIZE - 1] = nut_reg->c [0]; + nut_reg->a [WSIZE - 1] = nut_reg->c [0]; + } +} + +static void op_and (nut_reg_t *nut_reg, int opcode) +{ + int i; + + for (i = 0; i < WSIZE; i++) + nut_reg->c [i] &= nut_reg->a [i]; + if (nut_reg->prev_carry && (nut_reg->prev_tef_last == (WSIZE - 1))) + { + nut_reg->c [WSIZE - 1] = nut_reg->c [0]; + nut_reg->a [WSIZE - 1] = nut_reg->c [0]; + } +} + +static void op_rcr (nut_reg_t *nut_reg, int opcode) +{ + int i, j; + reg_t t; + + j = tmap [opcode >> 6]; + for (i = 0; i < WSIZE; i++) + { + t [i] = nut_reg->c [j++]; + if (j >= WSIZE) + j = 0; + } + for (i = 0; i < WSIZE; i++) + nut_reg->c [i] = t [i]; +} + +static void op_lld (nut_reg_t *nut_reg, int opcode) +{ + nut_reg->carry = 0; /* "batteries" are fine */ +} + +static void op_powoff (nut_reg_t *nut_reg, int opcode) +{ +#ifdef SLEEP_DEBUG + printf ("going to sleep!\n"); +#endif + nut_reg->awake = false; + nut_reg->pc = 0; + do_event_int (nut_reg, event_sleep); + //voyager_display_event_fn (nut_reg, event_sleep); +} + + +static void nut_init_ops (nut_reg_t *nut_reg) +{ + int i; + + for (i = 0; i < 1024; i += 4) + { + nut_reg->op_fcn [i + 0] = bad_op; + nut_reg->op_fcn [i + 1] = op_long_branch; + nut_reg->op_fcn [i + 2] = op_arith; /* type 2: ooooowww10 */ + nut_reg->op_fcn [i + 3] = op_short_branch; + } + + nut_reg->op_fcn [0x000] = op_nop; + + // nut_reg->op_fcn [0x040] = op_write_mldl; + + for (i = 0; i < 4; i++) + nut_reg->op_fcn [0x100 + i * 0x040] = op_enbank; + + // for (i = 0; i < 8; i++) + // op_fcn [0x200 + (i << 6)] = op_write_pil; + + for (i = 0; i < WSIZE; i ++) + { + nut_reg->op_fcn [0x004 + (itmap [i] << 6)] = op_clr_s; + nut_reg->op_fcn [0x008 + (itmap [i] << 6)] = op_set_s; + nut_reg->op_fcn [0x00c + (itmap [i] << 6)] = op_test_s; + nut_reg->op_fcn [0x014 + (itmap [i] << 6)] = op_test_pt; + nut_reg->op_fcn [0x01c + (itmap [i] << 6)] = op_set_pt; + nut_reg->op_fcn [0x02c + (itmap [i] << 6)] = op_test_ext_flag; + nut_reg->op_fcn [0x03c + (itmap [i] << 6)] = op_rcr; + } + nut_reg->op_fcn [0x3c4] = op_clear_all_s; + nut_reg->op_fcn [0x3c8] = op_reset_kb; + nut_reg->op_fcn [0x3cc] = op_test_kb; + nut_reg->op_fcn [0x3d4] = op_dec_pt; + nut_reg->op_fcn [0x3dc] = op_inc_pt; + // 0x3fc = LCD compensation + + for (i = 0; i < 16; i++) + { + nut_reg->op_fcn [0x010 + (i << 6)] = op_lc; + nut_reg->op_fcn [0x024 + (i << 6)] = op_selprf; + nut_reg->op_fcn [0x028 + (i << 6)] = op_write_reg_n; + nut_reg->op_fcn [0x038 + (i << 6)] = op_read_reg_n; + } + + nut_reg->op_fcn [0x058] = op_c_to_g; + nut_reg->op_fcn [0x098] = op_g_to_c; + nut_reg->op_fcn [0x0d8] = op_c_exch_g; + + nut_reg->op_fcn [0x158] = op_c_to_m; + nut_reg->op_fcn [0x198] = op_m_to_c; + nut_reg->op_fcn [0x1d8] = op_c_exch_m; + + nut_reg->op_fcn [0x258] = op_sb_to_f; + nut_reg->op_fcn [0x298] = op_f_to_sb; + nut_reg->op_fcn [0x2d8] = op_f_exch_sb; + + nut_reg->op_fcn [0x358] = op_c_to_s; + nut_reg->op_fcn [0x398] = op_s_to_c; + nut_reg->op_fcn [0x3d8] = op_c_exch_s; + + nut_reg->op_fcn [0x020] = op_pop; + nut_reg->op_fcn [0x060] = op_powoff; + nut_reg->op_fcn [0x0a0] = op_sel_p; + nut_reg->op_fcn [0x0e0] = op_sel_q; + nut_reg->op_fcn [0x120] = op_test_pq; + nut_reg->op_fcn [0x160] = op_lld; + nut_reg->op_fcn [0x1a0] = op_clear_abc; + nut_reg->op_fcn [0x1e0] = op_goto_c; + nut_reg->op_fcn [0x220] = op_keys_to_c; + nut_reg->op_fcn [0x260] = op_set_hex; + nut_reg->op_fcn [0x2a0] = op_set_dec; + // 0x2e0 = display off (Nut, Voyager) + // 0x320 = display toggle (Nut, Voyager) + nut_reg->op_fcn [0x360] = op_return_if_carry; + nut_reg->op_fcn [0x3a0] = op_return_if_no_carry; + nut_reg->op_fcn [0x3e0] = op_return; + + // 0x030 = display blink (Voyager) + // 0x030 = ROMBLK (Hepax) + nut_reg->op_fcn [0x070] = op_c_to_n; + nut_reg->op_fcn [0x0b0] = op_n_to_c; + nut_reg->op_fcn [0x0f0] = op_c_exch_n; + nut_reg->op_fcn [0x130] = op_ldi; + nut_reg->op_fcn [0x170] = op_push_c; + nut_reg->op_fcn [0x1b0] = op_pop_c; + // 0x1f0 = WPTOG (Hepax) + nut_reg->op_fcn [0x230] = op_keys_to_rom_addr; + nut_reg->op_fcn [0x270] = op_c_to_dadd; + // nut_reg->op_fcn [0x2b0] = op_clear_regs; + nut_reg->op_fcn [0x2f0] = op_c_to_data; + nut_reg->op_fcn [0x330] = op_rom_to_c; + nut_reg->op_fcn [0x370] = op_or; + nut_reg->op_fcn [0x3b0] = op_and; + nut_reg->op_fcn [0x3f0] = op_c_to_pfad; + +} + + +/*void nut_disassemble (nut_reg_t *nut_reg, int addr, char *buf, int len) +{ + ////nut_reg_t *nut_reg = get_chip_data (sim->first_chip); + int op1, op2; + + switch (nut_reg->inst_state) + { + case long_branch: snprintf (buf, len, "(long branch)"); return; + case cxisa: snprintf (buf, len, "(cxisa)"); return; + case ldi: snprintf (buf, len, "(immediate)"); return; + case selprf: snprintf (buf, len, "(selprf)"); return; + case norm: break; + } + + op1 = nut_get_ucode (nut_reg, addr); + op2 = nut_get_ucode (nut_reg, addr + 1); + + //nut_disassemble_inst (addr, op1, op2, buf, len); +}*/ + + +/*static void print_reg (reg_t reg) +{ + int i; + for (i = WSIZE - 1; i >= 0; i--) + printf ("%x", reg [i]); +}*/ + + +/*static void print_stat (nut_reg_t *nut_reg) +{ + int i; + for (i = 0; i < SSIZE; i++) + printf (nut_reg->s [i] ? "%x" : ".", i); +}*/ + + +/*void nut_print_state (nut_reg_t *nut_reg) +{ + printf ("cycle %5" PRId64 " ", nut_reg->cycle_count); + printf ("%c=%x ", (nut_reg->q_sel) ? 'p' : 'P', nut_reg->p); + printf ("%c=%x ", (nut_reg->q_sel) ? 'Q' : 'q', nut_reg->q); + printf ("carry=%d ", nut_reg->carry); + printf (" stat="); + print_stat (nut_reg); + printf ("\n"); + printf (" a="); + print_reg (nut_reg->a); + printf (" b="); + print_reg (nut_reg->b); + printf (" c="); + print_reg (nut_reg->c); + printf ("\n"); + + if (sim->source [nut_reg->prev_pc]) + printf ("%s\n", sim->source [nut_reg->prev_pc]); + else + { + char buf [80]; + nut_disassemble (sim, nut_reg->prev_pc, buf, sizeof (buf)); + printf (" %s\n", buf); + } +}*/ + +bool nut_execute_cycle (nut_reg_t *nut_reg) +{ + int opcode; + + do_event_int (nut_reg, event_cycle); + //voyager_display_event_fn (nut_reg, event_cycle); + + if (! nut_reg->awake) + return (false); + + if (nut_reg->inst_state == cxisa) + nut_reg->prev_pc = nut_reg->cxisa_addr; + else + nut_reg->prev_pc = nut_reg->pc; + + opcode = nut_get_ucode (nut_reg, nut_reg->prev_pc); + +#ifdef HAS_DEBUGGER + if (sim->debug_flags & (1 << SIM_DEBUG_TRACE)) + nut_print_state (sim); +#endif /* HAS_DEBUGGER */ + + nut_reg->prev_carry = nut_reg->carry; + nut_reg->carry = 0; + + switch (nut_reg->inst_state) + { + case norm: + nut_reg->pc++; + (* nut_reg->op_fcn [opcode]) (nut_reg, opcode); + break; + case long_branch: + nut_reg->pc++; + op_long_branch_word_2 (nut_reg, opcode); + break; + case cxisa: + op_rom_to_c_cycle_2 (nut_reg, opcode); + break; + case ldi: + nut_reg->pc++; + op_ldi_cycle_2 (nut_reg, opcode); + break; + case selprf: + nut_reg->pc++; + op_smart_periph (nut_reg, opcode); + break; + default: + printf ("nut: bad inst_state %d!\n", nut_reg->inst_state); + nut_reg->inst_state = norm; + break; + } + nut_reg->cycle_count++; + + return (true); +} + + +bool nut_execute_instruction (nut_reg_t *nut_reg) +{ + do + { +#if 1 + (void) nut_execute_cycle (nut_reg); +#else + if (! nut_execute_cycle (nut_reg)) + return false; +#endif + } + while (nut_reg->inst_state != norm); + return true; +} + + +static bool parse_hex (char *hex, int digits, int *val) +{ + *val = 0; + + while (digits--) + { + char c = *(hex++); + (*val) <<= 4; + if ((c >= '0') && (c <= '9')) + (*val) += (c - '0'); + else if ((c >= 'A') && (c <= 'F')) + (*val) += (10 + (c - 'A')); + else if ((c >= 'a') && (c <= 'f')) + (*val) += (10 + (c - 'a')); + else + return (false); + } + return (true); +} + + +bool nut_parse_object_line (char *buf, int *bank, int *addr, + rom_word_t *opcode) +{ + int b = 0; + int a; + int o; + + if (buf [0] == '#') /* comment? */ + return (false); + + if (strlen (buf) != 8) + return (false); + + if (buf [4] != ':') + { + fprintf (stderr, "invalid object file format\n"); + return (false); + } + + if (! parse_hex (& buf [0], 4, & a)) + { + fprintf (stderr, "invalid address %o\n", a); + return (false); + } + + if (! parse_hex (& buf [5], 3, & o)) + { + fprintf (stderr, "invalid opcode %o\n", o); + return (false); + } + + *bank = b; + *addr = a; + *opcode = o; + return (true); +} + + +bool nut_parse_listing_line (char *buf, int *bank, int *addr, + rom_word_t *opcode) +{ + return (false); +} + + +void nut_press_key (nut_reg_t *nut_reg, int keycode) +{ +#ifdef KEYBOARD_DEBUG + printf ("key %o press, addr %04x, state %s\n", keycode, nut_reg->prev_pc, kbd_state_name [nut_reg->kb_state]); +#endif + +#if 0 + if ((! nut_reg->awake) && (! nut_reg->display_enable) && (keycode != 0x18)) + return; +#endif + nut_reg->key_buf = keycode; + nut_reg->key_down = true; + if (nut_reg->kb_state == KB_IDLE) + nut_reg->kb_state = KB_PRESSED; +#ifdef SLEEP_DEBUG + if (! nut_reg->awake) + printf ("waking up!\n"); +#endif + nut_reg->awake = true; + do_event_int (nut_reg, event_wake); + //voyager_display_event_fn (nut_reg, event_wake); +} + +void nut_release_key (nut_reg_t *nut_reg) +{ +#ifdef KEYBOARD_DEBUG + printf ("key release, addr %04x, state %s\n", nut_reg->prev_pc, kbd_state_name [nut_reg->kb_state]); +#endif + + nut_reg->key_down = false; + if (nut_reg->kb_state == KB_PRESSED) + nut_reg->kb_state = KB_RELEASED; +} + +void nut_set_ext_flag (nut_reg_t *nut_reg, int flag, bool state) +{ + ; // not yet implemented +} + + +static void nut_reset (nut_reg_t *nut_reg) +{ + int i; + + nut_reg->cycle_count = 0; + + for (i = 0; i < WSIZE; i++) + { + nut_reg->a [i] = 0; + nut_reg->b [i] = 0; + nut_reg->c [i] = 0; + nut_reg->m [i] = 0; + nut_reg->n [i] = 0; + } + + for (i = 0; i < SSIZE; i++) + nut_reg->s [i] =0; + + nut_reg->p = 0; + nut_reg->q = 0; + nut_reg->q_sel = false; + + for (i = 0; i < MAX_PAGE; i++) + nut_reg->active_bank [i] = 0; + + /* wake from deep sleep */ + nut_reg->awake = true; + nut_reg->pc = 0; + nut_reg->inst_state = norm; + nut_reg->carry = 1; + + nut_reg->kb_state = KB_IDLE; +} + + +static void nut_clear_memory (nut_reg_t *nut_reg) +{ + int addr; + + for (addr = 0; addr < nut_reg->max_ram; addr++) + if (nut_reg->ram_exists [addr]) + reg_zero ((digit_t *)& nut_reg->ram [addr], 0, WSIZE - 1); +} + + +bool nut_read_ram (nut_reg_t *nut_reg, int addr, uint64_t *val) +{ + uint64_t data = 0; + int i; + + if (addr > nut_reg->max_ram) + fatal (2, "classic_read_ram: address %d out of range\n", addr); + if (! nut_reg->ram_exists [addr]) + return false; + + // pack nut_reg->ram [addr] into data + for (i = WSIZE - 1; i >= 0; i--) + { + data <<= 4; + data += nut_reg->ram [addr] [i]; + } + + *val = data; + + return true; +} + + +bool nut_write_ram (nut_reg_t *nut_reg, int addr, uint64_t *val) +{ + uint64_t data; + int i; + + if (addr > nut_reg->max_ram) + fatal (2, "sim_write_ram: address %d out of range\n", addr); + if (! nut_reg->ram_exists [addr]) + return false; + + data = *val; + + // now unpack data into nut_reg->ram [addr] + for (i = 0; i <= WSIZE; i++) + { + nut_reg->ram [addr] [i] = data & 0x0f; + data >>= 4; + } + + return true; +} + + +static void nut_new_rom_addr_space (nut_reg_t *nut_reg, + int max_bank, + int max_page, + int page_size) +{ + ; +} + + + +static void nut_new_pf_addr_space (nut_reg_t *nut_reg, int max_pf) +{ + nut_reg->max_pf = max_pf; + nut_reg->pf_exists = (bool *)alloc (max_pf * sizeof (bool)); +} + + +static void nut_new_ram_addr_space (nut_reg_t *nut_reg, int max_ram) +{ + nut_reg->max_ram = max_ram; + nut_reg->ram_exists = (bool *) alloc (max_ram * sizeof (bool)); + nut_reg->ram = (reg_t *) alloc (max_ram * sizeof (reg_t)); + nut_reg->ram_read_fn = (ram_access_fn_t **)alloc (max_ram * sizeof (ram_access_fn_t *)); + nut_reg->ram_write_fn = (ram_access_fn_t **)alloc (max_ram * sizeof (ram_access_fn_t *)); +} + + +static void nut_new_ram (nut_reg_t *nut_reg, int base_addr, int count) +{ + int i; + + for (i = base_addr; i < (base_addr + count); i++) + nut_reg->ram_exists [i] = true; +} + +//static nut_reg_t *nnn; + +nut_reg_t * nut_new_processor (int ram_size, void *display) +{ + nut_reg_t *nut_reg; + + nut_reg = (nut_reg_t *)alloc (sizeof (nut_reg_t)); + + nut_init_ops (nut_reg); + + nut_new_rom_addr_space (nut_reg, MAX_BANK, MAX_PAGE, N_PAGE_SIZE); + nut_new_ram_addr_space (nut_reg, 1024); + nut_new_pf_addr_space (nut_reg, 256); + + nut_new_ram (nut_reg, 0x000, 8); + ram_size -= 8; + + nut_new_ram (nut_reg, 0x008, 3); // I/O registers + nut_reg->ram_read_fn [0x08] = nut_ram_read_zero; + nut_reg->ram_write_fn [0x08] = nut_ram_write_ignore; + + if (ram_size > 40) + { + nut_new_ram (nut_reg, 0x010, 8); + ram_size -= 8; + + nut_new_ram (nut_reg, 0x018, 3); // I/O registers + nut_reg->ram_read_fn [0x18] = nut_ram_read_zero; + nut_reg->ram_write_fn [0x18] = nut_ram_write_ignore; + } + + nut_new_ram (nut_reg, 0x100 - ram_size, ram_size); + + voyager_display_init (nut_reg); + + do_event_int (nut_reg, event_reset); + //voyager_display_event_fn (nut_reg, event_reset); + + nut_reg->max_rom = MAX_PAGE * N_PAGE_SIZE; + nut_reg->max_bank = MAX_BANK; + + nut_reg->display = display; + + return nut_reg; +} + + +void nut_free_processor (nut_reg_t *nut_reg) +{ + ////remove_chip (sim->first_chip); +} + + +/*static void nut_event_fn (sim_t *sim, + chip_t *chip, + int event, + int arg, + void *data)*/ + +void nut_event_fn (nut_reg_t *nut_reg, event_t event) +{ + switch (event) + { + case event_cycle: + nut_kbd_scanner_cycle (nut_reg); + break; + case event_sleep: + nut_kbd_scanner_sleep (nut_reg); + break; + case event_reset: + nut_reset (nut_reg); + break; + case event_clear_memory: + nut_clear_memory (nut_reg); + break; + default: + // warning ("proc_nut: unknown event %d\n", event); + break; + } +} + +void do_event(nut_reg_t *nut_reg, event_t event) +{ + nut_event_fn (nut_reg, event); + voyager_display_event_fn (nut_reg, event); +} + +void do_event_int(nut_reg_t *nut_reg, event_t event) +{ + nut_event_fn (nut_reg, event); + voyager_display_event_fn (nut_reg, event); +} + +bool nut_read_object_file (nut_reg_t *nut_reg, const char *fn) +{ + FILE *f; + int bank; + int addr; // should change to addr_t, but will have to change + // the parse function profiles to match. + rom_word_t opcode; + int count = 0; + char buf [80]; + char magic [4]; + bool eof, error; + + f = fopen (fn, "rb"); + if (! f) + { + fprintf (stderr, "error opening object file\n"); + return (false); + } + + + if (fread_bytes (f, magic, sizeof (magic), & eof, & error) != sizeof (magic)) + { + fprintf (stderr, "error reading object file\n"); + return (false); + } + + + //if (strncmp (magic, "MOD1", sizeof (magic)) == 0) + // return sim_read_mod1_file (sim, f); + + f = freopen (fn, "r", f); + + if (! f) + { + fprintf (stderr, "error reopening object file\n"); + return (false); + } + + while (fgets (buf, sizeof (buf), f)) + { + trim_trailing_whitespace (buf); + if (! buf [0]) + continue; + if (nut_parse_object_line (buf, & bank, & addr, & opcode)) + { + if (! nut_write_rom (nut_reg, bank, addr, & opcode)) + fatal (3, "can't load ROM word at bank %d address %o\n", bank, addr); + count++; + } + } + +#if 0 + fprintf (stderr, "read %d words from '%s'\n", count, fn); +#endif + return (true); +} + + + + + +/*int nut_write_ram_file (nut_reg_t *nut_reg, char *ramfn) +{ + FILE *f; + int addr; + char buf [10]; + + f = fopen (ramfn, "w"); + if (!f) + return (0); + + fprintf (f, "f: "); write_flags (f); + fprintf (f, "a: "); write_reg (f, nut_reg->a, WSIZE); + fprintf (f, "b: "); write_reg (f, nut_reg->b, WSIZE); + fprintf (f, "c: "); write_reg (f, nut_reg->c, WSIZE); + fprintf (f, "m: "); write_reg (f, nut_reg->m, WSIZE); + fprintf (f, "n: "); write_reg (f, nut_reg->n, WSIZE); + fprintf (f, "g: "); write_reg (f, g, 2); + fprintf (f, "p: "); write_reg (f, & p, 1); + fprintf (f, "q: "); write_reg (f, & q, 1); + write_status (f); + fprintf (f, "P: %04x\n", pc); + fprintf (f, "S:"); write_stack (f); + for (addr = 0; addr < MAX_PFAD; addr++) + if (pf_exists [addr] && save_fcn [addr]) + { + sprintf (buf, "x%02x-", addr); + save_fcn [addr] (f, buf); + } + for (addr = 0; addr < MAX_RAM; addr++) + if (ram_exists [addr]) + { + fprintf (f, "%03x: ", addr); + write_reg (f, ram [addr], WSIZE); + } + fclose (f); + return (1); +}*/ + +/*static void write_reg_t (FILE *f, const char *name, reg_t reg) +{ + int i; + fprintf (f,"%s:", name); + for (i = WSIZE - 1; i >= 0; i--) + fprintf (f, "%x", reg [i]); + fputc ('\n',f); +} + +static void write_rom_addr_t (FILE *f, const char *name, rom_addr_t addr) +{ + fprintf (f, "%s:%04x\n", name, addr); +} + + +static void write_digit_ts (FILE *f, const char *name, digit_t *dig, int size) +{ + int i; + + fprintf (f, "%s:", name); + for (i = size - 1; i >= 0; i--) + fprintf (f, "%x", dig [i]); + fputc ('\n',f); +} + +static void write_digit_t (FILE *f, const char *name, digit_t dig) +{ + fprintf (f, "%s:%x\n", name, dig); +} + +static void write_bool (FILE *f, const char *name, bool val) +{ + fprintf (f, "%s:%s\n", name, (val? "T" : "F")); +} + +static void write_stat (FILE *f, const char *name, nut_reg_t *nut_reg) +{ + int i; + + fprintf (f, "%s:", name); + for (i = 0; i < SSIZE; i++) + fprintf (f, nut_reg->s [i] ? "%x" : ".", i); + fputc ('\n',f); +} + +static void write_stack (FILE *f, const char *name, rom_addr_t *stack) +{ + int i; + + fprintf (f, "%s:", name); + for (i = 0; i < STACK_DEPTH; i++) + fprintf (f, " %04x", stack [i]); + fputc ('\n',f); +}*/ + +bool nut_print_state(nut_reg_t *nut_reg) +{ +/* uint16_t i; + uint64_t val; + FILE *f; + + write_reg_t (stdout, "a", nut_reg->a); // reg_t a; + write_reg_t (stdout, "b", nut_reg->b); // reg_t b; + write_reg_t (stdout, "c", nut_reg->c); // reg_t c; + write_reg_t (stdout, "m", nut_reg->m); // reg_t m; + write_reg_t (stdout, "n", nut_reg->n); // reg_t n; + + write_digit_ts (stdout, "g", nut_reg->g, 2); // digit_t[2]; + + write_digit_t (stdout, "p", nut_reg->p); // digit_t + write_digit_t (stdout, "q", nut_reg->q); // digit_t + write_bool (stdout, "q_sel", nut_reg->q_sel); // bool + + write_digit_t (stdout, "fo", nut_reg->fo); // uint8_t + write_bool (stdout,"decimal", nut_reg->decimal); // bool + write_bool (stdout, "carry", nut_reg->carry); // bool + ////write_bool (stdout, "prev_carry", nut_reg->prev_carry); // bool + + ////printf ("prev_tef_last:%x\n",nut_reg->prev_tef_last); //int + + write_stat (stdout, "s", nut_reg); // bool[SSIZE]; + + write_rom_addr_t (stdout, "pc", nut_reg->pc); // rom_addr_t + ////write_rom_addr_t (stdout, "prev_pc", nut_reg->prev_pc); // rom_addr_t + + write_stack (stdout, "stack", nut_reg->stack);// rom_addr_t[STACK_DEPTH] + + ////write_rom_addr_t (stdout, "cxisa_addr", nut_reg->cxisa_addr); // rom_addr_t + + ////printf ("inst_state:%x\n",nut_reg->inst_state); // inst_state_t + + write_rom_addr_t (stdout, "first_word", nut_reg->first_word); // rom_word_t + + + write_bool (stdout, "long_branch_carry", nut_reg->long_branch_carry); // bool + + ////bool key_down; // true while a key is down + ////keyboard_state_t kb_state; + ////int kb_debounce_cycle_counter; + ////int key_buf; // most recently pressed key + + write_bool (stdout, "awake", nut_reg->awake); // bool + + // RAM: + fprintf (stdout, "ram_addr:%x\n",nut_reg->ram_addr); // uint16_t + //bool *ram_exists; + //reg_t *ram; + //ram_access_fn_t **ram_read_fn; + //ram_access_fn_t **ram_write_fn; + + // Peripherals: + //uint16_t max_pf; + //uint8_t pf_addr; // selected peripheral address + write_digit_t (stdout, "pf_addr", nut_reg->pf_addr); // uint8_t + + //bool *pf_exists; + + //bool ext_flag [EXT_FLAG_SIZE]; + + //uint8_t selprf; // selected "smart peripheral" number + + // Function to call for "smart peripheral" to handle opcodes after + // a selprf instruction: + //bool (* selprf_fcn [16])(struct nut_reg_t *nut_reg, rom_word_t opcode); + + + //voyager_display_reg_t *display_chip; + + for (i = 0; i < nut_reg->max_ram; i++) + { + if (nut_read_ram (nut_reg, i, &val)) + printf("%03x:%014llx\n", i,val); + } +*/ + return true; +} \ No newline at end of file diff --git a/src/proc_nut.h b/src/proc_nut.h new file mode 100644 index 0000000..c64d8ce --- /dev/null +++ b/src/proc_nut.h @@ -0,0 +1,200 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + +// +// changes for mac os x by Maciej Bartosiak +// + + +#define WSIZE 14 +#define EXPSIZE 3 // two exponent and one exponent sign digit + +typedef digit_t reg_t [WSIZE]; + + +#define SSIZE 14 + + +#define EXT_FLAG_SIZE 14 + +#define EF_PRINTER_BUSY 0 // 82143A printer +#define EF_CARD_READER 1 // 82104A card reader +#define EF_WAND_DATA_AVAIL 2 // 82153A bar code wand +#define EF_BLINKY_EDAV 5 // 88242A IR printer module +#define EF_HPIL_IFCR 6 // 82160A HP-IL module +#define EF_HPIL_SRQR 7 +#define EF_HPIL_FRAV 8 +#define EF_HPIL_FRNS 9 +#define EF_HPIL_ORAV 10 +#define EF_TIMER 12 // 82182A Time Module (built into 41CX) +#define EF_SERVICE_REQUEST 13 // shared general service request + // Flags 3, 4, and 11 are apparently not used by any standard peripherals + + +#define STACK_DEPTH 4 + +//#undef PAGE_SIZE +#define N_PAGE_SIZE 4096 +#define MAX_PAGE 16 +#define MAX_BANK 4 + + +typedef enum +{ + KB_IDLE, + KB_PRESSED, + KB_RELEASED, + KB_WAIT_CHK, + KB_WAIT_CYC, + KB_STATE_MAX // must be last +} keyboard_state_t; + + +enum +{ + event_periph_select = first_arch_event, + event_ram_select +}; + + +typedef uint16_t rom_addr_t; + + +typedef enum +{ + norm, + long_branch, + cxisa, + ldi, + selprf // "smart" peripheral selected (NPIC, PIL) +} inst_state_t; + + +struct nut_reg_t; + +typedef void ram_access_fn_t (struct nut_reg_t *nut_reg, int addr, reg_t *reg); + +typedef struct nut_reg_t +{ + reg_t a; + reg_t b; + reg_t c; + reg_t m; + reg_t n; + digit_t g [2]; + + digit_t p; + digit_t q; + bool q_sel; // true if q is the selected pointer, false for p + + uint8_t fo; /* flag output regiters, 8 bits, used to drive bender */ + + bool decimal; // true for arithmetic radix 10, false for 16 + + bool carry; // carry being generated in current instruction + bool prev_carry; // carry that resulted from previous instruction + + int prev_tef_last; // last digit of field of previous arith. instruction + // used to simulate bug in logical or and and + + bool s [SSIZE]; + + rom_addr_t pc; + rom_addr_t prev_pc; + + rom_addr_t stack [STACK_DEPTH]; + + rom_addr_t cxisa_addr; + + inst_state_t inst_state; + + rom_word_t first_word; /* long branch: remember first word */ + bool long_branch_carry; /* and carry */ + + bool key_down; /* true while a key is down */ + keyboard_state_t kb_state; + int kb_debounce_cycle_counter; + int key_buf; /* most recently pressed key */ + + bool awake; + + void (* op_fcn [1024])(struct nut_reg_t *nut_reg, int opcode); + + // ROM: + int bank_group [MAX_PAGE]; // defines which pages bank switch together + uint8_t active_bank [MAX_PAGE]; // bank number from 0..MAX_BANK-1 + //bool rom_writeable [MAX_PAGE][MAX_BANK]; + rom_word_t *rom [MAX_PAGE][MAX_BANK]; + //bool *rom_breakpoint [MAX_PAGE][MAX_BANK]; + // source_code_line_info_t *source_code_line_info [MAX_PAGE][MAX_BANK]; + + // RAM: + uint16_t ram_addr; // selected RAM address + bool *ram_exists; + reg_t *ram; + ram_access_fn_t **ram_read_fn; + ram_access_fn_t **ram_write_fn; + + // Peripherals: + uint16_t max_pf; + uint8_t pf_addr; // selected peripheral address + bool *pf_exists; + + bool ext_flag [EXT_FLAG_SIZE]; + + // Peripheral I/O functions return true if the peripheral responded. + bool (* rd_n_fcn [256])(struct nut_reg_t *nut_reg, int n); + bool (* wr_n_fcn [256])(struct nut_reg_t *nut_reg, int n); + bool (* wr_fcn [256])(struct nut_reg_t *nut_reg); + + uint8_t selprf; // selected "smart peripheral" number + + // Function to call for "smart peripheral" to handle opcodes after + // a selprf instruction: + bool (* selprf_fcn [16])(struct nut_reg_t *nut_reg, rom_word_t opcode); + + //chip_t *display_chip; // opaque + //chip_t *phineas_chip; // opaque + //chip_t *helios_chip; // opaque + + voyager_display_reg_t *display_chip; + + //sim_t *sim; + + int display_digits; + segment_bitmap_t display_segments [MAX_DIGIT_POSITION]; + //bool need_redraw; + void *display; + + uint64_t cycle_count; + + uint16_t max_ram; + + int max_rom; + int max_bank; +} nut_reg_t; + +nut_reg_t * nut_new_processor (int ram_size, void *display); +bool nut_read_object_file (nut_reg_t *nut_reg, const char *fn); +void nut_press_key (nut_reg_t *nut_reg, int keycode); +void nut_release_key (nut_reg_t *nut_reg); +bool nut_execute_instruction (nut_reg_t *nut_reg); +bool nut_print_state(nut_reg_t *nut_reg); \ No newline at end of file diff --git a/src/unused/CalculatorApp.h b/src/unused/CalculatorApp.h new file mode 100644 index 0000000..205c182 --- /dev/null +++ b/src/unused/CalculatorApp.h @@ -0,0 +1,65 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import +#import +//#import +#import +#import +#import +//#import +#import +#import +//#import +//#import +//#import +//#import +#import +//#import +#import +//#import +//#import + +//#import +//#import + +#include "keymacros.h" + +#include +#define HP15C 1 + +#ifdef HP15C +#define MODEL "15c" +#define APPNAME "HP-15C" +#define CFGPATH "~/Library/net.ihatewaiting.iphone.hpcalc/15c" +#define ABOUTURL "http://ihatewaiting.net/hp15c.html" +#include "version-15c.h" +#endif + +@class CalculatorView; +@class MenuView; + +@interface CalculatorApp : UIApplication { + UIWindow * mainWindow; + CalculatorView * calcView; + MenuView * menuView; +} + +- (void) applicationDidFinishLaunching: (id) fp8; + +@end diff --git a/src/unused/CalculatorApp.m b/src/unused/CalculatorApp.m new file mode 100644 index 0000000..8c1334e --- /dev/null +++ b/src/unused/CalculatorApp.m @@ -0,0 +1,60 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import "CalculatorApp.h" +#import "CalculatorView.h" +#import "MenuView.h" + +@implementation CalculatorApp + +// - (BOOL)respondsToSelector:(SEL)aSelector { +// NSLog(@"%@", NSStringFromSelector(aSelector)); +// return [super respondsToSelector:aSelector]; +// } + +- (void) applicationDidFinishLaunching: (id) fp8 { + // init main window for the application to be the whole screen. + struct CGRect frame = CGRectMake(0, 0, 320, 480); + + mainWindow = [[UIWindow alloc] initWithContentRect: frame]; + + calcView = [[CalculatorView alloc] initWithFrame: frame]; + menuView = [[MenuView alloc] initWithFrame: frame]; + [menuView setEnabled:NO]; + [calcView addSubview: menuView]; + + [calcView setMenuView:menuView]; + [menuView setCalcView:calcView]; + + [mainWindow orderFront: self]; + [mainWindow makeKey: self]; + [mainWindow _setHidden: NO]; + [mainWindow setContentView: calcView]; + + /* show landscape status bar */ + [self setStatusBarMode:3 orientation:90 duration:0]; + // [self setStatusBarShowsProgress:NO]; +} + +- (void) applicationWillTerminate { + [calcView shutdown]; + + [super applicationWillTerminate]; +} + +@end diff --git a/src/unused/CalculatorView.h b/src/unused/CalculatorView.h new file mode 100644 index 0000000..257e2d1 --- /dev/null +++ b/src/unused/CalculatorView.h @@ -0,0 +1,44 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + +//@class KeypadView; +@class DisplayView; +@class HPCalc; + +@interface CalculatorView : UIView { + UIImageView * background; + //KeypadView * keypad; + DisplayView * display; + HPCalc * calc; + //MenuView * _menuView; +} + +- (id) initWithFrame: (CGRect) frame; +- (void) keyPressed: (int) code; +- (void) playMacro:(NSString *) macro; +- (void) shutdown; +//- (void) setMenuView:(MenuView *) v; + +@end diff --git a/src/unused/CalculatorView.m b/src/unused/CalculatorView.m new file mode 100644 index 0000000..73570ea --- /dev/null +++ b/src/unused/CalculatorView.m @@ -0,0 +1,77 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + +#import "CalculatorApp.h" +#import "CalculatorView.h" +//#import "KeypadView.h" +#import "DisplayView.h" +//#import "MenuView.h" +#import "hpcalc.h" + +@implementation CalculatorView + +- (id) initWithFrame: (CGRect) frame { + self = [super initWithFrame: frame]; + + frame.origin.x += 211; + frame.size.width -= 211; + display = [[DisplayView alloc] initWithFrame: frame]; + [self addSubview: display]; + + //frame.origin.x -= 211; + //frame.size.width += 211; + //keypad = [[KeypadView alloc] initWithFrame: frame parent:self]; + //[self addSubview: keypad]; + + calc = [[HPCalc alloc] initWithDisplay:display]; + + return self; +} + +- (void) keyPressed: (int) code { + if (code == -100) { + //[_menuView setEnabled:YES]; + //[_menuView processKeypress:0]; + } else { + [calc processKeypress:code]; + } +} + +- (void) playMacro:(NSString *) macro { + [calc computeFromString:macro]; +} + +- (void) shutdown { + [calc shutdown]; +} + +/* +- (void) setMenuView:(MenuView *) v { + _menuView = v; +} +*/ + + +@end diff --git a/src/unused/Key.h b/src/unused/Key.h new file mode 100644 index 0000000..0938e6e --- /dev/null +++ b/src/unused/Key.h @@ -0,0 +1,30 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +@class KeypadView; + +@interface Key : UIPushButton { + int _code; + KeypadView *_keypad; +} + +- (id) initWithFrame: (CGRect) frame code: (int) code parent: (KeypadView *) p; +- (void)mouseDown:(struct __GSEvent *)event; +- (void)mouseUp:(struct __GSEvent *)event; + +@end diff --git a/src/unused/Key.m b/src/unused/Key.m new file mode 100644 index 0000000..aa3fe87 --- /dev/null +++ b/src/unused/Key.m @@ -0,0 +1,45 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import "CalculatorApp.h" +#import "KeypadView.h" +#import "Key.h" + +@implementation Key + +- (id) initWithFrame: (CGRect) frame code: (int) code parent: (KeypadView *) p { + self = [super initWithFrame: frame]; + _code = code; + _keypad = p; + return self; +} + +- (void)mouseDown:(struct __GSEvent *)event { + if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"keyClick"] ) { + AudioServicesPlaySystemSound(1105); + } + [_keypad keyPressed:_code]; + [super mouseDown:event]; +} + +- (void)mouseUp:(struct __GSEvent *)event { + [_keypad keyPressed:-1]; + [super mouseUp:event]; +} + +@end diff --git a/src/unused/KeypadView.h b/src/unused/KeypadView.h new file mode 100644 index 0000000..066a85e --- /dev/null +++ b/src/unused/KeypadView.h @@ -0,0 +1,28 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +@class CalculatorView; + +@interface KeypadView : UIImageView { + CalculatorView * _calc; +} + +- (id) initWithFrame: (CGRect)frame parent: (CalculatorView *) p; +- (void) keyPressed: (int) code; + +@end diff --git a/src/unused/KeypadView.m b/src/unused/KeypadView.m new file mode 100644 index 0000000..02cdd59 --- /dev/null +++ b/src/unused/KeypadView.m @@ -0,0 +1,79 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import "CalculatorApp.h" +#import "CalculatorView.h" +#import "KeypadView.h" +#import "Key.h" + +@implementation KeypadView + +- (id) initWithFrame: (CGRect)frame parent: (CalculatorView *) p { + self = [super initWithFrame: frame]; + + _calc = p; + + [self setImage: [UIImage imageNamed: @"keypad.png"]]; + + int codes[10][4] = { + { 24, 17, 16, 19 }, + { 56, 49, 48, 51 }, + { 120, 113, 112, 115 }, + { 200, 193, 192, 195 }, + { 136, 129, 128, 131 }, + { 132, 132, 135, 130 }, + { 197, 196, 199, 194 }, + { 117, 116, 119, 114 }, + { 53, 52, 55, 50 }, + { 21, 20, 23, 18 }, + }; + + // Setup pushbuttons + Key *button; + int r, c; + for (c=0; c<4; c++) { + for (r=0; r<10; r++) { + if (c < 2 && r == 5) { + } else { + button = [[Key alloc] initWithFrame:CGRectMake(12+c*51 -9, 12+r*47 -5, 33 +2*9, 29 +2*5) code:codes[r][c] parent:self]; + [button setShowPressFeedback:YES]; + [self addSubview: button]; + } + } + } + button = [[Key alloc] initWithFrame:CGRectMake(12+0*52 -9, 12+5*47 -5, 33+47 +2*9, 33 +2*5) code:132 parent:self]; + [button setShowPressFeedback:YES]; + [self addSubview: button]; + + // Setup logo button + button = [[Key alloc] initWithFrame:CGRectMake(211+31, 436, 36, 35) code:-100 parent:self]; + [button setShowPressFeedback:YES]; + [self addSubview: button]; + + // set up to get Tap events (handleTapWithCount) + [self setTapDelegate: self]; + + return self; +} + +- (void) keyPressed: (int) code { + [_calc keyPressed:code]; +} + + +@end diff --git a/src/unused/MenuButton.h b/src/unused/MenuButton.h new file mode 100644 index 0000000..148d681 --- /dev/null +++ b/src/unused/MenuButton.h @@ -0,0 +1,34 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import "CalculatorApp.h" + +@interface MenuButton : UIThreePartButton { + bool _initialized; + bool _hidden; + bool _default; + bool _titleLabel; + UITextLabel * _textLabel; +} + +- (void) setHidden:(bool) hidden; +- (void) setDefault:(bool) def; +- (void) setTitleLabel:(bool) titleLabel; +- (id)initWithTitle:(NSString *)title; + +@end \ No newline at end of file diff --git a/src/unused/MenuButton.m b/src/unused/MenuButton.m new file mode 100644 index 0000000..2d1f949 --- /dev/null +++ b/src/unused/MenuButton.m @@ -0,0 +1,178 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import "CalculatorApp.h" +#import "MenuButton.h" +#import + +static UIImage * mbImage = nil; +static UIImage * mbPressedImage = nil; +static CDAnonymousStruct11 mbSlices; +struct __GSFont * mbTitleFont = nil; + +@implementation MenuButton + +// - (BOOL)respondsToSelector:(SEL)aSelector { +// NSLog(@"%@", NSStringFromSelector(aSelector)); +// return [super respondsToSelector:aSelector]; +// } + +- (id)initWithFrame:(struct CGRect)frame { + self = [super initWithFrame: frame]; + return self; +} + +- (id)initWithTitle:(NSString *)title { + CGRect tl, tc, tr; + CGRect ml, mc, mr; + CGRect bl, bc, br; + CGSize size; + int cornerWidth, topHeight, botHeight; + + self = [super init]; + + _initialized = NO; + _hidden = NO; + _default = NO; + _titleLabel = NO; + + if (!mbImage) { + mbImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"/Applications/%s.app/alertbutton.png", APPNAME]]; + size = [mbImage size]; + cornerWidth = 15; + topHeight = 20; + botHeight = 15; + tl = CGRectMake(0, 0, cornerWidth, topHeight); + tc = CGRectMake(cornerWidth, 0, size.width-2*cornerWidth, topHeight); + tr = CGRectMake(size.width-cornerWidth, 0, cornerWidth, topHeight); + ml = CGRectMake(0, topHeight, cornerWidth, size.height-topHeight-botHeight); + mc = CGRectMake(cornerWidth, topHeight, size.width-2*cornerWidth, size.height-topHeight-botHeight); + mr = CGRectMake(size.width-cornerWidth, topHeight, cornerWidth, size.height-topHeight-botHeight); + bl = CGRectMake(0, size.height-botHeight, cornerWidth, botHeight); + bc = CGRectMake(cornerWidth, size.height-botHeight, size.width-2*cornerWidth, botHeight); + br = CGRectMake(size.width-cornerWidth, size.height-botHeight, cornerWidth, botHeight); + mbSlices = (CDAnonymousStruct11) {tl, tc, tr, ml, mc, mr, bl, bc, br}; + } + + if (!mbPressedImage) { + mbPressedImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"/Applications/%s.app/alertbuttonpressed.png", APPNAME]]; + } + + if (!mbTitleFont) { + mbTitleFont = [NSClassFromString(@"WebFontCache") createFontWithFamily:@"Helvetica" traits:2 size:13.0]; + } + + [self setTitle:title]; + + _textLabel = [[UITextLabel alloc] init]; + [_textLabel setText:title]; + [_textLabel setWrapsText:YES]; + [_textLabel setCentersHorizontally:YES]; + + return self; +} + +- (void)mouseDown:(struct __GSEvent *)event { + if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"keyClick"] ) { + AudioServicesPlaySystemSound(1105); + } + [super mouseDown:event]; +} + +- (void)mouseUp:(struct __GSEvent *)event { + [super mouseUp:event]; +} + +- (void)drawButtonPart:(int)part inRect:(struct CGRect)rect { + if ( ! _initialized ) { + CGRect frame = [super frame]; + [self setFrame:frame]; + + if ( _titleLabel ) { + [self setEnabled:NO]; + } + + [_textLabel setFrame:CGRectMake(0, 0, rect.size.width-20, rect.size.height)]; + + if ( _titleLabel ) { + [_textLabel setFont:mbTitleFont]; + // set to gray + [_textLabel setColor:(struct CGColor *)GSColorForSystemColor(3)]; + } else { + // Auto-size text to fit button volumetrically + CGSize size; + struct __GSFont * myFont; + float fontSize = 15.5; + do { + myFont = [NSClassFromString(@"WebFontCache") + createFontWithFamily:@"Helvetica" traits:2 size:fontSize]; + + [_textLabel setFont: myFont]; + size = [_textLabel textSize]; + fontSize -= 0.1; + } while ( (size.width*size.height) > (rect.size.width*rect.size.height)/3.1 ); + [_textLabel setFont: myFont]; + // set to white + [_textLabel setColor:(struct CGColor *)GSColorForSystemColor(1)]; + } + + // [_textLabel setFrame:CGRectMake(0, 0, rect.size.width-10, rect.size.height)]; + _initialized = YES; + } + + [self setEnabled:(!_hidden && !_titleLabel)]; + + // Draw the custom button image + if ( ! _hidden && ! _titleLabel && part==1 ) { + CGRect drawRect = rect; + drawRect.origin.y += 2; + if ([self isPressed] ? !_default : _default) { + [mbPressedImage draw9PartImageWithSliceRects:mbSlices inRect:drawRect]; + } else { + [mbImage draw9PartImageWithSliceRects:mbSlices inRect:drawRect]; + } + } + + // Use UITextLabel routines to display button text + if ( ! _hidden && part==2 ) { + CGRect drawRect = rect; + drawRect.origin.x += 10; + drawRect.size.width -= 20; + [_textLabel drawContentsInRect:drawRect]; + } +} + +- (void) setHidden:(bool) hidden { + _hidden = hidden; + [self setNeedsDisplay]; +} + +- (void) setDefault:(bool) def { + _default = def; +} + +- (void) setTitleLabel:(bool) titleLabel { + _titleLabel = titleLabel; +} + +- (void) setTitle:(NSString *) title { + [super setTitle:title]; + [_textLabel setText:title]; +} + +@end \ No newline at end of file diff --git a/src/unused/MenuView.h b/src/unused/MenuView.h new file mode 100644 index 0000000..c93f130 --- /dev/null +++ b/src/unused/MenuView.h @@ -0,0 +1,72 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import "CalculatorApp.h" +#import "MenuButton.h" +#import "OTUpdateManager.h" + +#import + +@class MenuAlert; + +@interface MenuView : UIView { + MenuAlert * _alert; + CalculatorView * _calcView; + NSMutableArray * _menuStack; + NSMutableDictionary * _menuData; + NSMutableArray * _tagList; + UIProgressBar * _progressBar; + UIAlertSheet * _progressSheet; + bool _progressSheetVisible; + UITable * _table[2]; + int _activeTable; + UIView * _tableView; + UIView * _view; + UITransitionView * _transView; + UITransitionView * _innerTransView; + UINavigationBar * _navBar; +} + +- (void) setCalcView:(CalculatorView *) v; +- (void) processKeypress: (int) code; + +- (int) _nameToTag:(NSString *) name; +- (NSString *) _tagToName:(int) tag; +- (MenuButton *) _buttonWithTag:(int) tag; +- (MenuButton *) _buttonWithName:(NSString *) name; +- (bool) _isMenu:(int) tag; +- (bool) _isMacro:(int) tag; +- (bool) _isFunction:(int) tag; +- (void) _playMacro:(id)tag; +- (void) _performFunction:(id)tag; +- (void) checkForUpdateKeepHidden; +- (void) checkForUpdate; +- (void) promptForUpdate; +- (id) getUpdateManager; +- (id) updatePreferenceButtonName:(id) name; +- (bool) _startupMessageIsNeeded; + +- (void) showProgressSheet; +- (void) hideProgressSheet; +- (void) updateManager:(id) pm statusChanged:(id) status; +- (void) updateManager:(id) pm progressChanged:(id) progress; +- (void) updateManager:(id) pm startedQueue:(id) q; + + + +@end \ No newline at end of file diff --git a/src/unused/MenuView.m b/src/unused/MenuView.m new file mode 100644 index 0000000..3a9784c --- /dev/null +++ b/src/unused/MenuView.m @@ -0,0 +1,550 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import "CalculatorApp.h" +#import "CalculatorView.h" +#import "MenuView.h" +#import "MenuButton.h" +#import + +@interface NetworkController : NSObject ++ (id) sharedInstance; +- (bool) isNetworkUp; +@end + +@implementation MenuView + +- (int) numberOfRowsInTable:(id) table { + NSArray *buttonList = [[_menuData objectForKey:[self _tagToName:[[_navBar topItem] tag]]] objectForKey:@"menu"]; + return [buttonList count]; +} + +- (void) tableRowSelected:(NSNotification *) n { + NSArray *buttonList = [[_menuData objectForKey:[self _tagToName:[[_navBar topItem] tag]]] objectForKey:@"menu"]; + + if (([[n object] selectedRow] >= 0) && ([[n object] selectedRow] < INT_MAX)) { + if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"keyClick"] ) { + AudioServicesPlaySystemSound(1105); + } + [self processKeypress:[self _nameToTag:[buttonList objectAtIndex:[[n object] selectedRow]]]]; + } +} + +- (UITableCell *) table:(UITable *) table cellForRow:(int) row column:(int) col { + id cell = [[[UIImageAndTextTableCell alloc] init] autorelease]; + + NSArray *buttonList = [[_menuData objectForKey:[self _tagToName:[[_navBar topItem] tag]]] objectForKey:@"menu"]; + [cell setTitle:[self updatePreferenceButtonName:[buttonList objectAtIndex:row]]]; + if ([self _isMenu:[self _nameToTag:[buttonList objectAtIndex:row]]]) { + [cell setShowDisclosure:YES]; + } + + return cell; +} + +- (BOOL)respondsToSelector:(SEL)aSelector { + // NSLog(@"%@", NSStringFromSelector(aSelector)); + return [super respondsToSelector:aSelector]; +} + +- (void) processKeypress: (int) code { + if (code >= 0) { + if ([self _isMenu:code]) { + // Menu + [NSThread detachNewThreadSelector:@selector(_showMenuThread:) toTarget:self withObject:[NSNumber numberWithInt:code]]; + } else if ([self _isMacro:code]) { + // Macro + [NSThread detachNewThreadSelector:@selector(_playMacroThread:) toTarget:self withObject:[NSNumber numberWithInt:code]]; + [_navBar setNavigationItems:nil]; + [_transView transition:2 toView:_view]; + [self setEnabled:NO]; + } else if ([self _isFunction:code]) { + // Function + [NSThread detachNewThreadSelector:@selector(_performFunctionThread:) toTarget:self withObject:[NSNumber numberWithInt:code]]; + // [_navBar setNavigationItems:nil]; + // [_transView transition:2 toView:_view]; + // [self setEnabled:NO]; + } + + } else if (code == -1) { + // Back button + [_menuStack removeLastObject]; + id menu = [_menuStack lastObject]; + [_menuStack removeLastObject]; + [NSThread detachNewThreadSelector:@selector(_showMenuThread:) toTarget:self withObject:menu]; + } else if (code == -2) { + // Cancel/NO/OK button + [_menuStack removeAllObjects]; + } else if (code == -3) { + // YES button + [NSThread detachNewThreadSelector:@selector(_performUpdateThread:) toTarget:self withObject:nil]; + [_menuStack removeAllObjects]; + + } +} + +- (void) alertSheet:(id) sheet buttonClicked:(int) code +{ + [_alert dismiss]; + [_alert release]; + _alert = nil; + [self processKeypress:code]; +} + +- (void) _showMenuThread:(id)tag { + NSAutoreleasePool* p = [[NSAutoreleasePool alloc] init]; + [self performSelectorOnMainThread:@selector(_showMenu:) withObject:tag waitUntilDone:YES]; + [p release]; +} + +- (void) _playMacroThread:(id)tag { + NSAutoreleasePool* p = [[NSAutoreleasePool alloc] init]; + [self _playMacro:tag]; + [p release]; +} + +- (void) _performFunctionThread:(id)tag { + NSAutoreleasePool* p = [[NSAutoreleasePool alloc] init]; + [self performSelectorOnMainThread:@selector(_performFunction:) withObject:tag waitUntilDone:YES]; + [_table[_activeTable] reloadData]; + [p release]; +} + +- (void) _performUpdateThread:(id)tag { + NSAutoreleasePool* p = [[NSAutoreleasePool alloc] init]; + [self performSelectorOnMainThread:@selector(showProgressSheet) withObject:nil waitUntilDone:NO]; + OTUpdateManager *um = [self getUpdateManager]; + [um performSelectorOnMainThread:@selector(update) withObject:nil waitUntilDone:YES]; + [self performSelectorOnMainThread:@selector(promptForRestart) withObject:nil waitUntilDone:NO]; + [p release]; +} + +- (void) _autoUpdateCheckThread:(id)tag { + NSAutoreleasePool* p = [[NSAutoreleasePool alloc] init]; + [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:2.0]]; + [self checkForUpdateKeepHidden]; + [p release]; +} + +- (void) _showStartupMessageThread:(id)tag { + NSAutoreleasePool* p = [[NSAutoreleasePool alloc] init]; + [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [self performSelectorOnMainThread:@selector(showStartupMessage) withObject:nil waitUntilDone:NO]; + [p release]; +} + +- (void) _showMenu:(id)tag { + UINavigationItem *navItem; + + navItem = [[UINavigationItem alloc] initWithTitle:[self _tagToName:[tag intValue]]]; + [navItem setTag:[tag intValue]]; + + if ([tag intValue] == 0) { + [_navBar setNavigationItems:nil]; + [_navBar pushNavigationItem:navItem]; + [_table[_activeTable] selectRow:-1 byExtendingSelection:NO]; + [_table[_activeTable] reloadData]; + [_transView transition:1 toView:_tableView]; + } else { + _activeTable = ((_activeTable+1) % 2); + [_navBar pushNavigationItem:navItem]; + [_table[_activeTable] selectRow:-1 byExtendingSelection:NO]; + [_table[_activeTable] reloadData]; + [_innerTransView transition:1 toView:_table[_activeTable]]; + } +} + +- (void) navigationBar:(UINavigationBar *) bar poppedItem:(UINavigationItem *) item { + if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"keyClick"] ) { + AudioServicesPlaySystemSound(1105); + } + + _activeTable = ((_activeTable+1) % 2); + [_table[_activeTable] selectRow:-1 byExtendingSelection:NO]; + [_table[_activeTable] reloadData]; + [_innerTransView transition:2 toView:_table[_activeTable]]; +} + +- (void) navigationBar:(UINavigationBar *) bar buttonClicked:(int) button { + if (button == 0) { + if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"keyClick"] ) { + AudioServicesPlaySystemSound(1105); + } + [_transView transition:2 toView:_view]; + [self setEnabled:NO]; + } +} + +- (void) _playMacro:(id)tag { + [_calcView playMacro:[[_menuData objectForKey:[self _tagToName:[tag intValue]]] objectForKey:@"macro"]]; +} + +- (void) _performFunction:(id)tag { + id fn = [self _tagToName:[tag intValue]]; + + if ( [fn hasPrefix:@"Turn keyclick "] ) { + [[NSUserDefaults standardUserDefaults] setBool: ([[NSUserDefaults standardUserDefaults] boolForKey:@"keyClick"] ? NO : YES) + forKey: @"keyClick" + ]; + [[NSUserDefaults standardUserDefaults] synchronize]; + } else if ([fn hasPrefix:@"Turn auto check for updates "]) { + [[NSUserDefaults standardUserDefaults] setBool: ([[NSUserDefaults standardUserDefaults] boolForKey:@"autoUpdates"] ? NO : YES) + forKey: @"autoUpdates" + ]; + [[NSUserDefaults standardUserDefaults] synchronize]; + } else if ( [fn isEqualToString:@"Send Feedback"] ) { + id url = [NSString stringWithFormat:@"mailto:tom@fors.net?subject=%@%%20Calculator%%20Version%%20%@", @APPNAME, @VER_STR]; + [UIApp openURL:[NSURL URLWithString:url]]; + } else if ( [fn isEqualToString:@"About"] ) { + [UIApp openURL:[NSURL URLWithString:@ABOUTURL]]; + } else if ( [fn isEqualToString:@"Check for updates now"] ) { + [self checkForUpdate]; + } +} + +- (void) promptForUpdate { + if ( _alert ) { + [_alert dismiss]; + [_alert release]; + _alert = nil; + } + _alert = [[[UIAlertSheet alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] retain]; + [_alert setAlertSheetStyle:2]; + [_alert setDelegate:self]; + [_alert setTitle:@"Update Available"]; + [_alert setBodyText:[NSString stringWithFormat:@"An updated version of %@ is available.\nWould you like to install the update now?", @APPNAME]]; + [_alert addButtonWithTitle:@"Yes"]; + [[[_alert buttons] lastObject] setTag:-3]; + [_alert addButtonWithTitle:@"No"]; + [[[_alert buttons] lastObject] setTag:-2]; + [_alert setNumberOfRows:1]; + + [_alert presentSheetInView:_transView]; +} + +- (void) promptNoUpdate { + if ( _alert ) { + [_alert dismiss]; + [_alert release]; + _alert = nil; + } + _alert = [[[UIAlertSheet alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] retain]; + [_alert setAlertSheetStyle:2]; + [_alert setDelegate:self]; + [_alert setTitle:@"No Updates Available"]; + [_alert setBodyText:[NSString stringWithFormat:@"You already have the latest version of %@ installed.", @APPNAME]]; + [_alert addButtonWithTitle:@"OK"]; + [[[_alert buttons] lastObject] setTag:-2]; + + [_alert presentSheetInView:_transView]; +} + +- (void) showStartupMessage { + if ( _alert ) { + [_alert dismiss]; + [_alert release]; + _alert = nil; + } + _alert = [[[UIAlertSheet alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] retain]; + [_alert setAlertSheetStyle:2]; + [_alert setDelegate:self]; + [_alert setTitle:@"Updates"]; + [_alert setBodyText:[NSString stringWithFormat:@"Updates in this version of the %@ are primarily to support 1.1.3 jailbroke iPhones and iPods.\nTo provide feedback, tap the HP logo and select 'Preferences' then 'Send Feedback'", @APPNAME]]; + [_alert addButtonWithTitle:@"OK"]; + [[[_alert buttons] lastObject] setTag:-2]; + [_alert presentSheetInView:_transView]; +} + +- (bool) networkIsUp { + return [[NetworkController sharedInstance] isNetworkUp]; +} + +- (void) promptForNoNetwork { + if ( _alert ) { + [_alert dismiss]; + [_alert release]; + _alert = nil; + } + [self hideProgressSheet]; + _alert = [[[UIAlertSheet alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] retain]; + [_alert setAlertSheetStyle:2]; + [_alert setDelegate:self]; + [_alert setTitle:@"Network Error"]; + [_alert setBodyText:[NSString stringWithFormat:@"Unable to connect to network server.\n\nPlease try again later."]]; + [_alert addButtonWithTitle:@"OK"]; + [[[_alert buttons] lastObject] setTag:-2]; + [_alert presentSheetInView:_transView]; +} + +- (void) checkForUpdateKeepHidden { + if ([self networkIsUp]) { + OTUpdateManager *um = [self getUpdateManager]; + if ( [um refreshIsNeeded] ) { + [um checkForUpdates]; + bool updateAvailable = [um updateIsAvailable]; + [self hideProgressSheet]; + if ( updateAvailable ) { + [self performSelectorOnMainThread:@selector(promptForUpdate) withObject:nil waitUntilDone:NO]; + } + } + } +} + +- (void) checkForUpdate { + if ([self networkIsUp]) { + [self showProgressSheet]; + [[NSRunLoop currentRunLoop] runUntilDate:[NSDate date]]; + OTUpdateManager *um = [self getUpdateManager]; + + [um checkForUpdates]; + bool updateAvailable = [um updateIsAvailable]; + [self hideProgressSheet]; + if ( updateAvailable ) { + [self performSelectorOnMainThread:@selector(promptForUpdate) withObject:nil waitUntilDone:NO]; + } else { + [self performSelectorOnMainThread:@selector(promptNoUpdate) withObject:nil waitUntilDone:NO]; + } + } else { + [self promptForNoNetwork]; + } +} + +- (void) promptForRestart { + if ( _alert ) { + [_alert dismiss]; + [_alert release]; + _alert = nil; + } + [self hideProgressSheet]; + _alert = [[[UIAlertSheet alloc] initWithFrame:CGRectMake(0, 0, 320, 480)] retain]; + [_alert setAlertSheetStyle:2]; + [_alert setDelegate:self]; + [_alert setTitle:@"Restart Required"]; + [_alert setBodyText:[NSString stringWithFormat:@"A new version of %@ has been installed.\nClick the Home button to exit back to the springboard and then tap the icon to re-launch the calculator for the changes to take effect.", @APPNAME]]; + [_alert addButtonWithTitle:@"OK"]; + [[[_alert buttons] lastObject] setTag:-2]; + [_alert presentSheetInView:_transView]; +} + +- (id) getUpdateManager { + OTUpdateManager *um = [[OTUpdateManager alloc] initWithPrefFolder: [@CFGPATH stringByExpandingTildeInPath] + trustedSource: [NSDictionary dictionaryWithObjectsAndKeys: + @"HP Calculators for iPhone", @"name", + @"http://hpcalc-iphone.googlecode.com/svn/repo/packages.xml", @"location", + @"Thomas Fors", @"maintainer", + @"tom@fors.net", @"contact", + @"HPCALC", @"category", + NULL] + thisPackage: [NSDictionary dictionaryWithObjectsAndKeys: + @APPNAME, @"name", + @"Utilities", @"category", + @"HP Calculator Emulator", @"description", + @"http://hpcalc-iphone.googlecode.com/svn/repo/packages.xml", @"source", + @"Thomas Fors", @"maintainer", + @"tom@fors.net", @"contact", + NULL] + ]; + [um setDelegate:self]; + return um; +} + +- (id) updatePreferenceButtonName:(id) name { + if ([name isEqualToString:@"Turn keyclick %@"]) { + return [NSString stringWithFormat:name, ([[NSUserDefaults standardUserDefaults] boolForKey:@"keyClick"] ? @"off" : @"on")]; + } else if ([name isEqualToString:@"Turn auto check for updates %@"]) { + return [NSString stringWithFormat:name, ([[NSUserDefaults standardUserDefaults] boolForKey:@"autoUpdates"] ? @"off" : @"on")]; + } + return name; +} + +- (id) initWithFrame:(CGRect) frame { + self = [super initWithFrame:frame]; + if (self) { + _menuStack = [[NSMutableArray alloc] init]; + _menuData = [[NSMutableDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"/Applications/%s.app/menu.plist", APPNAME]] retain]; + + NSEnumerator *enumerator = [[_menuData copy] keyEnumerator]; + id key; + while (key = [enumerator nextObject]) { + if ([key hasSuffix:@"%@"]) { + id newkey = [NSString stringWithFormat:key, @"on"]; + id obj = [[_menuData objectForKey:key] mutableCopy]; + [_menuData setObject:obj forKey:newkey]; + newkey = [NSString stringWithFormat:key, @"off"]; + obj = [[_menuData objectForKey:key] mutableCopy]; + [_menuData setObject:obj forKey:newkey]; + } + } + + _tagList = [[NSMutableArray alloc] init]; + [_tagList addObject:@"Main Menu"]; + enumerator = [_menuData keyEnumerator]; + while (key = [enumerator nextObject]) { + if (! [_tagList containsObject:key] ) { + [_tagList addObject:key]; + } + } + + _tableView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 480, 300)] retain]; + + _navBar = [[[UINavigationBar alloc] init] retain]; + [_navBar setFrame:CGRectMake(0, 0, 480, 45)]; + [_navBar setDelegate:self]; + [_navBar showButtonsWithLeftTitle:nil rightTitle:@"Exit" leftBack:YES]; + [_tableView addSubview:_navBar]; + + _innerTransView = [[[UITransitionView alloc] initWithFrame:CGRectMake(0, 45, 480, 300-45)] retain]; + _activeTable = 0; + + UITableColumn *col = [[UITableColumn alloc] initWithTitle:@"name" identifier:@"name" width:480]; + int i; + for (i=0; i<2; i++) { + _table[i] = [[[UITable alloc] initWithFrame:CGRectMake(0, 0, 480, 300-45)] retain]; + [_table[i] addTableColumn:col]; + [_table[i] setDelegate:self]; + [_table[i] setDataSource:self]; + [_table[i] setReusesTableCells:NO]; + [_table[i] setShowScrollerIndicators:YES]; + [_table[i] setSeparatorStyle:1]; + [_table[i] reloadData]; + } + [_tableView addSubview:_innerTransView]; + [_innerTransView transition:1 toView:_table[_activeTable]]; + + frame = CGRectMake(-90, 90, 480, 300); + _transView = [[[UITransitionView alloc] initWithFrame:frame] retain]; + [_transView setRotationBy:90]; + + _view = [[UIView alloc] initWithFrame:frame]; + [_view retain]; + + [self addSubview:_transView]; + [_transView transition:1 toView:_view]; + } + + _progressBar = [[UIProgressBar alloc] initWithFrame:CGRectMake(60, 34, 360, 20)]; + _progressSheet = [[UIAlertSheet alloc] init]; + [_progressSheet setTitle:@"Please wait..."]; + [_progressSheet setBodyText:@" "]; + [_progressSheet setDelegate:self]; + [_progressSheet setAlertSheetStyle:2]; + [_progressSheet addSubview:_progressBar]; + _progressSheetVisible = NO; + + if ( [self _startupMessageIsNeeded] ) { + [NSThread detachNewThreadSelector:@selector(_showStartupMessageThread:) toTarget:self withObject:nil]; + [[NSUserDefaults standardUserDefaults] setObject: [NSDate date] forKey: @"startupMessageLastShown"]; + } else { + if ( [[NSUserDefaults standardUserDefaults] boolForKey:@"autoUpdates"] ) { + [NSThread detachNewThreadSelector:@selector(_autoUpdateCheckThread:) toTarget:self withObject:nil]; + } + } + + return self; +} + +- (bool) _startupMessageIsNeeded { + id lastShown = [[NSUserDefaults standardUserDefaults] objectForKey:@"startupMessageLastShown"]; + id messageDate = [NSDate dateWithString:@"2008-02-06 07:40:00 -0600"]; + id now = [NSDate date]; + + if (lastShown == nil) { + return YES; + } + + if ( [lastShown laterDate:messageDate] == messageDate ) { + return YES; + } + + return NO; +} + +- (int) _nameToTag:(NSString *) name { + return [_tagList indexOfObject:name]; +} + +- (NSString *) _tagToName:(int) tag { + return [_tagList objectAtIndex:tag]; +} + +- (MenuButton *) _buttonWithTag:(int) tag { + return [self _buttonWithName:[self _tagToName:tag]]; +} + +- (MenuButton *) _buttonWithName:(NSString *) name { + MenuButton *mb = [[_menuData objectForKey:name] objectForKey:@"button"]; + if (!mb) { + mb = [[MenuButton alloc] initWithTitle:name]; + [mb setTag:[self _nameToTag:name]]; + [[_menuData objectForKey:name] setObject:mb forKey:@"button"]; + } + return mb; +} + +- (bool) _isMenu:(int) tag { + return ([[_menuData objectForKey:[self _tagToName:tag]] objectForKey:@"menu"] != nil); +} + +- (bool) _isMacro:(int) tag { + return ([[_menuData objectForKey:[self _tagToName:tag]] objectForKey:@"macro"] != nil); +} + +- (bool) _isFunction:(int) tag { + return ([[_menuData objectForKey:[self _tagToName:tag]] objectForKey:@"function"] != nil); +} + +- (void) setCalcView:(CalculatorView *) v { + _calcView = v; +} + +- (void) showProgressSheet { + if ( ! _progressSheetVisible ) { + _progressSheetVisible = YES; + [_progressBar setProgress:0.0]; + [_progressSheet presentSheetInView:_transView]; + [_progressSheet setBlocksInteraction:YES]; + } +} + +- (void) hideProgressSheet { + if ( _progressSheetVisible ) { + _progressSheetVisible = NO; + [_progressSheet dismissAnimated:YES]; + [_progressSheet setBlocksInteraction:NO]; + } +} + +- (void) updateManager:(id) pm statusChanged:(id) status { + // [_progressSheet setTitle:status]; + [_progressSheet performSelectorOnMainThread:@selector(setTitle:) withObject:status waitUntilDone:NO]; + [[NSRunLoop currentRunLoop] runUntilDate:[NSDate date]]; +} + +- (void) updateManager:(id) pm progressChanged:(id) progress { + [_progressBar setProgress:([progress doubleValue] / 100.0)]; + [[NSRunLoop currentRunLoop] runUntilDate:[NSDate date]]; +} + +- (void) updateManager:(id) pm startedQueue:(id) q { +} + +- (void) updateManager:(id) pm finishedQueueWithResult:(id) result { + [self hideProgressSheet]; +} + +@end \ No newline at end of file diff --git a/src/unused/OTUpdateManager.h b/src/unused/OTUpdateManager.h new file mode 100644 index 0000000..f548ed9 --- /dev/null +++ b/src/unused/OTUpdateManager.h @@ -0,0 +1,18 @@ + +#import + +@interface OTUpdateManager : NSObject { + NSDictionary * _trustedSource; + NSDictionary * _thisPackage; + NSString * _prefFolder; + id delegate; +} + +- (id) initWithPrefFolder:(id) pf trustedSource:(id) ts thisPackage:(id) tp; +- (void) setDelegate:(id) del; +- (bool) refreshIsNeeded; +- (void) checkForUpdates; +- (bool) updateIsAvailable; +- (bool) update; + +@end diff --git a/src/unused/main.m b/src/unused/main.m new file mode 100644 index 0000000..571cb82 --- /dev/null +++ b/src/unused/main.m @@ -0,0 +1,131 @@ +/* Copyright (c) 2007, Thomas Fors + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#import + +#import "CalculatorApp.h" +#import "OTUpdateManager.h" +#import "hpcalc.h" + +/* + * Main entry point of application + */ +int main(int argc, char **argv) { + int rc = 0; + bool init = NO; + bool reset = NO; + bool nogui = NO; + bool ver = NO; + + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + int i; + for (i=1; i + + + + Main Menu + + menu + + Preferences + Constants + Unit Conversion + + + + Preferences + + menu + + Check for updates now + Turn auto check for updates %@ + Turn keyclick %@ + Send Feedback + About + + + Check for updates nowfunctionUpdates + Turn auto check for updates %@ + functionToggleAutoUpdate + Turn keyclick %@functionToggleKeyclick + Send FeedbackfunctionFeedback + AboutfunctionAbout + + Constants + + menu + + Astronomical + Atomic + Electromagnetic + Physiochemical + Universal + + + + Astronomical + + menu + + Equatorial Radius of Earth (km) + Mass of Earth (kg) + Mass of Moon (kg) + Mass of Sun (kg) + Mean Earth-Moon Distance (km) + Mean Earth-Sun Distance (km) + Mean Radius of Earth (km) + Mean Radius of Moon (km) + + + Equatorial Radius of Earth (km)macro6378 + Mass of Earth (kg)macro5.974e24 + Mass of Moon (kg)macro7.348e22 + Mass of Sun (kg)macro1.989e30 + Mean Earth-Moon Distance (km)macro384401 + Mean Earth-Sun Distance (km)macro149600000 + Mean Radius of Earth (km)macro6371 + Mean Radius of Moon (km)macro1738 + + Atomic + + menu + + Electron Mass (kg) + Fine-Structure Constant + Inverse Fine-Structure Constant + Neutron Mass (kg) + Proton Mass (kg) + Proton-Electron Mass Ratio + Proton-Neutron Mass Ratio + Rydberg Constant + Thomson Cross Section + + + Electron Mass (kg)macro9.1093826e-31 + Fine-Structure Constantmacro0.0072973526 + Inverse Fine-Structure Constant + macro137.03599911 + Neutron Mass (kg)macro1.67492728e-27 + Proton Mass (kg)macro1.67262171e-27 + Proton-Electron Mass Ratiomacro1836.15267261 + Proton-Neutron Mass Ratiomacro0.9986234787 + Rydberg Constantmacro10973731.568525 + Thomson Cross Sectionmacro6.65245873e-29 + + Electromagnetic + + menu + + Conductance Quantum + Elementary Charge + Magnetic Flux Quantum + + + Conductance Quantummacro7.748091733e-5 + Elementary Chargemacro1.60217653e-19 + Magnetic Flux Quantummacro2.06783372e-15 + + Physiochemical + + menu + + Atomic Mass Constant + Avogadro Constant + Boltzmann Constant + Faraday Constant + Molar Gas Constant + Stefan-Boltzmann Constant + + + Atomic Mass Constantmacro1.66053886e-27 + Avogadro Constantmacro6.0221415e23 + Boltzmann Constantmacro1.3806505e-23 + Faraday Constantmacro96485.3383 + Molar Gas Constantmacro8.314472 + Stefan-Boltzmann Constantmacro5.6704e-8 + + Universal + + menu + + Electric Constant + Magnetic Constant + Newtonian Constant of Gravitation + Standard Gravity Acceleration (m/s) + Planck Constant + Speed of Light in Vacuum (m/s) + + + Electric Constantmacro8.854187817e-12 + Magnetic Constantmacro1.2566370614e-6 + Newtonian Constant of Gravitation + macro6.6742e-11 + Planck Constantmacro6.6260693e-34 + Speed of Light in Vacuum (m/s)macro299792458 + Standard Gravity Acceleration (m/s)macro9.80665 + + Unit Conversion + + menu + + Temperature + Length + + + + Temperature + + menu + + ºF to ºC + K to ºC + ºR to ºC + ºC to ºF + ºC to K + ºC to ºR + + + ºF to ºCmacrox<>y x<>y 32 - 5 * 9 / + ºC to ºFmacrox<>y x<>y 9 * 5 / 32 + + K to ºCmacrox<>y x<>y 273.15 - + ºC to Kmacrox<>y x<>y 273.15 + + ºR to ºC + macrox<>y x<>y 1.8 / 273.15 - + ºC to ºR + macrox<>y x<>y 273.15 + 1.8 * + + Length + + menu + + To Meter... + From Meter... + + + + To Meter... + + menu + + Centimeter To Meter + Foot To Meter + Inch To Meter + Kilometer To Meter + Mile To Meter + Nautical Mile To Meter + Yard To Meter + + + Centimeter To Metermacrox<>y x<>y 100 / + Foot To Metermacrox<>y x<>y 0.3048 * + Inch To Metermacrox<>y x<>y 0.0254 * + Kilometer To Metermacrox<>y x<>y 1000 * + Mile To Metermacrox<>y x<>y 1609.344 * + Nautical Mile To Metermacrox<>y x<>y 1852 * + Yard To Metermacrox<>y x<>y 0.9144 * + + From Meter... + + menu + + Meter To Centimeter + Meter To Foot + Meter To Inch + Meter To Kilometer + Meter To Mile + Meter To Nautical Mile + Meter To Yard + + + Meter To Centimetermacrox<>y x<>y 100 * + Meter To Footmacrox<>y x<>y 0.3048 / + Meter To Inchmacrox<>y x<>y 0.0254 / + Meter To Kilometermacrox<>y x<>y 1000 / + Meter To Milemacrox<>y x<>y 1609.344 / + Meter To Nautical Milemacrox<>y x<>y 1852 / + Meter To Yardmacrox<>y x<>y 0.9144 / + + + diff --git a/src/version-16c.h b/src/version-16c.h new file mode 100644 index 0000000..0e63eeb --- /dev/null +++ b/src/version-16c.h @@ -0,0 +1,30 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ +/* + * Copyright (c) 2007, Thomas Fors + * All rights reserved. + */ + +#define VER_STR "1.0.0" +#define VER_MAJOR 1 +#define VER_MINOR 0 +#define VER_INCR 0 + diff --git a/src/voyager_lcd.c b/src/voyager_lcd.c new file mode 100644 index 0000000..05cf7e3 --- /dev/null +++ b/src/voyager_lcd.c @@ -0,0 +1,293 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + +// +// changes for mac os x by Maciej Bartosiak +// + + +#include +#include +#include +#include + +//#include "arch.h" +#include "macutil.h" +#include "display.h" +#include "proc.h" +#include "digit_ops.h" +#include "voyager_lcd.h" +//#include "proc_int.h" +#include "proc_nut.h" + + +#define VOYAGER_DISPLAY_BLINK_DIVISOR 150 + + +/*typedef struct +{ + bool enable; + int count; + + bool blink; + bool blink_state; + int blink_count; +} voyager_display_reg_t; +*/ + +static void voyager_op_display_off (nut_reg_t *nut_reg, int opcode) +{ + voyager_display_reg_t *display = nut_reg->display_chip; + + display->enable = 0; + display->blink = 0; + display->count = 2; + // Don't change immediately, as the next instruction might be a + // display toggle. +} + + +static void voyager_op_display_toggle (nut_reg_t *nut_reg, int opcode) +{ + voyager_display_reg_t *display = nut_reg->display_chip; + + display->enable = ! display->enable; + display->count = 0; // force immediate display update +} + + +static void voyager_op_display_blink (nut_reg_t *nut_reg, int opcode) +{ + voyager_display_reg_t *display = nut_reg->display_chip; + + display->enable = 1; + display->blink = 1; + display->blink_state = 1; + display->blink_count = VOYAGER_DISPLAY_BLINK_DIVISOR; + display->count = 0; // force immediate display update +} + + +static void voyager_display_init_ops (nut_reg_t *nut_reg) +{ + nut_reg->display_digits = VOYAGER_DISPLAY_DIGITS; + nut_reg->op_fcn [0x030] = voyager_op_display_blink; + nut_reg->op_fcn [0x2e0] = voyager_op_display_off; + nut_reg->op_fcn [0x320] = voyager_op_display_toggle; +} + + +static void voyager_display_reset (voyager_display_reg_t *display) +{ + display->enable = 0; + display->blink = 0; + display->count = 0; +} + + +typedef struct +{ + int reg; + int dig; + int bit; +} voyager_segment_info_t; + + +// For each of 11 digits, we need segments a-g for the actual digit, +// segment h for the decimal point, segment i for the tail of the comma, +// and segment j for the annunciator. +voyager_segment_info_t voyager_display_map [11] [10] = +{ + { /* leftmost position has only segment g for a minus */ + { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, + { 0, 0, 0 }, { 0, 11, 4 }, { 0, 0, 0 }, { 0, 0, 0 }, + { 0, 0, 0 } // no annunciator + }, +{ + { 0, 5, 2 }, { 0, 5, 8 }, { 0, 4, 8 }, { 0, 11, 8 }, { 0, 4, 4 }, + { 0, 5, 1 }, { 0, 5, 4 }, { 0, 9, 8 }, { 0, 9, 4 }, + { 0, 0, 0 } // no annunciator - "*" for low bat in KML, but that's + // not controllable by the calculator microcode +}, +{ + { 0, 6, 8 }, { 0, 7, 2 }, { 0, 6, 2 }, { 0, 4, 2 }, { 0, 6, 1 }, + { 0, 6, 4 }, { 0, 7, 1 }, { 0, 3, 8 }, { 0, 3, 4 }, + { 0, 4, 1 } // USER annunciator +}, +{ + { 0, 12, 8 }, { 0, 13, 2 }, { 0, 12, 2 }, { 0, 3, 2 }, { 0, 12, 1 }, + { 0, 12, 4 }, { 0, 13, 1 }, { 0, 13, 8 }, { 0, 13, 4 }, + { 0, 3, 1 } // f annunciator +}, +{ + { 0, 8, 2 }, { 0, 8, 8 }, { 0, 7, 8 }, { 0, 2, 2 }, { 0, 7, 4 }, + { 0, 8, 1 }, { 0, 8, 4 }, { 0, 9, 2 }, { 0, 9, 1 }, + { 0, 2, 1 } // g annunciator +}, +{ + { 0, 10, 8 }, { 0, 11, 2 }, { 0, 10, 2 }, { 0, 1, 8 }, { 0, 10, 1 }, + { 0, 10, 4 }, { 0, 11, 1 }, { 0, 2, 8 }, { 0, 2, 4 }, + { 0, 1, 4 } // BEGIN annunciator +}, +{ + { 1, 2, 8 }, { 1, 3, 2 }, { 1, 2, 2 }, { 1, 3, 8 }, { 1, 2, 1 }, + { 1, 2, 4 }, { 1, 3, 1 }, { 1, 4, 2 }, { 1, 4, 1 }, + { 1, 3, 4 } // G annunciator (for GRAD, or overflow on 16C) +}, +{ + { 1, 5, 2 }, { 1, 5, 8 }, { 1, 4, 8 }, { 1, 1, 8 }, { 1, 4, 4 }, + { 1, 5, 1 }, { 1, 5, 4 }, { 1, 6, 2 }, { 1, 6, 1 }, + { 1, 1, 4 } // RAD annunciator +}, +{ + { 1, 7, 2 }, { 1, 7, 8 }, { 1, 6, 8 }, { 1, 9, 8 }, { 1, 6, 4 }, + { 1, 7, 1 }, { 1, 7, 4 }, { 1, 9, 2 }, { 1, 9, 1 }, + { 1, 9, 4 } // D.MY annunciator +}, +{ + { 1, 11, 8 }, { 1, 12, 2 }, { 1, 11, 2 }, { 1, 8, 2 }, { 1, 11, 1 }, + { 1, 11, 4 }, { 1, 12, 1 }, { 1, 8, 8 }, { 1, 8, 4 }, + { 1, 8, 1 } // C annunciator (Complex on 15C, Carry on 16C) +}, +{ + { 1, 13, 2 }, { 1, 13, 8 }, { 1, 12, 8 }, { 1, 10, 2 }, { 1, 12, 4 }, + { 1, 13, 1 }, { 1, 13, 4 }, { 1, 10, 8 }, { 1, 10, 4 }, + { 1, 10, 1 } // PRGM annunciator +} +}; + + +static void voyager_display_update (nut_reg_t *nut_reg, voyager_display_reg_t *display) +{ + int digit; + int segment; + + for (digit = 0; digit < VOYAGER_DISPLAY_DIGITS; digit++) + { + nut_reg->display_segments [digit] = 0; + if (display->enable) + { + for (segment = 0; segment <= 9; segment++) + { + int vreg = voyager_display_map [digit][segment].reg; + int vdig = voyager_display_map [digit][segment].dig; + int vbit = voyager_display_map [digit][segment].bit; + if (vbit && (nut_reg->ram [9 + vreg][vdig] & vbit)) + { + if (segment < 9) + nut_reg->display_segments [digit] |= (1 << segment); + else + nut_reg->display_segments [digit] |= SEGMENT_ANN; + } + } + } + } +} + +void print_display(nut_reg_t *nut_reg) +{ + segment_bitmap_t *ds = nut_reg->display_segments; + int i; + + char disp_cur[2048] =""; + static char disp_old[2048]; + char disp_tmp[1024] =""; + + for (i=0; i< /*MAX_DIGIT_POSITION*/nut_reg->display_digits; i++) { + sprintf(disp_tmp, "%8x,", ds[i]); + strcat(disp_cur,disp_tmp); + int j,tmp; + for (j=nut_reg->display_digits; j>=0; j--) { + tmp = (ds[i] >> j) & 1; + tmp ? strcat(disp_cur,"*") : strcat(disp_cur,"."); + } + strcat(disp_cur,"\n"); + } + + if (strcmp(disp_cur,disp_old)) { + printf("-------------------------------------------------------------------\n"); + printf("%s\n", disp_cur); + strcpy(disp_old,disp_cur); + } + //printf("%s\n", disp_cur); + +} + +void voyager_display_event_fn (nut_reg_t *nut_reg, int event) +{ + voyager_display_reg_t *display = nut_reg->display_chip; + + switch (event) + { + case event_reset: + voyager_display_reset (display); + break; + case event_cycle: + if (display->count == 0) + { + voyager_display_update (nut_reg, display); + display->count = 15; + } + else + display->count --; + break; + case event_sleep: + // force display update + voyager_display_update (nut_reg, display); + display->count = 15; + + if (display->enable) + { + /* going to light sleep */ +#ifdef AUTO_POWER_OFF + // $$$ how does display timer work on Voyager? + /* start display timer if LCD chip is selected */ + if (nut_reg->pf_addr == PFADDR_LCD_DISPLAY) + display->timer = DISPLAY_TIMEOUT; +#endif /* AUTO_POWER_OFF */ + } + else + /* going to deep sleep */ + nut_reg->carry = 1; + break; + case event_wake: + case event_restore_completed: + // force display update + voyager_display_update (nut_reg, display); + display->count = 15; + break; + default: + // warning ("voyager_lcd: unknown event %d\n", event); + break; + } +} + + +void voyager_display_init (nut_reg_t *nut_reg) +{ + voyager_display_reg_t *display; + + voyager_display_init_ops (nut_reg); + + display = (voyager_display_reg_t *)alloc (sizeof (voyager_display_reg_t)); + + nut_reg->display_chip = display; +} diff --git a/src/voyager_lcd.h b/src/voyager_lcd.h new file mode 100644 index 0000000..c226e96 --- /dev/null +++ b/src/voyager_lcd.h @@ -0,0 +1,48 @@ +/* + $Id$ + Copyright 1995, 2003, 2004, 2005 Eric L. Smith + + Nonpareil is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License version 2 as + published by the Free Software Foundation. Note that I am not + granting permission to redistribute or modify Nonpareil under the + terms of any later version of the General Public License. + + Nonpareil is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program (in the file "COPYING"); if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111, USA. + */ + +// +// changes for mac os x by Maciej Bartosiak +// + + +#define VOYAGER_DISPLAY_DIGITS 11 + +// The Voyager display doesn't have a peripheral address like the +// Coconut display, but we have to pick a chip number somehow, so we'll +// use the same one. +#define PFADDR_LCD_DISPLAY 0xfd + +struct nut_reg_t; + +typedef struct +{ + bool enable; + int count; + + bool blink; + bool blink_state; + int blink_count; +} voyager_display_reg_t; + + +void voyager_display_init (struct nut_reg_t *nut_reg); +void display_callback(struct nut_reg_t *nv);